The international EDI standard maintained by the United Nations
UN/EDIFACT (United Nations Electronic Data Interchange for Administration, Commerce and Transport) is the international standard for electronic business messaging. It is maintained by UN/CEFACT and published in annual versions (D96A from 1996, D01B from 2001, D10A from 2010 etc). EANCOM is the GS1 retail profile of UN/EDIFACT.
Service String Advice
The UNA segment is optional and defines the delimiter characters used in the interchange. If absent, the default delimiters apply: + for element separator, : for sub-element separator, . for decimal notation, ? for release character, space for reserved, ' for segment terminator. UNA:+.? ' is the standard default UNA.
UNA:+.? 'UNA codes, structure and exampleInterchange Header
The UNB segment opens an EDIFACT interchange. It contains the syntax identifier and version, sender identification (with qualifier), recipient identification (with qualifier), preparation date and time, and the interchange control reference. Every UNB must have a matching UNZ at the end of the interchange.
UNB+UNOA:2+9322000000456:ZZ+9311000000123:ZZ+260823:0900+CTRL-001UNB codes, structure and exampleMessage Header
The UNH segment opens an individual message within an interchange. It contains the message reference number, the message type (ORDERS, DESADV, INVOIC etc), the version (D96A, D01B etc), the controlling agency (UN or EAN), and optionally the association code (EAN008 for EANCOM). Every UNH must have a matching UNT.
UNH+1+ORDERS:D:96A:UN:EAN008UNH codes, structure and exampleSection Control
The UNS segment separates the detail section from the summary section of a message. UNS+S marks the start of the summary. Everything after UNS+S is summary-level data: total MOA segments, summary TAX segments, and the CNT line count. Line item groups must appear before UNS+S.
UNS+SUNS codes, structure and exampleMessage Trailer
The UNT segment closes an individual message and carries two values: the total number of segments in the message (including UNH and UNT) and the message reference number matching the UNH. If the segment count does not match, the message is malformed.
UNT+36+1UNT codes, structure and exampleInterchange Trailer
The UNZ segment closes an interchange and carries the number of messages in the interchange and the control reference matching the UNB. UNZ+1+CTRL-001 means one message in the interchange with control reference CTRL-001.
UNZ+1+CTRL-001UNZ codes, structure and example