UN/EDIFACT Global Supply-Chain, Retail & Logistics Engineering Hub
Clean-room engineering guide to public UNECE UN/EDIFACT directories (D.96A, D.01B, EANCOM), covering UNA delimiter declarations, ? release-character escaping, and segment group (SG) state machines.
UN/EDIFACT Envelope & UNA Delimiter Architecture
Unlike ASC X12's 106-byte fixed-width ISA header, UN/EDIFACT declares its 6 syntax characters inside an optional 9-byte UNA Service String Advice immediately preceding UNB:
UNA:+.? '
UNB+UNOC:3+5412345000013:14+4012345000094:14+261112:1430+00004819'
UNH+1+ORDERS:D:96A:UN:EAN008'
BGM+220+PO-2026-9941+9'
DTM+137:20261112:102'
... [SG2 NAD Parties & SG25 LIN Items] ...
UNS+S'
CNT+2:14'
UNT+38+1' <-- UNT-01 (38) counts UNH..UNT inclusive; UNT-02 matches UNH-01
UNZ+1+00004819' <-- UNZ-01 (1) counts messages/groups; UNZ-02 matches UNB-05
Core UN/EDIFACT Message Reference Guides
UNA, UNB, UNH, UNT & UNZ Envelopes →
Exact 9-byte UNA offsets, ? release escaping rules (?', ?+, ?:, ??), and trailer counters.
ProcurementORDERS Purchase Order →
BGM+220 headers, SG2 NAD GLN parties, SG25 LIN/PIA/IMD/QTY/PRI lines, and UNS+S summary.
Order ConfirmationORDRSP Order Response →
BGM+231 confirmations, line action codes (accepted, amended, rejected), and DTM delivery updates.
Shipping / ASNDESADV Despatch Advice →
SG10 CPS hierarchical pallet/carton sequences, PAC/PCI/GIN SSCC-18 barcodes, and SG17 LIN items.
AP / VAT InvoicingINVOIC Commercial Invoice →
SG26 LIN invoice lines, ALC allowances, MOA+77/79/125/176 totals, and TAX/VAT reconciliation.
Syntax AckCONTRL Syntax & Service Report →
EDIFACT equivalent of X12 999: decoding UCI, UCM, UCS segment positions, and UCD element errors.
3PL & AutomotiveIFTMIN, IFTSTA, DELFOR & DELJIT →
Freight forwarding instructions, carrier status updates, and OEM automotive JIT schedules.
Frequently Asked Engineering Questions
Why do naive regex splitters break UN/EDIFACT files?
Because UN/EDIFACT uses ? as an escape character before ', +, and :. For example, O?'Reilly Auto Parts contains an escaped apostrophe inside free text, not a segment terminator. EdiPrism's stateful lexer handles ?? vs ?' cleanly.
Inspect, Diff, Validate & Scrub This Payload Offline in Your JetBrains IDE
Never paste regulated healthcare PHI (837/835/271) or supply-chain payloads (850/ORDERS) into browser parsers. EdiPrism X12 EDIFACT runs 100% air-gapped inside IntelliJ IDEA, PyCharm, DataGrip, Rider, GoLand, and WebStorm with a free core tier and a 14-day [Pro] trial.