# 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.

<QuickAnswer>
ORDHDR is the TRADACOMS order file a UK retailer sends to its supplier. It holds three message types: one ORDHDR header with the supplier, customer and file number, one ORDERS message per order with an OLD segment per product line, and one ORDTLR trailer counting the orders. Its EANCOM equivalent is the EDIFACT ORDERS message.
</QuickAnswer>

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](/guides/edi/edifact-orders).

<EDIGuideCTA
  badge="For TRADACOMS ORDHDR"
  transactionType="850"
  headline="Read an ORDHDR file in seconds"
  body="Paste a TRADACOMS order file into the free EDIFACT inspector to see every order and line, with the MTR, OTR and END counts checked. OrderSync processes EDIFACT, EANCOM and TRADACOMS orders alongside X12, PDF, CSV and email, straight into your ERP."
  secondaryHref="/edifact-inspector"
  secondaryLabel="Try the free EDIFACT inspector"
/>

## 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](/guides/edi/tradacoms) 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.

<EdifactSample
  title="ORDHDR file with one order and three lines"
  description="New-order file (TYP 0430) for one distribution centre: ORDHDR header, one ORDERS message with three OLD lines, and the ORDTLR trailer."
  label="TRADACOMS"
  raw="STX=ANA:1+5012345000008:HARBOUR LANE STORES LTD+5098765000002:KESTREL VALLEY HOMEWARE+261012:061500+000452+PASSW+ORDHDR+B'
MHD=1+ORDHDR:9'
TYP=0430+NEW-ORDERS'
SDT=5098765000002:000041207+KESTREL VALLEY HOMEWARE LTD'
CDT=5012345000008+HARBOUR LANE STORES LTD'
FIL=452+1+261012'
MTR=6'
MHD=2+ORDERS:9'
CLO=5012345000107:00212+HARBOUR LANE NORTHERN DC'
ORD=HL-PO-88340::261012'
DIN=261015+261015++AM DELIVERY'
OLD=1+5098765100016:KV-1001+++6+40+90000+++BAMBOO CHOPPING BOARD:LARGE'
OLD=2+5098765100023:KV-1002+++4+15+142000+++SALT AND PEPPER MILL SET'
OLD=3+5098765100030:KV-1003+++12+10+66000+++BAMBOO UTENSIL SET'
OTR=3'
MTR=9'
MHD=3+ORDTLR:9'
OFT=1'
MTR=3'
END=3'"
/>

| Segment | What 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](/guides/edi/edifact-orders) message.

### ORDHDR: order file header

| Segment | Name | Status | What it carries | EANCOM equivalent |
|---|---|---|---|---|
| `MHD` | Message header | M | Message number and `ORDHDR:version` | `UNH` |
| `TYP` | Transaction type | M | Code for the kind of orders in the file, such as 0430 new orders | `BGM` document code and function |
| `SDT` | Supplier details | M | Supplier GLN and the supplier code the retailer uses | `NAD+SU` |
| `CDT` | Customer details | M | Customer GLN and name | `NAD+BY` |
| `DNA` | Data narrative | O | Coded or free-text notes for the whole file | `FTX` |
| `FIL` | File details | M | File generation number, version and creation date | No direct equivalent; closest is the `UNB` control reference |
| `MTR` | Message trailer | M | Segment count for the message | `UNT` |

### ORDERS: one per order

| Segment | Name | Status | What it carries | EANCOM equivalent |
|---|---|---|---|---|
| `MHD` | Message header | M | Message number and `ORDERS:version` | `UNH` |
| `CLO` | Customer's location | M | Delivery point: GLN, retailer's own code, supplier's code for it | `NAD+DP` (or `NAD+BY` for a store) |
| `ORD` | Order references | M | Customer's order number, supplier's order number, order date | `BGM` number and `DTM+137` |
| `DIN` | Delivery instructions | O | Earliest and latest delivery dates and free-text instructions | `DTM+2`, `DTM+64` / `DTM+63` |
| `DNA` | Data narrative | O | Order-level notes and registered codes | `FTX` |
| `OLD` | Order line details | M, repeats | Product, pack, quantity, price, description | `LIN`, `PIA`, `QTY+21`, `PRI`, `IMD` |
| `DNB` | Data narrative | O, per line | Line-level notes, such as an original order line number | `FTX` at line level |
| `OTR` | Order trailer | M | Number of `OLD` lines in this order | `CNT+2` |
| `MTR` | Message trailer | M | Segment count for the message | `UNT` |

