TRADACOMS Basics
TRADACOMS (Trading Data Communications Standard) is an EDI standard for the electronic exchange of business data that is primarily used in UK retail. It was introduced in 1982 by the British Article Numbering Association (ANA, now GS1 UK) and is one of the oldest EDI standards in existence. TRADACOMS is based on the UN/GTDI syntax, a predecessor of EDIFACT, and is similar to it in structure and terminology. Since the mid-1990s, the standard has no longer been developed further and has increasingly been replaced by EDIFACT subsets such as EANCOM, but it is still in use in UK retail and the book trade. This article describes the structure of the format and the most important terms.
Structure of a TRADACOMS file
A TRADACOMS file has a hierarchical structure similar to EDIFACT, but it uses its own segment identifiers and characteristically splits a business document into multiple messages. The levels from outermost to innermost are:
Transmission – The outermost envelope, comparable to an interchange or envelope. It is enclosed by the segments STX (Start of Transmission) and END (End of Transmission). It contains sender, recipient, date, and one or more messages. STX and END correspond to the EDIFACT segments UNB and UNZ.
Batch – An optional grouping level between transmission and message, enclosed by BAT and EOB (End of Batch). It corresponds to the EDIFACT group UNG/UNE and is rarely used in practice.
Message – A single section within the transmission, enclosed by MHD (Message Header) and MTR (Message Trailer). MHD and MTR correspond to the EDIFACT segments UNH and UNT. Each message belongs to a message type (for example ORDHDR) and carries its own version number. A special feature of TRADACOMS: a complete business document usually does not consist of a single message, but of several consecutive messages (header, detail, trailer). More on this in the section below.
Segment – A logical block within a message, comparable to a section of a document. Each segment begins with a three-character identifier (for example TYP, SDT, OLD), followed by an equals sign and the actual data.
Data element – The individual value within a segment, comparable to a field in a database. Data elements are separated by +; composite data elements are split into sub-elements by :.
Control characters
TRADACOMS uses five control characters that define the file format. Unlike EDIFACT, they are not declared in a separate segment, but are fixed by the standard:
| Character | Meaning | Standard |
|---|---|---|
| Segment Code Separator | Separates the segment identifier from the data | = |
| Element Separator | Separates data elements within a segment | + |
| Subelement Separator | Separates sub-elements of a composite data element | : |
| Release Character | Escape character used to include a control character as data | ? |
| Segment Terminator | Ends a segment | ' |
The equals sign after the segment identifier (for example MHD=...) is the most distinctive feature of TRADACOMS and immediately sets the format apart from EDIFACT, where the identifier is followed directly by the data. The release character ? works as in EDIFACT: if a control character is to appear as normal text, it is prefixed with ?; for example, EMAIL?: represents the text value EMAIL:.
The file structure made up of multiple messages
Unlike EDIFACT or X12, where one business document corresponds to exactly one message, TRADACOMS builds a document from multiple messages. A typical document consists of three parts:
- a header message with sender, recipient, and general document data, for example ORDHDR
- one or more detail messages with the actual line items, for example ORDERS
- a trailer message with totals and control information, for example ORDTLR
All messages appear one after another within the same transmission (STX … END). The entire document is named after its header message: an order is therefore called an ORDHDR transmission, not an ORDERS transmission. This structure runs through all TRADACOMS document types and is one of the most important characteristics of the standard.
Important segments
The following service segments form the framework of every TRADACOMS transmission and occur regardless of message type:
| Segment | Meaning |
|---|---|
| STX | Start of Transmission – sender, recipient, date, reference |
| END | End of Transmission – number of messages in the transmission |
| BAT | Batch Header – groups messages into a batch (optional, rare) |
| EOB | End of Batch – ends a batch |
| MHD | Message Header – message type and version |
| MTR | Message Trailer – number of segments in the message |
All other segments depend on the message type. In an order, for example, the following segments occur:
| Segment | Meaning |
|---|---|
| TYP | Type of message (for example NEW-ORDERS for a new order) |
| SDT | Supplier Details – information about the supplier |
| CDT | Customer Details – information about the customer |
| FIL | File Details – file number, version, and creation date |
| CLO | Customer Location – delivery location or branch |
| ORD | Order References – order number and order date |
| OLD | Order Line Detail – one order line item |
| OTR | Order Trailer – number of line items in the message |
| OFT | Order File Trailer – number of orders in the document |
Versions and message types
TRADACOMS does not have a global version identifier like EDIFACT (for example D96A). Instead, each message type carries its own sequential version number, which is specified in the MHD segment, for example ORDHDR:9 for version 9 of the order header. Since the standard has no longer been developed since the mid-1990s, the versions are stable; in UK retail, certain versions have become firmly established.
A business document is composed of multiple messages. Common document types and their message groups are:
| Document | Header | Detail | Trailer |
|---|---|---|---|
| Order | ORDHDR | ORDERS | ORDTLR |
| Despatch Advice | DELHDR | DELIVR | DELTLR |
| Invoice | INVFIL | INVOIC | VATTLR, INVTLR |
| Credit Note | CREHDR | CREDIT | CRETLR |
| Order Acknowledgement | ACKHDR | ACKMNT | ACKTLR |
| Price Information | PRIHDR | PRIINF | PRITLR |
In total, TRADACOMS defines around 25 document types. A transmission is often concluded with a reconciliation message (RSGRSG), which is used to reconcile the transmitted documents.
How to read a TRADACOMS file
A TRADACOMS file is a continuous text stream, shown here with line breaks per segment for readability. A simplified example of an order:
STX=ANA:1+5000116000123:RETAIL STORES LTD+5013546110456:SUPPLIER UK LTD+260328:120000+358767++ORDHDR'
MHD=1+ORDHDR:9'
TYP=0430+NEW-ORDERS'
SDT=5013546110456:SUPPLIER UK LTD'
CDT=5000116000123:RETAIL STORES LTD'
FIL=513+1+260328'
MTR=6'
MHD=2+ORDERS:9'
CLO=5000116001234:0100821'
ORD=PO-12345::260328'
OLD=1+::05050747002152++:4294588+5+400++++128MB USB STICK'
OTR=1'
MTR=6'
MHD=3+ORDTLR:9'
OFT=1'
MTR=3'
END=3'
This file can be read as follows:
STX=ANA:1+...– Transmission header: syntax rule ANA version 1, sender 5000116000123 (RETAIL STORES LTD), recipient 5013546110456 (SUPPLIER UK LTD), date 03/28/2026 12:00, reference 358767, document type ORDHDRMHD=1+ORDHDR:9'– Message 1: order header, version 9TYP=0430+NEW-ORDERS'– Type of message: new orderSDT=5013546110456:SUPPLIER UK LTD'– Supplier data, identified by the supplier's EAN/GLNCDT=5000116000123:RETAIL STORES LTD'– Customer data, identified by the buyer's EAN/GLNFIL=513+1+260328'– File details: file number 513, version 1, date 03/28/2026MTR=6'– End of message 1: 6 segmentsMHD=2+ORDERS:9'– Message 2: order detail, version 9CLO=5000116001234:0100821'– Delivery location: site EAN and branch numberORD=PO-12345::260328'– Order reference: order number PO-12345, order date 03/28/2026OLD=1+::05050747002152++:4294588+5+400++++128MB USB STICK'– Order line item 1: item EAN 05050747002152, supplier item number 4294588, quantity 5, description “128MB USB STICK”OTR=1'– Line item trailer: 1 line item in this messageMTR=6'– End of message 2: 6 segmentsMHD=3+ORDTLR:9'– Message 3: order trailer, version 9OFT=1'– Document trailer: 1 order in the documentMTR=3'– End of message 3: 3 segmentsEND=3'– End of transmission: 3 messages
The three messages ORDHDR, ORDERS, and ORDTLR together form one complete order. Within a segment, + separates data elements and : their sub-elements; ' terminates each segment.
TRADACOMS in EDI Connect
Anvaigo EDI Connect supports the import and export of TRADACOMS transmissions for all message types. The TRADACOMS converter uses the same processing basis as the converters for EDIFACT and X12 and maps the TRADACOMS structure—namely transmission, messages, segments, and data elements—into the mapping. As with the X12 converter, the mapping structure is generated from a sample file and supplemented as needed based on the TRADACOMS specification; the control characters are fixed by the standard and do not need to be configured. Details on configuration are described in the article The TRADACOMS Converter.