Short answer
EDIFACT is the United Nations standard for EDI documents, used worldwide and most widely in Europe. Each message is built from segments such as BGM, DTM and QTY, and EANCOM is the GS1 subset of EDIFACT that retailers and their suppliers use.
What is EDIFACT?
EDIFACT (Electronic Data Interchange for Administration, Commerce and Transport) is the international EDI standard maintained by the United Nations. It defines the messages companies exchange, such as purchase orders, despatch advice and invoices, and the exact structure of each one.
What does an EDIFACT purchase order look like?
Here is an anonymised EDIFACT purchase order (ORDERS) for 100 bottles of water.
UNB+UNOC:3+BUYER001+SUPPLIER001+261125:1000+000001'UNH+1+ORDERS:D:96A:UN'BGM+220+PO123456+9'DTM+137:20261125:102'DTM+2:20261201:102'NAD+BY+BUYER001::92'NAD+SU+SUPPLIER001::92'CUX+2:GBP:9'LIN+1++PRODUCT001:SA'IMD+F++:::Bottled Water 500ml'QTY+21:100:PCE'PRI+AAA:0.50'UNS+S'CNT+2:1'UNT+14+1'UNZ+1+000001'
How is an EDIFACT message structured?
Each line is a segment. The three-letter tag at the start says what the segment holds.
| Segment | Name | What it tells us |
|---|---|---|
| UNB | Interchange header | The sender, recipient, transmission date, time and interchange reference. |
| UNH | Message header | This is an EDIFACT ORDERS purchase order, using directory D.96A. |
| BGM | Beginning of message | The original purchase order PO123456. |
| DTM | Date/time/period | The order date: 25 November 2026. |
| DTM | Date/time/period | The requested delivery date: 1 December 2026. |
| NAD | Name and address | The buyer. |
| NAD | Name and address | The supplier. |
| CUX | Currencies | The order is in British pounds (GBP). |
| LIN | Line item | The first product, by the supplier's product code. |
| IMD | Item description | The product: Bottled Water 500ml. |
| QTY | Quantity | An ordered quantity of 100 individual units. |
| PRI | Price details | A net unit price of £0.50. |
| UNS | Section control | Separates the order detail from the summary. |
| CNT | Control total | The order contains one line item. |
| UNT | Message trailer | The message contains 14 segments, including UNH and UNT. |
| UNZ | Interchange trailer | The interchange contains one message, and closes it. |
What does the purchase order mean in plain English?
| Field | Value |
|---|---|
| Purchase order | PO123456 |
| Buyer | BUYER001 |
| Supplier | SUPPLIER001 |
| Order date | 25 November 2026 |
| Requested delivery | 1 December 2026 |
| Product | Bottled Water 500ml (product code PRODUCT001) |
| Quantity | 100 units |
| Unit price | £0.50 |
| Net order value | £50.00, excluding VAT and any additional charges |
How do you read EDIFACT syntax?
The quantity segment shows how every EDIFACT segment is built.
- QTYSegment tag
- +Data element separator
- 21Ordered quantity (qualifier 21)
- :Component data element separator
- 100100 units
- PCEUnit: pieces
- 'Segment terminator
So QTY+21:100:PCE' reads: quantity, of type ordered (21), 100, in pieces, end of segment.
Which EDIFACT messages do UK suppliers use?
| Message | Document |
|---|---|
| ORDERS | Purchase order |
| ORDRSP | Order response |
| DESADV | Despatch advice (ASN) |
| INVOIC | Invoice |
| REMADV | Remittance advice |
| PRICAT | Price and product catalogue |
| SLSRPT | Sales report |
| INVRPT | Inventory report |
What is EANCOM, and how does it differ from EDIFACT?
EANCOM is the GS1 subset of EDIFACT for retail and consumer goods. It keeps only the segments and codes retail trading needs, and uses GS1 identifiers such as GLNs for companies and locations and GTINs for products.
Every EANCOM message is a valid EDIFACT message, so a retailer asking for EANCOM ORDERS is asking for EDIFACT ORDERS written to the GS1 rules.
More in EDI document standards
- EDI standards explainedEDIFACT, X12, TRADACOMS, EANCOM, ODETTE, VDA, IDoc and XML side by side.
- TRADACOMSThe UK retail standard many grocers still use.
- What is a flat file?The simple file format many systems use to talk to EDI.