### ORDTLR: order file trailer

| Segment | Name | Status | What it carries | EANCOM equivalent |
|---|---|---|---|---|
| `MHD` | Message header | M | Message number and `ORDTLR:version` | None |
| `OFT` | Order file totals | M | Number of `ORDERS` messages in the file | None; the closest check is the `UNZ` message count |
| `MTR` | Message trailer | M | Segment count for the message | None |

## Reading the OLD order line

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

| Position | Field | In the example `OLD=1+5098765100016:KV-1001+++6+40+90000+++BAMBOO CHOPPING BOARD:LARGE'` |
|---|---|---|
| 1 | `SEQA` line number | `1` |
| 2 | `SPRO` supplier's product: EAN-13 (GTIN) of the traded unit, supplier's own code, DUN-14 | `5098765100016:KV-1001` |
| 3 | `SACU` EAN of the consumer unit | empty |
| 4 | `CPRO` customer's product: own-brand EAN, customer's item code | empty |
| 5 | `UNOR` consumer units in the traded unit, ordering measure, measure indicator | `6` (a case of six) |
| 6 | `OQTY` traded units ordered, total measure, measure indicator | `40` cases |
| 7 | `OUCT` cost price per traded unit, net of line discounts and before VAT | `90000` |
| 8 | `PIND` special price indicator | empty |
| 9 | `TFIN` to-follow indicator | empty |
| 10 | `TDES` description, two lines of 40 characters | `BAMBOO 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:

| Code | Meaning |
|---|---|
| `0430` | New orders |
| `0440` | Order amendment: changes to an outstanding order; only amended products need to be sent |
| `0400` | Cancelled orders |
| `0450` | Copy orders: a copy of an order sent before |
| `0460` | Confirmation of an order placed by phone or fax |
| `0470` | Mixed 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.

<EdifactSample
  title="Multi-store ORDHDR file with three orders"
  description="One ORDHDR header, three ORDERS messages (one per store, each with its own CLO and order number), and an ORDTLR trailer with OFT=3."
  label="TRADACOMS"
  raw="STX=ANA:1+5012345000008:HARBOUR LANE STORES LTD+5098765000002:KESTREL VALLEY HOMEWARE+261012:063000+000453+PASSW+ORDHDR+B'
MHD=1+ORDHDR:9'
TYP=0430+NEW-ORDERS'
SDT=5098765000002:000041207'
CDT=5012345000008'
FIL=453+1+261012'
MTR=6'
MHD=2+ORDERS:9'
CLO=5012345000114:0114+HARBOUR LANE LEEDS'
ORD=HL-PO-88341::261012'
DIN=261014'
OLD=1+5098765100016:KV-1001+++6+4+90000+++BAMBOO CHOPPING BOARD:LARGE'
OLD=2+5098765100047:KV-1004+++10+3+38000+++LINEN TEA TOWEL TWIN PACK'
OTR=2'
MTR=8'
MHD=3+ORDERS:9'
CLO=5012345000121:0121+HARBOUR LANE YORK'
ORD=HL-PO-88342::261012'
DIN=261014'
OLD=1+5098765100016:KV-1001+++6+2+90000+++BAMBOO CHOPPING BOARD:LARGE'
OTR=1'
MTR=7'
MHD=4+ORDERS:9'
CLO=5012345000138:0138+HARBOUR LANE HARROGATE'
ORD=HL-PO-88343::261012'
DIN=261015'
OLD=1+5098765100023:KV-1002+++4+1+142000+++SALT AND PEPPER MILL SET'
OLD=2+5098765100047:KV-1004+++10+2+38000+++LINEN TEA TOWEL TWIN PACK'
OTR=2'
MTR=8'
MHD=5+ORDTLR:9'
OFT=3'
MTR=3'
END=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.

<EdifactSample
  title="ORDHDR amendment file (TYP 0440)"
  description="An order amendment that changes one line of an existing order. Only the amended OLD line is sent, keeping its original line number."
  label="TRADACOMS"
  raw="STX=ANA:1+5012345000008:HARBOUR LANE STORES LTD+5098765000002:KESTREL VALLEY HOMEWARE+261013:071000+000454+PASSW+ORDHDR+B'
MHD=1+ORDHDR:9'
TYP=0440+ORDER-AMENDMENTS'
SDT=5098765000002:000041207'
CDT=5012345000008'
FIL=454+1+261013'
MTR=6'
MHD=2+ORDERS:9'
CLO=5012345000107:00212+HARBOUR LANE NORTHERN DC'
ORD=HL-PO-88340::261012'
OLD=2+5098765100023:KV-1002+++4+20+142000+++SALT AND PEPPER MILL SET'
OTR=1'
MTR=6'
MHD=3+ORDTLR:9'
OFT=1'
MTR=3'
END=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](/guides/edi/edifact-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 data | TRADACOMS order file | EANCOM ORDERS |
|---|---|---|
| Document type | `TYP=0430` | `BGM+220` |
| Order number | `ORD` first element | `BGM` second element |
| Order date | `ORD` date component | `DTM+137` |
| Delivery date | `DIN` | `DTM+2`, or `DTM+64` and `DTM+63` for a window |
| Supplier | `SDT` (once per file) | `NAD+SU` (every message) |
| Buyer | `CDT` (once per file) | `NAD+BY` (every message) |
| Delivery point | `CLO` | `NAD+DP` |
| Product | `OLD` `SPRO` / `CPRO` | `LIN` GTIN and `PIA` codes |
| Pack size | `OLD` `UNOR` | `QTY+59` or `PAC` |
| Quantity ordered | `OLD` `OQTY` | `QTY+21` |
| Net price | `OLD` `OUCT`, implied decimals | `PRI+AAA`, explicit decimal |
| Line count | `OTR` | `CNT+2` |
| Orders in the file | `OFT` | None; each message stands alone |

The X12 counterpart is the [850 purchase order](/guides/edi/850-purchase-order). For the full TRADACOMS to EANCOM picture across every file type, see [TRADACOMS file types](/guides/edi/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](/edi-compliance/waitrose) and [Ocado](/edi-compliance/ocado) pages.
- **Co-op** exchanges purchase orders, ASNs, invoices and credit notes in TRADACOMS version 9, per its own [supplier guidelines](https://supplier.coop.co.uk/supplierguidelines). See the [Co-op page](/edi-compliance/co-op).
- **M&S** publishes a TRADACOMS ORDHDR purchase order guide for its Food suppliers through its GXS (now OpenText) portal. See the [Marks & Spencer page](/edi-compliance/marks-and-spencer).
- **Asda** supports TRADACOMS for orders, invoices, credit notes and remittances, per ecosio. See the [Asda page](/edi-compliance/asda).
- **Boots** trades in TRADACOMS, with purchase orders and invoices the common message set, per Cegedim. See the [Boots page](/edi-compliance/boots).

## Common ORDHDR errors

The free [EDIFACT inspector](/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

- **[TRADACOMS explained](/guides/edi/tradacoms)**: syntax, STX and END, and how files work
- **[TRADACOMS file types](/guides/edi/tradacoms-file-types)**: every file type and its EANCOM equivalent
- **[TRADACOMS INVFIL](/guides/edi/tradacoms-invfil)**: the invoice file you send back
- **[TRADACOMS DLCHDR](/guides/edi/tradacoms-dlchdr)**: the delivery confirmation that tells you what was received
- **[EDIFACT ORDERS](/guides/edi/edifact-orders)**: the EANCOM purchase order

## Sources

- [TRADACOMS release 9 ORDERS and OLD layouts](https://www.kasoftware.com/schema/edi/tradacoms/9/messages/ORDERS/), KA Software schema reference
- [M&S Purchase Order implementation guide (TRADACOMS ORDHDR)](https://mands.gxs.co.uk/content/Implementation_Guides/MS%20Message_Implementation%20Guide_Purchase_Order_tradacom_071110.pdf), Marks & Spencer via GXS
- [Co-op supplier guidelines](https://supplier.coop.co.uk/supplierguidelines), Co-op
- [EDI - Tradacoms invoice specifications](https://www.jlpsuppliers.com/supplier-finance-queries/new-connections/edi-tradacoms-invoice-specifications), John Lewis Partnership
- [Waitrose EDI: where to start](https://ecosio.com/en/blog/waitrose-edi-where-to-start/) and [Setting up an EDI connection with Ocado](https://ecosio.com/en/blog/setting-up-an-edi-connection-with-ocado/), ecosio
- [Ending support for TRADACOMS](https://www.gs1uk.org/insights/news/ending-support-for-tradacoms), GS1 UK
- [TRADACOMS](https://en.wikipedia.org/wiki/TRADACOMS), Wikipedia

Check an ORDHDR file's structure and counts in the free [EDIFACT inspector](/edifact-inspector).
