All guides
Home / Guides / EDIFACT ORDERS

EDIFACT ORDERS: The Purchase Order, Explained in Depth

EdiPeek · Updated June 2026 · 7 min read

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:

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.

Ad slot - insert AdSense unit here

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

Decode your own ORDERS

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

Frequently asked questions

How is ORDERS different from the X12 850?
Same business purpose, different syntax. EDIFACT uses + and : delimiters, segments end with an apostrophe, and parties are in NAD segments rather than N1 loops. See X12 vs EDIFACT.
What does D:96A:UN mean in the UNH?
It is the message version: directory D, release 96A, controlling agency UN. It tells the receiver which dictionary of segments and codes to use.
What is a GLN?
A Global Location Number, a GS1 standard identifier for a company or location, commonly used in NAD segments to identify trading partners unambiguously.
What does the message function code in BGM mean?
It indicates whether the message is an original (9), a change, a cancellation, and so on. It is essential for knowing how to process the message.