EDIFACT ORDERS: The Purchase Order, Explained in Depth
ORDERS is the UN/EDIFACT Purchase Order message - the international equivalent of the X12 850. A buyer uses it to tell a supplier what to deliver: which items, in what quantities, at what prices, and by when. If you trade with European, Asian, or other international partners, ORDERS is one of the first EDIFACT messages you will encounter.
The EDIFACT envelope
Every EDIFACT interchange is wrapped in envelopes, and an ORDERS message sits inside them. From the outside in:
- UNA - an optional service string advice that declares the delimiter characters, in case they differ from the defaults.
- UNB - the interchange header, identifying sender, recipient, date, time, and a control reference.
- UNG - an optional functional group header, grouping related messages.
- UNH - the message header. This is where the message type
ORDERSand its version are named. - ... the message body ...
- UNT - the message trailer, with a segment count.
- UNE / UNZ - the group and interchange trailers.
If you want a deeper treatment of these wrappers, see our guide to the UNB and UNH envelope.
Reading the UNH version string
The UNH segment carries something X12 handles differently: an explicit version. A header like UNH+1+ORDERS:D:96A:UN reads as message reference 1, message type ORDERS, directory D, release 96A, controlling agency UN. That D:96A:UN tells the receiver exactly which dictionary of segments and codes to apply when interpreting the message. Two partners must agree on the version, because segment usage changes between releases like D96A and D01B.
The key segments of an ORDERS message
BGM - Beginning of Message
States the document type and number. BGM+220+PO-55012+9 means a purchase order (document code 220), number PO-55012, message function 9 (original). The function code matters: 9 is an original, while other codes indicate a change or cancellation.
DTM - Date/Time/Period
Dates are coded by qualifier. DTM+137:20240220:102 means document date (qualifier 137), value 2024-02-20, in format 102 (CCYYMMDD). A delivery date would use a different qualifier such as 2.
NAD - Name and Address
Identifies parties by a qualifier in the first element: NAD+BY is the buyer, NAD+SU is the supplier, NAD+DP is the delivery party. The party is frequently identified by a GLN (Global Location Number), a globally unique code for a company or location, as in NAD+BY+5412345000013::9 where 9 indicates the GS1 code list.
LIN, QTY, PRI - the line-item group
An EDIFACT line item is assembled from several segments working together. LIN+1++5410738377056:EN opens line 1 and identifies the product by EAN/GTIN. QTY+21:100 gives the quantity (qualifier 21 = ordered quantity, value 100). PRI+AAA:12.50 gives the price (qualifier AAA = calculation net, value 12.50). Reading them together yields: line 1, 100 units of this product at 12.50 each.
IMD - Item Description
A free-form or coded description that accompanies a line, such as a product name.
UNS, CNT - section control and totals
UNS separates the header and detail sections; CNT provides control totals.
A complete worked example
UNB+UNOC:3+5790001234567:14+5790007654321:14+240220:0900+REF00001' UNH+1+ORDERS:D:96A:UN' BGM+220+PO-55012+9' DTM+137:20240220:102' NAD+BY+5412345000013::9' NAD+SU+4012345000094::9' LIN+1++5410738377056:EN' IMD+F++:::WIDGET BLUE 12IN' QTY+21:100' PRI+AAA:12.50' UNS+S' CNT+2:1' UNT+11+1'
In plain English: the buyer (GLN 5412345000013) placed order PO-55012 on 2024-02-20 with the supplier (GLN 4012345000094), for 100 blue 12-inch widgets at 12.50 each.
Common pitfalls when reading ORDERS
- Forgetting the release character. EDIFACT uses
?to escape delimiters.?+is a literal plus, not a separator. Misreading this corrupts the parse. - Treating components as elements. The colon separates components within an element.
5410738377056:ENis one element with two components, not two elements. - Ignoring qualifiers. In QTY and DTM, the leading qualifier changes the meaning entirely.
QTY+21(ordered) andQTY+12(despatch) are very different.
Paste an EDIFACT message into the viewer to see the envelope, parties, and line items explained, with a plain-English summary. In your browser, nothing uploaded.
Open the EDIFACT viewer