Skip to Content

AL GS1

AL GS1 - User guide

How to set up and use the app in Business Central.

Download the guide as PDF

1. Concepts in one minute

  • A GS1-128 barcode is a chain of application identifiers (AI): each AI is a code plus a value - SSCC (00), GTIN (01/02), lot (10), production, packaging, best before, sell by and expiry dates, serial (21), net and gross weight, count of packages, and more.
  • An application identifier is defined once in a master list with its format, data type, length and validation rule; the app ships the full GS1 list and you can re-import it.
  • A barcode model (a header with its lines) declares which AIs a barcode contains and where each value comes from. Only a model in Released status can be used to encode.
  • A GTIN source resolves the GTIN (AI 01/02) for a given item by company, customer, vendor or barcode source group. The same table works both ways: it decodes a supplier barcode and encodes a customer-specific one.
  • Encoding builds a barcode from a document line; decoding reads a scanned barcode back into its identifiers.
  • A scan writes on the document line what the label carries. The values reach the line through the AppLibra apps that own them, AL Tracking for lot, serial and pallet and AL Catch Weight for the weight, and the same barcode model feeds the labels printed with AL Zebra Print Label.

2. Prerequisites

  • Microsoft Dynamics 365 Business Central, version 29.0 or higher, online (SaaS) and on-premises. AppSource covers online environments; on-premises is distributed and installed directly by AppLibra, through the AppLibra License Manager.
  • The dependencies installed: AL License and Trial Management, AL Barcode, AL Message Passing, AL Foundation App, AL Role Center.
  • Permissions: assign AL GS1 - User for daily use, or AL GS1 - Administrator, which includes it and adds the configuration and the deletions. The user role already carries what the apps underneath need, so it is the only one an operator is given.
  • Scanning from a device reaches Business Central through a web service, not through a scanner driver installed on the server: whoever sets up the devices needs an account and the user role above.

3. Setup

3.1 Activate the license

Open Setup (GS1): the record is created on first open and a trial is registered automatically. Use Add License to enter a license when you have one.

3.2 Setup (GS1)

On Setup (GS1), fill in:

  • Default Barcode Source Group - the group used to resolve items when a scan has no more specific source.
  • SSCC Nos. - the number series (a whole-number progressive) used to generate SSCCs.
  • GS1 Prefix - your GS1 company prefix; it must be 7 or 9 characters long to build SSCCs.
  • GTIN Progressive - the running number used to generate new GTINs.
  • GTIN14 Prefix Digit - the packaging indicator digit (1 to 8) for new ITF-14 / GTIN-14 codes.
  • AI Separator - the separator between variable-length AIs (GS, CD or CA).
  • Zebra Label GS1 Tag Code - the tag code AL Zebra Print Label uses to ask this app for the GS1 values of a label.
  • Check External Document No. - refuses a scan when the document number on the label, application identifier 400, is not the external document number of the document being scanned. It compares the number this app prints on that identifier, so a localisation that keeps that number in a field of its own is followed here as well. A company that starts now has this on; an installation that was already there has it off until somebody turns it on.

The GS1 setup with company prefix, SSCC number series, AI separator, default barcode source group and the external document number check
The GS1 setup with company prefix, SSCC number series, AI separator, default barcode source group and the external document number check
The setup is also registered in the Business Central Manual Setup list (search "AL GS1 Setup"), next to the standard features.

3.3 Import the application identifiers

A company created from this version on starts with the identifiers of the standard already there, all 517 of them: the app carries the list and writes it when it is installed in the company, so there is nothing to do. It matters because an identifier the table does not know costs the part of a label that follows it.

A company installed earlier keeps what it has, which may be a short list or nothing at all. From the Application Identifiers (GS1) list, Load Standard Identifiers adds the ones that are missing and leaves the ones already there exactly as they are, so a list someone curated by hand stays curated. It is an action and not something the upgrade does on its own, because filling a table with 517 rows is the company's call and not ours.

