Skip to content
TRADACOMS ORDHDR — TRADACOMS Order FilePublished Oct 12, 2026

TRADACOMS ORDHDR: The UK Order File Explained

TRADACOMS ORDHDR order files explained: the ORDHDR, ORDERS and ORDTLR messages, OLD order lines, TYP codes, live examples and the EANCOM ORDERS mapping.

When a UK retailer says "we will send you ORDHDR", it means purchase orders in TRADACOMS, the UK retail EDI standard. Waitrose, Ocado, Co-op, Asda, Boots and the M&S Food business all publish or describe TRADACOMS order flows, so if you supply UK grocery or high street retail, this is often the first EDI file you have to read.

ORDHDR is not one order. It is a file that can carry one order or several hundred, for one depot or every store in the estate. This guide shows how it is built, what each segment carries and how it maps to EDIFACT ORDERS.

What is a TRADACOMS ORDHDR file?

ORDHDR is the order file in TRADACOMS, the UK retail EDI standard first published in 1982 by the Article Numbering Association, now GS1 UK. The customer (usually a retailer) sends it to the supplier to place new orders, amend them or cancel them. The file takes its name from its first message, the ORDHDR order header.

TRADACOMS groups messages into files rather than sending each document on its own. Data that is the same for every order in the file, such as who the supplier and customer are, travels once in the header. Each order then follows as its own ORDERS message, and a trailer closes the file. The TRADACOMS overview covers the syntax and envelope in more depth.

ORDHDR file structure

An order file always has the same three-part shape, wrapped in the STX and END transmission envelope. Every message inside it opens with MHD and closes with MTR.

STX   Start of transmission (sender, receiver, date, references)
│
├── MHD ORDHDR   Order file header       once per file
│     TYP  SDT  CDT  FIL
│   MTR
│
├── MHD ORDERS   Order details           once per order, repeats
│     CLO  ORD  DIN
│     OLD  OLD  OLD ...                  one per product line
│     OTR                                lines in this order
│   MTR
│
├── MHD ORDTLR   Order file trailer      once per file
│     OFT                                orders in this file
│   MTR
│
END   End of transmission (number of messages)

The order header, detail and trailer each have their own version number in MHD. Version 9 is the final release of the standard and is what Co-op's supplier guidelines specify ("the V9 Tradacoms format"), but older versions are still in use. M&S's own TRADACOMS purchase order guide, for example, shows ORDHDR:6, ORDERS:8 and ORDTLR:4 in the same file. Always build to the versions your partner names.

Example: a single order to a distribution centre

A fictional retailer, Harbour Lane Stores, orders three homeware lines from a fictional supplier, Kestrel Valley Homeware, for delivery to its northern distribution centre. All identifiers are made-up GS1-style numbers with valid check digits.

Live exampleTRADACOMS ORDHDRTRADACOMS

ORDHDR file with one order and three lines

New-order file (TYP 0430) for one distribution centre: ORDHDR header, one ORDERS message with three OLD lines, and the ORDTLR trailer.

Structurally valid TRADACOMS
TRADACOMS · ORDHDR, ORDERS, ORDTLR · 20 segments · 3 messages

ORDHDR · Order file header · ref 1

Parties

RoleIdentifierName and address
Supplier SDT5098765000002GS1 GLNKESTREL VALLEY HOMEWARE LTD
Customer CDT5012345000008GS1 GLNHARBOUR LANE STORES LTD

ORDERS · Order · ref 2

Document
Order
Document number
HL-PO-88340
Order date
2026-10-12
Earliest delivery date
2026-10-15
Latest delivery date
2026-10-15

Parties

RoleIdentifierName and address
Delivery location CLO5012345000107GS1 GLNHARBOUR LANE NORTHERN DC

Lines (3)

#GTINCodesDescriptionQtyPriceAmount (qty x price)
15098765100016
Supplier: KV-1001
BAMBOO CHOPPING BOARD40traded unit of 69.0000360.00
25098765100023
Supplier: KV-1002
SALT AND PEPPER MILL SET15traded unit of 414.2000213.00
35098765100030
Supplier: KV-1003
BAMBOO UTENSIL SET10traded unit of 126.600066.00

