Switch To Transalis
EDI Explained · Section 05

EDIFACT and EANCOM explained: structure, messages and examples

A plain guide to the EDIFACT standard and its retail subset EANCOM, with a real purchase order explained segment by segment.

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.

Example EDIFACT purchase order
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.

The example purchase order, segment by segment
SegmentNameWhat it tells us
UNBInterchange headerThe sender, recipient, transmission date, time and interchange reference.
UNHMessage headerThis is an EDIFACT ORDERS purchase order, using directory D.96A.
BGMBeginning of messageThe original purchase order PO123456.
DTMDate/time/periodThe order date: 25 November 2026.
DTMDate/time/periodThe requested delivery date: 1 December 2026.
NADName and addressThe buyer.
NADName and addressThe supplier.
CUXCurrenciesThe order is in British pounds (GBP).
LINLine itemThe first product, by the supplier's product code.
IMDItem descriptionThe product: Bottled Water 500ml.
QTYQuantityAn ordered quantity of 100 individual units.
PRIPrice detailsA net unit price of £0.50.
UNSSection controlSeparates the order detail from the summary.
CNTControl totalThe order contains one line item.
UNTMessage trailerThe message contains 14 segments, including UNH and UNT.
UNZInterchange trailerThe interchange contains one message, and closes it.

What does the purchase order mean in plain English?

The example purchase order in plain English
FieldValue
Purchase orderPO123456
BuyerBUYER001
SupplierSUPPLIER001
Order date25 November 2026
Requested delivery1 December 2026
ProductBottled Water 500ml (product code PRODUCT001)
Quantity100 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.

QTY+21:100:PCE'
  • QTYSegment tag
  • +Data element separator
  • 21Ordered quantity (qualifier 21)
  • :Component data element separator
  • 100100 units
  • PCEUnit: pieces
  • 'Segment terminator
The EDIFACT segment QTY+21:100:PCE explained part by part

So QTY+21:100:PCE' reads: quantity, of type ordered (21), 100, in pieces, end of segment.

Which EDIFACT messages do UK suppliers use?

Common EDIFACT messages for UK suppliers
MessageDocument
ORDERSPurchase order
ORDRSPOrder response
DESADVDespatch advice (ASN)
INVOICInvoice
REMADVRemittance advice
PRICATPrice and product catalogue
SLSRPTSales report
INVRPTInventory 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.

FAQs

Frequently asked questions

What does EDIFACT stand for?

EDIFACT stands for Electronic Data Interchange for Administration, Commerce and Transport, the United Nations EDI standard.

Is EANCOM the same as EDIFACT?

EANCOM is a subset of EDIFACT, maintained by GS1 for retail. Every EANCOM message is a valid EDIFACT message.

What is a segment in EDIFACT?

A segment is one line of an EDIFACT message. It starts with a three-letter tag, such as QTY for quantity, and ends with an apostrophe.

What do the + and : characters mean in EDIFACT?

The plus sign separates data elements, the colon separates the components inside an element, and the apostrophe ends the segment.

What is the difference between UNB and UNH?

UNB opens the whole interchange, the envelope that can hold several messages. UNH opens one message inside it, such as one purchase order.

What is D.96A in EDIFACT?

D.96A is the EDIFACT directory version, released in 1996. It is still one of the most widely used versions in retail EDI.

Want this working in your business?

We will look at how you trade today and show you what moving to Transalis involves, while your business keeps trading.