Import Application Identifier, in the same place, still reads the list from an Excel file (code, description, format, data title, FNC1, regular expression). It is the way in for a company with a list of its own, or to add an internal identifier the standard does not have.

The application identifier master with format, data type, length and validation rule
The application identifier master with format, data type, length and validation rule

3.4 Barcode source groups

Open Barcode Source Groups (GS1) and create a group for each set of partners that share the same barcode standard. Assign a group to a customer or vendor in the card's Barcode group (Barcode Source Group No.).

Barcode source groups: one row per set of partners that share the same barcode standard
Barcode source groups: one row per set of partners that share the same barcode standard

4. GTIN and GTIN sources

Open GTIN Sources (GS1) (or the GTIN Sources (GS1) action on an item, customer or vendor card) and add one row per item and source:

  • choose the GTIN Source Type (Company, Vendor, Customer, Barcode Source Group) and Source No.;
  • set the Item No., Unit Of Measure Code, Barcode Type and Accounting Type;
  • leave GTIN empty to have a new one generated, or type an existing GTIN (for example a supplier's) to decode incoming barcodes.

GTIN sources by item and source, decoding a vendor barcode and encoding a customer one
GTIN sources by item and source, decoding a vendor barcode and encoding a customer one
On the item card, the Barcode group carries the default Accounting Type (Fixed Quantity or Variable weight); variable-weight items build GTINs with the reserved prefix digit and connect to catch weight.

Generating codes. Adding a GTIN source with an empty GTIN generates a new GTIN from the GS1 prefix and progressive, with the correct GS1 check digit, and can convert it to an ITF-14 for packaging. SSCCs are generated from the SSCC Nos. series and the GS1 prefix, again with the check digit; they fill AI 00 when a model includes it. GTIN List (GS1) lists every generated code with its barcode type and progressive.

The GTIN list: every generated code with its barcode type and its progressive, GTIN-13 and ITF-14 side by side
The GTIN list: every generated code with its barcode type and its progressive, GTIN-13 and ITF-14 side by side
Barcode image. On GTIN Sources (GS1), Create Barcode renders the barcode image and stores it on the row, where it can be seen and printed from the Barcode FactBox.
The barcode image rendered on the GTIN source, in the Barcode FactBox, with its number underneath
The barcode image rendered on the GTIN source, in the Barcode FactBox, with its number underneath

5. Barcode models

Open Barcode Models (GS1), create a Barcode Model (GS1), then:

  1. set Description, Type, the GTIN Source Type and Source No. the model is built for, and Default if it is the fallback model;
  2. in the lines, add one row per AI Code to include in the barcode;
  3. set Status to Released. A model that carries AI 02 must also carry AI 37, otherwise it stays Open.
A barcode model with the application identifiers that make it up and the source of each value
A barcode model with the application identifiers that make it up and the source of each value

6. Daily use

6.1 Encode a GS1-128 for a document

  1. Open the Barcode Model (GS1) of a Released model.
  2. Choose Encode GS1 128 and pick the source line (a sales order line, for a customer or source-group model).
  3. The app reads the item, GTIN, lot, dates, weights and quantities from that line and returns the full GS1-128 string, ready for a label or downstream use.

The same build is one action away on Barcode Buffers (GS1): there Encode GS1 128 asks for the model and the document line and writes the value into the scan's Barcode field, so a reading can be tried without a device. It is the same value the model card shows in a message.

The value built by the model on the data of a document line, written in the scan's Barcode field
The value built by the model on the data of a document line, written in the scan's Barcode field
A value the document carries and the identifier cannot hold stops the encoding: the app says which value it is, how long it is and how much the identifier takes, so you can shorten it or leave that identifier out of the model. A value that comes out empty under an identifier of fixed length is left out of the barcode instead of being written as zeros.

Two details of that string, both as the GS1 general specifications require them. A fixed length numeric value is padded with leading zeros up to the length its format declares, so a net weight of 15.5 kg under AI 3103, whose format is N4+N6, is written 015500 and not 15500. And the separator that closes a variable length value stands only between two identifiers: after the last one there is nothing left to delimit, so none is written. Labels printed with earlier versions of the app may show those weights without the leading zeros, or a separator hanging after the last value: the string changes, the data behind it does not, and a scanner reads the new one as the standard prescribes.

6.2 Print a Zebra GS1 label

When AL Zebra Print Label prints a label whose tag matches the Zebra Label GS1 Tag Code, AL GS1 expands it into one tag per application identifier, as a value and as a barcode, so a single template prints every identifier of the model.

Two things decide whether what comes out of the printer is a compliant GS1-128, and neither of them is in this app: they are in the template.

  • The barcode field has to be in the plain mode, the one that prints the data as given. The value this app builds already opens with everything a GS1-128 needs, including the character that tells a reader to parse identifiers at all, and the plain mode is the only one that reads it: the automatic mode prints those characters instead of acting on them, and the GS1-128 mode adds the opening character by itself but cuts the value short at the first greater than sign, so it cannot carry a lot or a serial that contains one. Measured on rendered labels, not assumed. Nothing is placed in front of the value in the field either: a request for the numeric subset of the symbology, which looks right because a GS1 value is mostly digits, loses characters around a lot or a serial that contains a greater than sign.
  • The plain mode costs width, and on a four inch label an ordinary set of identifiers does not fit. In that mode the symbol keeps one character per character instead of packing two digits together, so a GS1 value comes out about twice as wide. Measured, with the narrowest module the standard allows: a GTIN, a lot of nine characters and a net weight make a symbol 121 mm wide including its quiet zones, against a label of 101.6 mm. What fits is about thirty one characters of value, counting the identifiers themselves, the separators and the opening character, which is a GTIN and a net weight and almost nothing else.
  • A finer printer is not a way out of that width. The minimum module the standard allows grows with the resolution, so the symbol keeps the same physical width on any machine: it is a limit of the encoding, not of the device. The ways out are a wider label, fewer identifiers in one symbol, or the one below.
  • A tag carries the value, and the template writes the identifier. The identifier is in the name of the tag, not in what the tag holds, so a field that has to be read as a GS1-128 is written as the identifier and then the tag, as many times as there are identifiers in it. The character that marks a GS1-128 is written by whoever writes the field, and this is the part that is easy to forget: it goes at the very beginning, before the first identifier, with nothing in front of it. It is not in a tag, because a tag cannot know what is written before it, and it would land between an identifier and its value. A field left without it prints a symbol that a reader hands over without complaining and that is not a GS1-128 at all, so nothing downstream recognises the identifiers. The whole value is the other way round: it begins with its first identifier, so this app writes that character itself and a field that holds it alone needs nothing added.
  • A tag of an identifier that wants the separator ends with one, so that another identifier can follow it in the same field. Which identifiers want it is not a matter of their length: GS1 names a closed list of identifiers of pre-defined length, and every other one wants the separator even when its format is of fixed length, the country of origin in three digits among them. The app takes that from the identifier table, where it arrives with the GS1 sheet. Whether another identifier does follow is instead a property of the field and not of the identifier, and only whoever writes the field knows it, so there is a second form for the identifier after which nothing follows there: the same tag with _ENDS_FIELD after it, which closes nothing. It exists for every identifier, so that a template never has to know which ones want a separator. On a small label, where a single symbol does not fit, a template prints one symbol per identifier, and each of those fields ends with its identifier, so each of them wants that second form.
  • Two tags carry a whole field instead of a piece of one, for the label that needs more than one barcode. <GS1_SSCC_FIELD> carries the pallet and <GS1_OTHER_AIS_FIELD> everything else: each of them is already a complete field, that is the opening character, the identifiers, the values and the separators where they belong, with none at the end. Nothing is written in front of them, unlike every other tag, and the _FIELD suffix is there to mark exactly that difference. A tag is absent when the label carries nothing on that side: a label without a pallet has no field for one.
  • The partition between the pallet and the rest is ours, not the standard's. It is the one an ordinary logistic label uses, where the pallet is the only datum GS1 makes mandatory and the recommendation for everything else is to concatenate it to save room. But GS1 fixes which identifiers have to appear on the physical entity, never how they are spread over the symbols of a label: that is decided by the label's layout, and any other grouping is composed as before, with the tags of one identifier each. Inside a whole field the identifiers come in the order of their code, which can differ from the order of the whole value: no rule fixes the order inside a symbol and a reader hands them over by identifier, but whoever compares a symbol with the human readable line of the same label notices it.
  • The barcode field must not declare the hexadecimal indicator with its default escape character, the underscore. That character is one of the eighty two GS1 allows inside a variable length value, so a lot or a serial that carries one would be eaten by the printer instead of being printed. A declared escape character outside those eighty two, such as the backslash, is harmless.

The two tags of one identifier are not interchangeable, and a template has to use the right one for the field: the plain tag is the value as a person reads it, and the one that ends in _BARCODE is the same value written the way the printer reads one, which is not the same text.

If the GS1 value of a label cannot be split into its identifiers, the label is not printed and the app says which identifier it stopped on and what that identifier was carrying. A value that cannot be split was built wrong, and it is corrected where it is built: a label printed with the remaining fields missing would be noticed days later, in another warehouse.

6.3 Scanning onto a document

Point the scanner at the GS1 label of the goods on the line you are working on, in a shipment or in a receipt. The line takes what the label carries:

  • the item, resolved from the GTIN of the label and from its source, so a supplier code and a customer code both land on the right item;
  • the lot and the serial number;
  • the pallet, from the SSCC, which keeps together the pieces that travelled together;
  • the net or gross weight, which labels carry in kilograms (310x and 330x) or in pounds (320x and 340x) and which is written in the unit the company weighs in, so a label in pounds reads correctly where the weighing is in kilograms and the other way round;
  • the dates the label declares: expiry, best before, production, packaging and sell by, each read from its own identifier. Traceability keeps one expiry date, and a label that carries the best before date and not the expiry date fills it with the best before.

If the label carries something that cannot be read, the scan stops. A date that is not a date, a number that is not a number: the app refuses the scan and says which identifier it stopped on and what it was carrying, instead of writing on the document a value nobody checked. So an empty date on a scan that went through means one thing only: the label did not carry that date.

A refused scan keeps the reason on itself: the identifier it stopped on and the value the label carried
A refused scan keeps the reason on itself: the identifier it stopped on and the value the label carried
If instead the label carries a piece that no identifier of the company accounts for, the scan is not refused. It happens with a supplier that writes its own data in the identifiers 91 to 99, and with any identifier simply missing from the identifier table, which is filled by hand: neither of the two is a damaged label. What the label carries is read, the piece that cannot be read is skipped up to the next separator and the reading starts again after it, so a weight or a date that follows that piece arrives all the same. The scan says which piece it could not read, in its message on the scans page, and the place to look is the identifier table. One case cannot be recovered: a piece with no separator after it ends the reading, because nothing says where it stops, and there too the message names it.
Captured scans with the resolved item, lot, weight and SSCC, and the linked document line
Captured scans with the resolved item, lot, weight and SSCC, and the linked document line
Decode Barcode on a scan opens the label split into its application identifiers, each with the value as it stands on the label and, where the identifier declares one, the number or the date it means.
A scanned barcode split into its application identifiers, with the number or the date each one declares
A scanned barcode split into its application identifiers, with the number or the date each one declares

6.4 Reading the results

  • Barcode Buffers (GS1) shows the scans, each one opening on the item and how much of it there is, with the lot, the weights, the pallet, the dates and the document line it belongs to. The page starts on the columns a scan is read by; the rest are available from Personalize.
  • Operation Log (GS1) keeps a row every time a handheld undoes a scan, with what the handheld reported as removed: it is the place to look when an operator undid something on the floor. A refusal is not kept here: a refused scan carries its message on itself, on Barcode Buffers (GS1).
  • On a sales order line the Has Logistic Error column marks the lines the log holds an error row for, that is a scan a handheld undid reporting what it removed, and opens those rows. It is off by default: show it from Personalize on the lines of the order.
  • GTIN List (GS1) lists every generated GTIN and SSCC with its barcode type and progressive.

7. Where to find it

The app is reachable four ways:

  • Tell Me (the magnifier): search the page name, or "GS1" to see them all - Setup (GS1), Application Identifiers (GS1), Barcode Source Groups (GS1), GTIN Sources (GS1), Barcode Models (GS1), Barcode Buffers (GS1), GTIN List (GS1), Operation Log (GS1), Users (GS1).
  • Shipping and Receiving role center, the one of the warehouse: the GS1 group, with the pages of the daily work first - Barcode Buffers, GTIN List, Operation Log - and the Setup subgroup at the bottom.
  • AppLibra hub: Shift+F12 -> Explore other roles -> AppLibra; the GS1 group gathers all the pages of the app, and Setup (GS1) also appears in the shared Setup section.
  • Manual Setup: the "AL GS1 Setup" entry in the Business Central manual setup list.

On the Item, Customer and Vendor cards you also find the Barcode group and the GTIN Sources (GS1) action.

The actions towards the setup are shown to everyone the role center is shown to: an operator who holds the user role and opens one of them is refused by Business Central, because the configuration belongs to the administrator role.

8. Tips and troubleshooting

  • A scan was refused. The label carried a value the app could not read, or an identifier the master does not know. The message names the identifier and the value, and the scan keeps it on Barcode Buffers (GS1), where the refusal stays readable. Nothing of that scan was written on the document, so the line is as it was before.
  • The application identifier list is empty. A new installation starts empty: import the AI list from Setup (GS1) (see 3.3). Until then a scan stops on the first identifier it meets.
  • A column you expect is not on the page. The pages of the app open on the columns the work is read by; the others are there, from Personalize. The Has Logistic Error column of the sales order lines is off by default.
  • SSCC will not generate. The GS1 Prefix must be exactly 7 or 9 characters and SSCC Nos. must be a whole-number series.
  • A model stays Open. A model that includes AI 02 (packaging GTIN) must also include AI 37 (count of items); add the line before releasing.
  • Encode does nothing. Only a Released model encodes, and it must have at least one line; the barcode is built from the picked document line, so that line must carry the values (item, lot, weights).
  • "The ITF-14 ... of accounting type Fixed Quantity ... could not be found". A GTIN source belongs to an accounting type, and the one the encode looks for is the accounting type of the document line, not the one on the item card. A line counts as variable weight only while an app that handles catch weight says so: with no such app installed every line is read as fixed quantity, and an item whose GTIN sources were all created as variable weight has none the encode can use. Add the source for the accounting type the line actually has.
  • Duplicate GTIN error. A GTIN must be unique for the same source, item, unit of measure, variant, barcode and accounting type; reuse the existing row instead of adding a second one.
  • A blocked item. Blocking an item disables its GTIN sources (supplier sources excepted), so it no longer resolves in encode or scan.
  • A scan is refused because the document number is not the one of the document. The label carries the document number on application identifier 400, and the check in Setup (GS1) compares it with the External Document No. of the document being scanned. The message names both numbers: scan the label on the document it belongs to, or turn Check External Document No. off. The check only speaks when both numbers are there, so a label without that identifier is never refused for this reason.
  • "The weight on the barcode cannot be converted". The company weight unit must be a kilogram or a pound, recognized by its International Standard Code (KGM or LBR) or, when that is blank, by the code KG or LB. Fill in the International Standard Code on the unit named in the message; the same unit is used when a label is printed, so the weights on the label are converted too.

9. Support and resources