EDIFACT Examples: Real Message Samples with Explanations

Below are real-world EDIFACT message examples covering the most common business scenarios: purchase orders (ORDERS), invoices (INVOIC), and despatch advice (DESADV). Each example includes detailed explanations of the key segments.

Try These Examples

Copy any example below and paste it into our free EDIFACT formatter to see the formatted output and segment breakdown.

1. EDIFACT ORDERS Example (Purchase Order)

This example shows a purchase order from a retail group ordering fresh produce from a food supplier, with delivery to a distribution center:

EDIFACT ORDERS - Fresh Produce Order
UNB+UNOA:2+RETAILER:ZZ+SUPPLIER:ZZ+240201:0900+000001'
UNH+1+ORDERS:D:96A:UN'
BGM+220+ORD-2024-00123+9'
DTM+137:20240201:102'
DTM+2:20240208:102'
RFF+ADE:CONTRACT2024'
NAD+BY+5412345678908::9++Metro Retail Group+100 Commerce Street+London++EC1A 1BB+GB'
NAD+SU+4012345000001::9++Fresh Foods Ltd+50 Supplier Road+Manchester++M1 1AA+GB'
NAD+DP+5412345678915::9++Distribution Center North+Warehouse Lane+Leeds++LS1 1AB+GB'
CUX+2:GBP:9'
LIN+1++5901234123457:EN'
PIA+1+FF-APPLE-001:SA'
IMD+F++:::Fresh Apples - Royal Gala 1kg'
QTY+21:500:KGM'
PRI+AAA:2.50:CA'
LIN+2++5901234123464:EN'
PIA+1+FF-BANANA-001:SA'
IMD+F++:::Bananas - Fair Trade 1kg'
QTY+21:300:KGM'
PRI+AAA:1.80:CA'
LIN+3++5901234123471:EN'
PIA+1+FF-ORANGE-001:SA'
IMD+F++:::Oranges - Valencia 1kg'
QTY+21:400:KGM'
PRI+AAA:3.20:CA'
UNS+S'
CNT+2:3'
UNT+27+1'
UNZ+1+000001'

Header Segments

  • UNB - Interchange header with sender/receiver IDs
  • BGM+220 - Beginning of message, type 220 = Order
  • DTM+137 - Document date (2024-02-01)
  • DTM+2 - Requested delivery date (2024-02-08)

Party Information

  • NAD+BY - Buyer: Metro Retail Group, London
  • NAD+SU - Supplier: Fresh Foods Ltd, Manchester
  • NAD+DP - Delivery Point: Distribution Center, Leeds

Line Items

  • Line 1: 500kg Fresh Apples @ £2.50/kg = £1,250
  • Line 2: 300kg Bananas @ £1.80/kg = £540
  • Line 3: 400kg Oranges @ £3.20/kg = £1,280

2. EDIFACT INVOIC Example (Invoice)

This invoice message references the order above and includes payment terms, tax information, and totals:

EDIFACT INVOIC - Invoice for Order
UNB+UNOA:2+SUPPLIER:ZZ+RETAILER:ZZ+240210:1430+000002'
UNH+1+INVOIC:D:96A:UN'
BGM+380+INV-2024-00456+9'
DTM+137:20240210:102'
DTM+35:20240310:102'
RFF+ON:ORD-2024-00123'
RFF+DQ:DEL-2024-00789'
NAD+SU+4012345000001::9++Fresh Foods Ltd+50 Supplier Road+Manchester++M1 1AA+GB'
NAD+BY+5412345678908::9++Metro Retail Group+100 Commerce Street+London++EC1A 1BB+GB'
NAD+IV+5412345678922::9++Metro Accounts Payable+Finance Building+London++EC1A 2CC+GB'
CUX+2:GBP:4'
PAT+1++5:3:D:30'
LIN+1++5901234123457:EN'
QTY+47:500:KGM'
MOA+203:1250.00:GBP'
PRI+AAA:2.50:CA'
TAX+7+VAT+++:::0+Y'
LIN+2++5901234123464:EN'
QTY+47:300:KGM'
MOA+203:540.00:GBP'
PRI+AAA:1.80:CA'
TAX+7+VAT+++:::0+Y'
LIN+3++5901234123471:EN'
QTY+47:400:KGM'
MOA+203:1280.00:GBP'
PRI+AAA:3.20:CA'
TAX+7+VAT+++:::0+Y'
UNS+S'
MOA+79:3070.00:GBP'
MOA+124:0.00:GBP'
MOA+77:3070.00:GBP'
UNT+33+1'
UNZ+1+000002'

Key Segments

  • BGM+380 - Document type 380 = Invoice
  • DTM+35 - Payment due date (30 days: 2024-03-10)
  • RFF+ON - Reference to original order
  • RFF+DQ - Reference to delivery note
  • PAT+1 - Payment terms: Net 30 days

Summary Amounts

  • MOA+79 - Total line items: £3,070.00
  • MOA+124 - VAT amount: £0.00 (zero-rated food)
  • MOA+77 - Invoice total: £3,070.00

3. EDIFACT DESADV Example (Despatch Advice)

This despatch advice (also called ASN - Advance Shipping Notice) notifies the buyer that goods have been shipped and provides packaging details:

EDIFACT DESADV - Shipping Notification
UNB+UNOA:2+SUPPLIER:ZZ+RETAILER:ZZ+240208:0600+000003'
UNH+1+DESADV:D:96A:UN'
BGM+351+DEL-2024-00789+9'
DTM+137:20240208:102'
DTM+11:20240208:102'
DTM+132:20240208:1400:203'
RFF+ON:ORD-2024-00123'
NAD+SU+4012345000001::9++Fresh Foods Ltd'
NAD+BY+5412345678908::9++Metro Retail Group'
NAD+DP+5412345678915::9++Distribution Center North'
TDT+20++31++++:::Refrigerated Truck ABC123'
CPS+1'
PAC+12++CT'
PCI+33E'
GIN+BJ+SSCC12345678901234567890'
LIN+1++5901234123457:EN'
QTY+12:500:KGM'
CPS+2'
PAC+8++CT'
LIN+2++5901234123464:EN'
QTY+12:300:KGM'
CPS+3'
PAC+10++CT'
LIN+3++5901234123471:EN'
QTY+12:400:KGM'
UNT+27+1'
UNZ+1+000003'

Shipment Information

  • BGM+351 - Document type 351 = Despatch Advice
  • DTM+11 - Despatch date
  • DTM+132 - Estimated arrival time: 14:00
  • TDT+20 - Transport: Refrigerated Truck ABC123

Packaging Hierarchy (CPS)

  • CPS+1 - Package 1: 12 cartons of Apples
  • CPS+2 - Package 2: 8 cartons of Bananas
  • CPS+3 - Package 3: 10 cartons of Oranges
  • GIN+BJ - SSCC barcode for tracking

More EDIFACT Resources

Related Resources

Ready to Format Your EDIFACT Files?

Use our free online tool to instantly format, view, and analyze your EDIFACT and EDI messages.

Open EDIFACT Formatter →