ORDTLR · Order file trailer · ref 3

Transmission (STX)

Sender
HARBOUR LANE STORES LTDcode 5012345000008
Recipient
KESTREL VALLEY HOMEWAREcode 5098765000002
Prepared
2026-10-12 06:15:00
Control reference
000452
Syntax
ANA:1
Messages
3
SegmentWhat it says
STX=ANA:1+...Syntax ANA:1; sender and receiver as GLN plus name; transmission date and time (YYMMDD:HHMMSS); sender's reference 000452; receiver's reference (often a mailbox password); application reference ORDHDR; priority B
MHD=1+ORDHDR:9'Message 1 is the order header, version 9
TYP=0430+NEW-ORDERS'Transaction code 0430: new orders
SDT=5098765000002:000041207+...Supplier: GLN, then the supplier number the retailer allocated, then the supplier's name
CDT=5012345000008+...Customer: GLN and name
FIL=452+1+261012'File generation number 452, version 1 (an original), created 12 October 2026
MTR=6'Six segments in this message, counting MHD and MTR
MHD=2+ORDERS:9'Message 2 is an order
CLO=5012345000107:00212+...Delivery location: the DC's GLN, the retailer's own code for it, and its name
ORD=HL-PO-88340::261012'The retailer's order number and order date
DIN=261015+261015++AM DELIVERY'Earliest and latest delivery dates, plus a delivery instruction
OLD=1+...Order line 1: product, pack size, quantity, cost price, description (broken down below)
OTR=3'Three order lines in this order
MTR=9'Nine segments in the ORDERS message
MHD=3+ORDTLR:9' / OFT=1'Order file trailer: one order in the file
END=3'Three messages in the transmission

Segment reference

The tables below follow the version 9 message layouts. "M" is mandatory and "O" optional in the standard; your partner's guide can make an optional segment mandatory for them. The EANCOM column gives the closest equivalent in the EDIFACT ORDERS message.

ORDHDR: order file header

SegmentNameStatusWhat it carriesEANCOM equivalent
MHDMessage headerMMessage number and ORDHDR:versionUNH
TYPTransaction typeMCode for the kind of orders in the file, such as 0430 new ordersBGM document code and function
SDTSupplier detailsMSupplier GLN and the supplier code the retailer usesNAD+SU
CDTCustomer detailsMCustomer GLN and nameNAD+BY
DNAData narrativeOCoded or free-text notes for the whole fileFTX
FILFile detailsMFile generation number, version and creation dateNo direct equivalent; closest is the UNB control reference
MTRMessage trailerMSegment count for the messageUNT

ORDERS: one per order

SegmentNameStatusWhat it carriesEANCOM equivalent
MHDMessage headerMMessage number and ORDERS:versionUNH
CLOCustomer's locationMDelivery point: GLN, retailer's own code, supplier's code for itNAD+DP (or NAD+BY for a store)
ORDOrder referencesMCustomer's order number, supplier's order number, order dateBGM number and DTM+137
DINDelivery instructionsOEarliest and latest delivery dates and free-text instructionsDTM+2, DTM+64 / DTM+63
DNAData narrativeOOrder-level notes and registered codesFTX
OLDOrder line detailsM, repeatsProduct, pack, quantity, price, descriptionLIN, PIA, QTY+21, PRI, IMD
DNBData narrativeO, per lineLine-level notes, such as an original order line numberFTX at line level
OTROrder trailerMNumber of OLD lines in this orderCNT+2
MTRMessage trailerMSegment count for the messageUNT

ORDTLR: order file trailer

SegmentNameStatusWhat it carriesEANCOM equivalent
MHDMessage headerMMessage number and ORDTLR:versionNone
OFTOrder file totalsMNumber of ORDERS messages in the fileNone; the closest check is the UNZ message count
MTRMessage trailerMSegment count for the messageNone

Reading the OLD order line

OLD is where the money is, so it is worth knowing position by position. The version 9 layout runs:

