GLN, GTIN and SSCC: identifiers in EDI
Writing a company name or a product description into an EDI message is not enough. For two systems to understand each other they need shared, unique, machine-verifiable numbers. These are defined by an international body called GS1.
Telling the three numbers apart is half of understanding EDI: GLN says who, GTIN says what, and SSCC says which physical package.
GLN — Global Location Number
This 13-digit number identifies a party or a location: a company, a store, a warehouse, even a billing address.
It appears in two places. In the interchange header it names the sender and the receiver:
UNB+UNOC:3+8712345678901:14+8798765432109:14+260117:1030+REF00042'
The :14 code means "this number is a GLN". Inside the message, parties are given with the NAD segment:
NAD+SU+8712345678901::9++ACME FOODS BV'
Here ::9 says the number was assigned under the GS1 standard.
In practice, GLN matching decides whether a message is accepted at all. Your partner recognises you by your GLN; send a message with a GLN that is not registered in their system and you are rejected, however perfect the content.
GTIN — Global Trade Item Number
This identifies the product. The barcode (EAN-13) on an item you buy in a shop is a GTIN. In EDI it travels in the LIN segment:
LIN+1++5410013101234:EN'
The EN qualifier marks the number as an EAN/GTIN.
A frequent mistake here is putting your own internal stock code where the GTIN belongs. The internal code has its own place — the PIA segment, with the right qualifier:
PIA+1+B-2002:IN'
IN means the buyer's item number, SA the supplier's. Putting an internal code in the GTIN field leaves your partner unable to recognise the product, and the line is rejected.
SSCC — Serial Shipping Container Code
This 18-digit number identifies a physical shipping unit: one particular pallet, one particular carton. Unlike a GTIN it does not describe a product type but that single object. A thousand pallets of the same product carry a thousand different SSCCs.
It travels in the GIN segment of a despatch advice:
GIN+BJ+340123456789012345'
The value of the SSCC becomes clear in the warehouse. When the pallet arrives its label is scanned; because the system already received that number in the DESADV, it instantly knows the contents. Counting boxes one by one becomes unnecessary.
An SSCC must not be reused. The GS1 rule is that the same number is not reissued for at least a year; otherwise the warehouse system confuses it with an earlier shipment.
The check digit
The last digit of all three numbers is a check digit calculated from the others. It catches single-digit typing errors: multiply the digits alternately by 3 and 1, add them up, and the number that rounds the sum up to the next multiple of ten is the check digit.
If a number was mistyped, the check digit will not match and many systems reject the message before even looking at the content. When a GLN or GTIN is being rejected persistently, this is the first thing to check.
Summary
| Number | Length | Identifies | Where in EDI |
|---|---|---|---|
| GLN | 13 | A party or location | UNB, NAD |
| GTIN | 8-14 | A product type | LIN |
| SSCC | 18 | One pallet or carton | GIN |