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.
Copy any example below and paste it into our free EDIFACT formatter to see the formatted output and segment breakdown.
This example shows a purchase order from a retail group ordering fresh produce from a food supplier, with delivery to a distribution center:
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'
UNB - Interchange header with sender/receiver IDsBGM+220 - Beginning of message, type 220 = OrderDTM+137 - Document date (2024-02-01)DTM+2 - Requested delivery date (2024-02-08)NAD+BY - Buyer: Metro Retail Group, LondonNAD+SU - Supplier: Fresh Foods Ltd, ManchesterNAD+DP - Delivery Point: Distribution Center, LeedsThis invoice message references the order above and includes payment terms, tax information, and totals:
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'
BGM+380 - Document type 380 = InvoiceDTM+35 - Payment due date (30 days: 2024-03-10)RFF+ON - Reference to original orderRFF+DQ - Reference to delivery notePAT+1 - Payment terms: Net 30 daysMOA+79 - Total line items: £3,070.00MOA+124 - VAT amount: £0.00 (zero-rated food)MOA+77 - Invoice total: £3,070.00This despatch advice (also called ASN - Advance Shipping Notice) notifies the buyer that goods have been shipped and provides packaging details:
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'
BGM+351 - Document type 351 = Despatch AdviceDTM+11 - Despatch dateDTM+132 - Estimated arrival time: 14:00TDT+20 - Transport: Refrigerated Truck ABC123CPS+1 - Package 1: 12 cartons of ApplesCPS+2 - Package 2: 8 cartons of BananasCPS+3 - Package 3: 10 cartons of OrangesGIN+BJ - SSCC barcode for trackingUse our free online tool to instantly format, view, and analyze your EDIFACT and EDI messages.
Open EDIFACT Formatter →