PositionFieldIn the example OLD=1+5098765100016:KV-1001+++6+40+90000+++BAMBOO CHOPPING BOARD:LARGE'
1SEQA line number1
2SPRO supplier's product: EAN-13 (GTIN) of the traded unit, supplier's own code, DUN-145098765100016:KV-1001
3SACU EAN of the consumer unitempty
4CPRO customer's product: own-brand EAN, customer's item codeempty
5UNOR consumer units in the traded unit, ordering measure, measure indicator6 (a case of six)
6OQTY traded units ordered, total measure, measure indicator40 cases
7OUCT cost price per traded unit, net of line discounts and before VAT90000
8PIND special price indicatorempty
9TFIN to-follow indicatorempty
10TDES description, two lines of 40 charactersBAMBOO CHOPPING BOARD:LARGE

Three rules to apply when you map it:

  • Quantity is in traded units, not consumer units. OQTY 40 with UNOR 6 means 40 cases of 6, or 240 boards. Mixing the two up is the most common ORDHDR mapping bug.
  • Prices have no decimal point. TRADACOMS numbers carry implied decimals, and the number of places is set field by field in the specification your partner uses. In this example OUCT has four implied places, so 90000 is £9.00 per case; the John Lewis Partnership's published TRADACOMS invoice specification, for instance, defines unit cost as n10.4. Confirm the precision before you load prices.
  • The product may be identified by the retailer's code, not your GTIN. M&S's order guide sends its own UPC in CPRO with a placeholder in SPRO. Map both positions and match on whichever your partner populates.

Transaction codes in TYP

TYP tells you what kind of orders the file holds. The codes come from TRADACOMS code list 2; these are the ones order files use most:

CodeMeaning
0430New orders
0440Order amendment: changes to an outstanding order; only amended products need to be sent
0400Cancelled orders
0450Copy orders: a copy of an order sent before
0460Confirmation of an order placed by phone or fax
0470Mixed order types: each order states its own type in ORD

Partners sometimes use these codes their own way. M&S's purchase order guide labels 0430 as a customer order and uses 0460 for its standard orders, for example, so read the code against your partner's guide, not just the code list.

Example: one file, three store orders

Store-delivered suppliers usually receive one file per run with an order for each store. Here Harbour Lane sends three store orders in a single file. The supplier and customer appear once, in the header, and each store's order is its own ORDERS message with its own CLO. The file generation number has moved on to 453, one higher than the previous file.

Live exampleTRADACOMS ORDHDRTRADACOMS

Multi-store ORDHDR file with three orders

One ORDHDR header, three ORDERS messages (one per store, each with its own CLO and order number), and an ORDTLR trailer with OFT=3.

Structurally valid TRADACOMS
TRADACOMS · ORDHDR, ORDERS, ORDTLR · 34 segments · 5 messages

ORDHDR · Order file header · ref 1

Parties

RoleIdentifierName and address
Supplier SDT5098765000002GS1 GLN-
Customer CDT5012345000008GS1 GLN-

ORDERS · Order · ref 2

Document
Order
Document number
HL-PO-88341
Order date
2026-10-12
Earliest delivery date
2026-10-14

Parties

RoleIdentifierName and address
Delivery location CLO5012345000114GS1 GLNHARBOUR LANE LEEDS

Lines (2)

#GTINCodesDescriptionQtyPriceAmount (qty x price)
15098765100016
Supplier: KV-1001
BAMBOO CHOPPING BOARD4traded unit of 69.000036.00
25098765100047
Supplier: KV-1004
LINEN TEA TOWEL TWIN PACK3traded unit of 103.800011.40

ORDERS · Order · ref 3

Document
Order
Document number
HL-PO-88342
Order date
2026-10-12
Earliest delivery date
2026-10-14

Parties

RoleIdentifierName and address
Delivery location CLO5012345000121GS1 GLNHARBOUR LANE YORK

Lines (1)

#GTINCodesDescriptionQtyPriceAmount (qty x price)
15098765100016
Supplier: KV-1001
BAMBOO CHOPPING BOARD2traded unit of 69.000018.00

