Generating GS1-128 barcodes
GS1-128 was defined to provide a global standard for information interchange throughout the supply chain. It is represented in the form of one or more barcode symbols encoding data containing information about goods being shipped, such as global unique identifiers, quantities, weights, expiration dates and much more.
GS1-128 is not a barcode symbology, rather it is a set of Application Identifiers (AI) that define specific bits of information and contexts.
Once the information has been defined, it is encoded using the Code 128 barcode symbology. A special character (FNC1) is used at the top of each GS1-128 barcode symbol and as a terminator character for variable length AIs.
1 – GS1-128 and Labeljoy
Labeljoy (when in Full or Trial mode) can generate GS1-128 barcodes and takes care behind the scenes of most of the hassles associated with generating a fully compliant GS1-128 barcode symbol.
- Simplified data enter
Just enter the AI sequence in the readable format and Labeljoy will validate it through its internal GS1-128 engine, will generate the corresponding symbol, or will display an error message indicating what the problem is.
- Modulo 10 check digit generation
When an AI requires a check digit, just enter any number: Labeljoy will replace it with the proper modulo-10 check digit.
- AI sequence validator
AI concatenation is subject to comply with certain rules. For example, when using AI 02 (Number of containers) the symbol should also encode AI 00 (Serial Shipping Container Code) or AI 37 (Number of Units Contained). Labeljoy will optionally check if the AI sequence entered is fully compliant.
- FNC1 management
The FNC1 special character is added automatically wherever it’s needed.
Basically all you are required to do is inputting your AI sequence and data. For example, by entering the text (00)123456789012345678 Labeljoy will create a GS1-128 barcode symbol that will comply with Application Identifier (00) Serial Shipping Container Code (SSCC-18).
GS1-128 symbol generated by Labeljoy encoding the text (00)123456789012345678, which corresponds to AI 00 (SSCC-18).
Note that the last digit in the symbol is 5 (not 8) since it’s the correct modulo 10 check digit.
2 – Create an SSCC-18 barcode
Let’s start by creating a new label that will contain an SSCC-18 (Serial Shipping Container Code) barcode, which corresponds to AI 00 in GS1.In order to create this type of barcode we need to have the following information at hand:
- The GS1 company prefix. This information is issued by the local GS1 authority. Its length may vary from 7 to 10 digits.
- The serial number. This information can be any number and its length may be between 6 and 9 digits long.
As the name states, the SSCC-18 symbol contains 18 digits organized as follows:
- Prefix: 1 digit, free use. Can be used to extend the serial number.
- The GS1 company prefix: 7 to 10 digits.
- The serial number: 6 to 9 digits, depending on the length of the GS1 company prefix.
- Check digit: modulo-10 checksum, 1 digit.
In this example we’ll pretend that our GS1 company prefix is the following 8-digit number: 12345678. And our shipping serial number is 4567.
To turn this information into a valid SSCC-18 barcode, this is what we need to enter in Labeljoy:
- (00): The SSCC-18 Application identifier.
- 0: Prefix (we don’t need to extend the serial number).
- 12345678: Our GS1 company prefix.
- 00004567: Our serial number. We need to zero-pad this number since we need to fill all of 18 digits of the SSCC-18.
- 0: The check digit. We’ll just enter zero and let Labeljoy calculate it for us.
The resulting text we’ll enter into Labeljoy is: (00)012345678000045670:
And this is the corresponding barcode symbol generated:
As you can see, the last digit is now 8 since it’s the correct modulo-10 check digit.
Also note that the option Check AI sequence is disabled since this particular AI can be independent from all others. Had we switched it on, it would have made no difference
3 – The Global Trade Item Number (GTIN)
The GTIN is a number that uniquely identifies a product throughout the world. In the GS1 system it corresponds to AI 01.
It is made up of 14 digits where the last one is the check digit.
Basically it is the GS1 version of your product global identifier, whether it is in the EAN-13, UPC-A, UPC-E, EAN-8 or ITF-14 format. Again, it is issued by local trading authorities, which vary from country to country.
For example, if you are in North America your product is most likely globally identified by a UPC-A number which is 12 digits long. To convert this information into the GS1 version, simply prefix that number with two zeros. If you are in Europe, your product is identified through a unique EAN-13 number. In this case you’ll need to add a single zero at the top to turn it into a GTIN compliant number.
Note that zero-prefixing your existing identifier won’t affect the modulo-10 check digit. Labeljoy will check it for you anyway, but most likely it won’t change it.
In this example we’ll pretend that we are a European company and our product has been issued the following EAN-13 global identifier: 2003659821451.
We’ll turn this into a GTIN number by adding the proper AI and by prefixing the number with a zero to get to the correct number of digits: (01)02003659821451.
Now, if you enter this number into Labeljoy while the option Check AI sequence is enabled, this is what you’ll get:
Labeljoy detected that this particular AI cannot live a life of its own, since it would have no meaning in the GS1 world. AI 01 was conceived to be coupled with at least another AI that contains additional information about this particular item.
For example we might want to add information about weight, or dimensions, or simply the amount of items we are shipping.
Let’s go ahead then and add AI 30 (Count of items), which specifies the number of items included in the shipping unit.
We’ll pretend that we are shipping 1,200 pieces of our product.
Since AI 30 is variable length, we don’t need to zero-pad it. The text we’ll enter will become:
What we’re saying in the GS1 language is: This shipping unit contains 1,200 pieces of EAN-13 item 2003659821451.
Labeljoy validates our text, sees no problems with it and generates the following barcode symbol:
4 – A real world example
Let’s now build a real logistic label by following the guidelines described by GS1 in this Standard International Logistic Label document.
We’ll start by setting up Labeljoy to create a 105 by 148 mm label (as indicated on the GS1 document on page 24):
Note that the page size is a bit larger to leave room for some margins. The layout needs to be created by taking into account your printer and paper requirements.
We’ll now add all the elements to mimic the logistic label found on page 14 of the GS1 document:
This is a typical GS1-128 logistic label containing three groups of information: supplier, customer and carrier.
The top section contains shipping information, the middle section the human readable data and the lower section the barcode symbols.
5 – Connecting data
If the data to be represented on your GS1 label resides in a data source of some kind (an Excel or Access file, SQL server, MySQL, etc) you need to connect your Labeljoy file to the data source and connect each element to the underline set of data. Please refer to this video tutorial to find out all the details.
For our example we’ll use an Excel file:
Also, not all the information we need on our label is ready to be added to the elements, some of it needs to be computed by concatenating existing elements. We’ll see how we can do that in Labeljoy.
But first let’s link our label to the data source. We might use the Data wizard as well, but for the time being we’ll setup the connection manually by bringing up the Group settings form:
Once the data has been loaded, the Filter and sorting tab should show a grid with the fields and the data read from the Excel file:
As we confirm the data linking changes we just made, the page buttons in the top toolbar become active. We have a single label per page and since our data source contains 7 rows, Labeljoy enables you to scroll through 7 pages, 1 row per page.
Now we need to link each variable element on the label to the proper field in the data source.
Let’s start with the large ZIP field in the top-right area:
As you can see, by clicking the Field button a menu is shown with the list of available fields. In this case we need to concatenate the Prefix and the Zip code fields, by selecting them both, one after the other:
Now let’s work on the destination address. The sender’s address will remain untouched, since it’s always the same company shipping out, we can leave the From field in its static form.
The To field needs to be concatenated as follows:
Note the dash sign between the fields Prefix and Zip code and also the space between Zip code and City.
The fields Carrier, order number and Gross weight can be directly linked to the corresponding fields in the data source, no additional concatenation is required.
The field Delivery date needs special attention: we need to also define the format through which the date will be displayed. As stated on the logistic label, this date must be in the format YYYY-MM-DD. Labeljoy enables us to define special formatting for each field added to the element.
Double-click the Delivery date element, link it to the Delivery date field and click on the link in the text box to bring up the Field modification form:
Select the Quantity field from the drop down:
As you can see, we have entered the proper date format in the Format text box. This will instruct Labeljoy to display the date in that particular format.
Moving on, the Ship to post field is the concatenation of the ISO 3366 and the Zip code fields.
The same concatenation must be entered in the corresponding barcode element, only we need to prefix everything with the static text (421) to instruct Labeljoy to treat it as AI 421:
The SSCC text element must concatenate the static text 0 (Prefix) 3453128 (a 7-digit made up company identifier), the value read from the field SSCC and manage the check digit.
Now, since prefix + Company identifier + Check digit sum up to a total of 9 digits, we need to ensure that the SSCC value read from the data source gets zero-padded properly so that the total number of digit is always 18.
Double click the SSCC text element and enter the static text 03453128. Now click on the Field button and select the SSCC field. Finally, click the Reference button and select the Modulo-10 Checksum reference.
Now click the SSCC grey field to bring up its properties form. In the Format field enter 000000000 (9 zero’s). This way Labeljoy will zero-pad each value until it gets to a total of 9 digits. This will also properly handle the last row of the data source which happens to be made up of 5 digits instead of 4 like all the other rows.
The Modulo-10 Checksum reference adds a Modulo-10 check digit to the number sequence immediately preceding its insertion point.
For the SSCC barcode element we could do exactly the same thing. We only need to prefix everything with the text (00) to tell Labeljoy to treat this as AI 00.
For the sake of demonstration will take a slightly different approach. Since Labeljoy knows that this is a GS1-128 SSCC barcode element, we don’t need to add the Modulo-10 Checksum reference at the end of the sequence, we’ll just enter a static 0 that will be converted into the proper Modulo-10 check digit.
The final result is a 7-page job ready to be printed: