EDIFACT Segments and their definitions

UNA segment

 UNA:+.? '

The UNA segment stands for the “Service String Advice” and describes the separators used in the message. Usually, the following separators are used (syntax version 3).

: Composite element delimiter

+ Data element delimiter

. Character reserved for the decimal comma

? release character (escape character)

remains empty

' Segment delimiter

UNB segment

UNB+UNOA:3+8773456789012:14+9123456789012:14+140218:1552+MSGNR4711++++++1'

The UNB segment represents the interchange header, and contains information about the message sender, the message recipient, the message date, and so on.

UNOA stands, for example, for the character set used. Examples for permitted character sets are:

UNOA = UN/ECE level A; complies with ISO 646 – also called International Alphabet No. 5 – except lowercase letters.

UNOB = UN/ECE level B; like UNOA but also lowercase letters.

UNOC = UN/ECE level C; complies with ISO8859-1

UNOD = UN/ECE level D; complies with ISO8859-2

UNOE = UN/ECE level E (Cyrillic)

UNOF = UN/ECE level F (Greek)

3 identifies the UN/EDIFACT syntax version. There are four different UN/EDIFACT syntax versions. Nowadays mostly syntax version 3 and 4 are used.

8773456789012:14 corresponds to the sender of the message.

9123456789012:14 corresponds to the recipient of the message.

The identifier 14 indicates that the number is a GLN.

140218:1552 stands for February 18, 2014, 15:52.

MSGNR4711 is the unique number of the interchange. It is used in particular in the context of message routing for the unique identification of a message transmission.

The last 1 indicates that the test indicator is set and that the given interchange is a test message. This information is also important for message routing, because the recipient can distinguish production messages from test messages and they can be processed accordingly different.

UNH segment

UNH+1+DESADV:D:96A:UN:EAN005'

The UNH segment represents the header of a document. The number 1 is the unique number of the document within the interchange. The number is assigned by the sender.

DESADV:D:96A:UN indicates that the document is a dispatch advice and that the document type is from UN/EDIFACT Directory D96A. EAN005 indicates that it is an EANCOM document type and identifies the EANCOM version of the D96A EANCOM standard used.

BGM segment

BGM+351+DOCNR4712+9'

The BGM (beginning of message) segment initiates the actual document.

351 corresponds to the concrete document subtype. Examples for permitted values ​​are:

351 = Despatch advice

35E = Returns advice (EAN Code)

YA5 = Cross dock despatch advice (EAN Code)

DOCNR4712 is the unique number of the document given by the sender.

DTM segment

DTM+137:20180218:102'
DTM+2:20180220:102'

The DTM segment is used to specify date and time information.

The first part of this composite data element identifies the type of the date (date/time/period qualifier). For example:

137 = Document/message date/time. Date/time when a document/message has been issued.

2 = Delivery date/time, requested date on which buyer requests goods to be delivered

The second part represents the actual date value:

20180218 for example, February 18, 2018.

The third part specifies the pattern for the date (date/time/period format qualifier).

102 corresponds to CCYYMMDD

NAD segment

  NAD+SU+9983083940382::9'
  NAD+BY+5332357469542::9'
  NAD+DP+3839204835454::9'

The NAD segment is used to indicate the names and addresses of the companies involved. Instead of names and addresses, however, in most cases the unique identification by means of numbers, such as the GLN (global location number), is used.

The first part of the composite data element identifies the concrete type of business partner (party qualifier). Examples for permitted values are:

BY = Buyer

DP = Delivery party

SU = Supplier

WH = Warehouse keeper

The second part represents the 13-digit GLN and 9 indicates, that the provided number is a GLN number.

CPS segment

CPS+1'

A dispatch advice is structured using the concept of consignment packing sequences. Thereby, a CPS represents a specific layer in the hierarchy of a shipment, e.g., a pallet, a box, a carton, etc.

The number 1 indicates the hierarchy level, which in this case is level 1. Further CPS sequences may then refer to the upper layer, using the second digit. For example:

CPS+2+1'

indicates consignment packing sequence 2. The parent layer is consignment packing sequence 1.

PAC segment

PAC+1++PK'

The PAC segment is used to specify the number and the type of packages. In the example above 1 packaging of type PK (package) is denoted. Other packaging types are for instance:

09 = Returnable pallet (EAN Code)

201 = Pallet ISO 1 – 1/1 EURO Pallet (EAN Code)

PK = Package

SL = Slipsheet

PCI segment

PCI+33E'

The PCI segment is used to specify markings, which are used to uniquely identify the packages in the shipment. In retail mostly SSCC (serial shipping container codes) are used.

The code 33E indicates: marked with serial shipping container code.

GIN segment

GIN+BJ+342603046212321014'

GIN stands for goods identify number and is used to specify the code, which is attached to the packaging.

LIN segment

LIN+1++4260304623843:EN'

The LIN segment represents a line item position in a dispatch advice. Thereby, 1 is the line item number assigned by the sender.

The following number 4260304623843 represents the item number. The third part EN indicates the type of number – in this case a GTIN (global trade item number) was used.

QTY segment

QTY+12:110:PCE'

The quantity segment is used for the definition of shipping quantities.

The first part of the composite data element indicates the type of quantity.

12 = Despatch quantity

21 = Ordered quantity

59 = Numbers of consumer units in the traded unit

The second part is used to provide the actual quantity – in this case 110.

The third part indicates the unit of measure in which the quantity is provided. Possible values are for instance:

PCE = Piece

KGM = Kilogram

PND = Pound

RFF segment

RFF+ON:8493848394:1'

The RFF segment is used to provide reference numbers.

ON indicates a reference to an order message. 8493848394 is the referenced order number and 1 is the position number in the referenced order message.

CNT segment

CNT+2:3'

The CNT segment is used to specify control values ​​that can be used to check the integrity of the message upon receipt.

In the example above 2 indicates, that the following value represents the number of line items in the message. The control value 3 for the number of line items is correct, since the message actually contains three line item element.

UNT segment

UNT+34+1'

The UNT segment represents the message trailer.

The first number 34 indicates the number of segments in the message from the UNH to the UNT segment and is thus also a check digit. The number 1 must be the same message number as used in the UNH segment. This also serves to check the integrity of the EDI message.

UNZ segment

UNZ+1+MSGNR4711'

The UNZ segment represents the interchange trailer and is the last segment in an EDI interchange.

The first number 1 represents the number of messages contained in the interchange. The second entry MSGNR4711 is the same interchange number as in the UNB segment and also serves to check the integrity of the message.

Leave a comment

Your email address will not be published. Required fields are marked *