ORDERS · Order · ref 4

Document
Order
Document number
HL-PO-88343
Order date
2026-10-12
Earliest delivery date
2026-10-15

Parties

RoleIdentifierName and address
Delivery location CLO5012345000138GS1 GLNHARBOUR LANE HARROGATE

Lines (2)

#GTINCodesDescriptionQtyPriceAmount (qty x price)
15098765100023
Supplier: KV-1002
SALT AND PEPPER MILL SET1traded unit of 414.200014.20
25098765100047
Supplier: KV-1004
LINEN TEA TOWEL TWIN PACK2traded unit of 103.80007.60

ORDTLR · Order file trailer · ref 5

Transmission (STX)

Sender
HARBOUR LANE STORES LTDcode 5012345000008
Recipient
KESTREL VALLEY HOMEWAREcode 5098765000002
Prepared
2026-10-12 06:30:00
Control reference
000453
Syntax
ANA:1
Messages
5

Load this as three orders in your ERP, not one. Each ORD number is a separate purchase order that your delivery notes and invoices must quote back. The equivalent in EANCOM would be three separate ORDERS messages, each repeating the buyer and supplier.

Example: an order amendment

A day later the retailer raises the mill set quantity on order HL-PO-88340 from 15 to 20 cases. With transaction code 0440, only the changed line is sent; lines 1 and 3 stand as they were.

Live exampleTRADACOMS ORDHDRTRADACOMS

ORDHDR amendment file (TYP 0440)

An order amendment that changes one line of an existing order. Only the amended OLD line is sent, keeping its original line number.

Structurally valid TRADACOMS
TRADACOMS · ORDHDR, ORDERS, ORDTLR · 17 segments · 3 messages

ORDHDR · Order file header · ref 1

Parties

RoleIdentifierName and address
Supplier SDT5098765000002GS1 GLN-
Customer CDT5012345000008GS1 GLN-

ORDERS · Order · ref 2

Document
Order
Document number
HL-PO-88340
Order date
2026-10-12

Parties

RoleIdentifierName and address
Delivery location CLO5012345000107GS1 GLNHARBOUR LANE NORTHERN DC

Lines (1)

#GTINCodesDescriptionQtyPriceAmount (qty x price)
25098765100023
Supplier: KV-1002
SALT AND PEPPER MILL SET20traded unit of 414.2000284.00

ORDTLR · Order file trailer · ref 3

Transmission (STX)

Sender
HARBOUR LANE STORES LTDcode 5012345000008
Recipient
KESTREL VALLEY HOMEWAREcode 5098765000002
Prepared
2026-10-13 07:10:00
Control reference
000454
Syntax
ANA:1
Messages
3

Amendments are where automation pays for itself or goes wrong. Your system has to find the open order by its ORD number and replace line 2, not create a new order for 20 cases. In EANCOM the same change would usually arrive as an ORDCHG message.

ORDHDR to EANCOM ORDERS

If a retailer moves you from TRADACOMS to EANCOM, or you trade both, the business content is the same and the shape is different. TRADACOMS sends the parties once per file; EANCOM repeats them in every order.

Business dataTRADACOMS order fileEANCOM ORDERS
Document typeTYP=0430BGM+220
Order numberORD first elementBGM second element
Order dateORD date componentDTM+137
Delivery dateDINDTM+2, or DTM+64 and DTM+63 for a window
SupplierSDT (once per file)NAD+SU (every message)
BuyerCDT (once per file)NAD+BY (every message)
Delivery pointCLONAD+DP
ProductOLD SPRO / CPROLIN GTIN and PIA codes
Pack sizeOLD UNORQTY+59 or PAC
Quantity orderedOLD OQTYQTY+21
Net priceOLD OUCT, implied decimalsPRI+AAA, explicit decimal
Line countOTRCNT+2
Orders in the fileOFTNone; each message stands alone

The X12 counterpart is the 850 purchase order. For the full TRADACOMS to EANCOM picture across every file type, see TRADACOMS file types.

Which UK retailers send ORDHDR

Retailers change their EDI setups, so treat this as a starting point and confirm with each partner's EDI team.

  • Waitrose and Ocado exchange orders as ORDHDR and invoices as INVFIL in TRADACOMS, according to ecosio's onboarding guides. See the Waitrose and Ocado pages.
  • Co-op exchanges purchase orders, ASNs, invoices and credit notes in TRADACOMS version 9, per its own supplier guidelines. See the Co-op page.
  • M&S publishes a TRADACOMS ORDHDR purchase order guide for its Food suppliers through its GXS (now OpenText) portal. See the Marks & Spencer page.
  • Asda supports TRADACOMS for orders, invoices, credit notes and remittances, per ecosio. See the Asda page.
  • Boots trades in TRADACOMS, with purchase orders and invoices the common message set, per Cegedim. See the Boots page.

Common ORDHDR errors

The free EDIFACT inspector catches the first three automatically.

  1. MTR counts that leave out MHD or MTR. The count in MTR includes both. An ORDERS message with CLO, ORD, DIN, three OLD and OTR has nine segments, not seven.
  2. END counting orders instead of messages. END counts every MHD in the transmission, header and trailer included. A file with three orders has END=5, not END=3.
  3. MHD numbers out of sequence. Messages are numbered 1, 2, 3 through the whole transmission. Restarting at 1 for each order fails the sequence check most translators run.
  4. OTR or OFT that do not match. OTR must equal the number of OLD lines in that order, and OFT the number of ORDERS messages in the file. A mismatch usually means a truncated file.
  5. Skipped or repeated file generation numbers. FIL generation numbers run in sequence per file type and per trading partner. Receivers use them to spot missing files, and some reject files that arrive out of sequence. If you see a gap, ask for the missing file before you pick.
  6. Cases loaded as units. See the OQTY and UNOR note above. Check the first live orders line by line against the retailer's portal or a PDF copy.

How OrderSync handles ORDHDR

OrderSync reads ORDHDR files directly, alongside EDIFACT and EANCOM, X12, PDF, CSV and email orders. Each ORDERS message becomes its own order, with the delivery location from CLO and quantities converted from traded units using UNOR, before anything reaches your ERP.

Frequently Asked Questions

What is ORDHDR in EDI?

ORDHDR is the TRADACOMS order file used in UK retail. Strictly, it is the header message that opens the file, but the whole order file is usually called ORDHDR. It contains an ORDHDR header, one ORDERS message for each purchase order, and an ORDTLR trailer.

What is the difference between ORDHDR and ORDERS?

ORDHDR is the file header, sent once, with the supplier, customer and file number. ORDERS is the detail message, sent once per purchase order, with the delivery location, order number and lines. Confusingly, EDIFACT also has a message called ORDERS, but it is a different format.

What does the OLD segment contain?

OLD is the order line. It carries the line number, the product codes (your GTIN or own code, and the retailer's code), the number of consumer units per traded unit, the quantity of traded units ordered, the cost price per traded unit and a description.

What is the EDIFACT equivalent of ORDHDR?

The EANCOM ORDERS message, with document code BGM+220. Amendments that TRADACOMS sends as ORDHDR files with transaction code 0440 usually map to the EANCOM ORDCHG message.

Do I have to acknowledge an ORDHDR file?

Only if your partner asks for it. TRADACOMS has an acknowledgement of order file (ACKHDR), but many UK retailers do not use it. Check your partner's specification for any order response or confirmation they expect.

Related guides

Sources

Check an ORDHDR file's structure and counts in the free EDIFACT inspector.

James Darby
Last updated: 10/12/2026

How to Answer "Are You EDI Capable?"

A buyer asked, and you need to answer this week. The four things they are checking, what you can say yes to today, and a realistic date for the rest.

  • What a buyer is really asking when they ask this
  • The minimum set-up that makes the answer yes
  • What you can answer today versus what needs building
  • Rough timelines, so you can give a date rather than a maybe

One email with the download. Unsubscribe any time.

Related Resources