EDIFACT glossary and message explainer.

Plain English definitions of EDIFACT segments, qualifiers and concepts, plus an explainer that walks through your own message segment by segment. Written for developers and integration architects who need to know what a message actually says.

Explain my messageTry the decoderWhat is EDIFACT?
Terms defined
63
Segments explained
34
Message types
8
Filter by type
Sort order

63 terms

A

ALC

Segment

Allowance or Charge

The ALC segment specifies a discount, surcharge, freight charge, or other allowance or charge applied to a line item or the whole order. It is typically followed by PCD (percentage) and MOA (monetary amount) segments that give the actual value. ALC+A means allowance (reduces the price), ALC+C means charge (increases the price).

ALC+A++++1::ZZZ+TDALC codes, structure and example

ALI

Segment

Additional Information

The ALI segment provides additional information about the goods, such as country of origin, special conditions, or preference criteria. Commonly used for customs and trade compliance.

ALI+AUALI codes, structure and example

Association Assigned Code

Concept

Industry subset identifier

A code in the UNH segment that identifies the industry-specific subset of EDIFACT being used. EAN008 indicates EANCOM (the GS1 retail subset). When absent, the message uses the base UN/EDIFACT standard. Also called the Association Code.

UNH+1+ORDERS:D:96A:UN:EAN008

B

BGM

Segment

Beginning of Message

The BGM segment opens every EDIFACT business message and identifies what the message is and what it does. Element 1 is the document type code (220=purchase order, 380=invoice, 351=despatch advice). Element 2 is the document number (your PO number, invoice number etc). Element 3 is the message function code: 9=original, 5=replace, 1=cancel, 4=change.

BGM+220+PO-12345+9BGM codes, structure and example

Bill of Lading Reference

Concept

Shipping document reference

A reference to the bill of lading carried in an RFF+BM segment. Used in DESADV and INVOIC messages to link the transaction to the shipping document.

RFF+BM:BOL-98765

Business Document

Concept

The EDIFACT equivalent of a business form

Each EDIFACT message represents one business document: a purchase order (ORDERS), a despatch advice (DESADV), an invoice (INVOIC), etc. The BGM segment identifies the document type and number.

C

CNT

Segment

Control Total

The CNT segment provides a control total for the message, typically the number of line items. CNT+2:7 means there are 7 line items in the message. The receiver should validate that the count matches the actual number of LIN segments. Placed in the summary section after UNS+S.

CNT+2:7CNT codes, structure and example

COM

Segment

Communication Contact

The COM segment provides a communication number for the contact named in the preceding CTA segment. The qualifier indicates the channel: EM=email, TE=telephone, FX=fax, TL=telex. A NAD group can have multiple COM segments for different channels.

COM+jane@supplier.com:EMCOM codes, structure and example

Composite Data Element

Concept

A group of sub-elements within one element position

In EDIFACT, some element positions contain multiple values separated by colons. For example, the GTIN in LIN is a composite: LIN+1++9312345678901:EN means GTIN=9312345678901 and item type code=EN (EAN-13). Composite elements are delimited by the colon character defined in the UNA.

LIN+1++9312345678901:EN

CONTRL

Message Type

Functional Acknowledgement

The CONTRL message acknowledges receipt of an interchange and reports whether it was syntactically valid. It is the EDIFACT equivalent of an HTTP 200 OK or 400 Bad Request. Trading partner agreements typically require a CONTRL to be sent within a defined time window. CONTRL does not confirm that the content was processed correctly, only that the interchange was received and parsed.

CPS

Segment

Consignment Packing Sequence

The CPS segment begins a packaging level in a DESADV message. It establishes the hierarchy of pallets, cartons, and items. CPS+1 starts the first pallet. CPS+2+1 starts a carton that belongs to pallet 1. Each CPS group contains PAC, MEA, PCI, and GIN segments describing the package at that level.

CPS+1CPS codes, structure and example

CTA

Segment

Contact Information

The CTA segment names a contact person or department associated with the preceding NAD party. The qualifier indicates the role: OC=order contact, IC=information contact, PD=purchasing contact. The contact name appears in element 2 sub-element 2. Followed by COM segments for phone and email.

CTA+OC+:Jane SmithCTA codes, structure and example

CUX

Segment

Currencies

The CUX segment specifies the currency used in the message. CUX+2:AUD:9 means the order currency is AUD (Australian Dollars). The qualifier 2 means order currency, 3 means settlement currency. ISO 4217 currency codes are used.

CUX+2:AUD:9CUX codes, structure and example

D

DELFOR

Message Type

Delivery Schedule

The DELFOR message communicates a forward delivery schedule from a buyer to a supplier across multiple delivery dates, quantities, and locations. Common in manufacturing and automotive supply chains where deliveries are planned weeks in advance.

DESADV

Message Type

Despatch Advice

The DESADV message notifies a buyer that goods have been despatched. It is the EDIFACT equivalent of an ASN (Advanced Shipment Notification). It contains packaging details, SSCCs, lot numbers, expiry dates, and carrier information. Most major retailers require a DESADV to be received before goods arrive at the distribution centre.

Document Type Code

Concept

Identifies what kind of document the message represents

The first element of the BGM segment. Common values: 220=Purchase Order, 221=Order Change, 224=Purchase Order Response, 351=Despatch Advice, 380=Invoice, 381=Credit Note, 383=Debit Note, 384=Corrected Invoice.

DTM

Segment

Date/Time/Period

The DTM segment carries date and time information. The first sub-element is the qualifier that identifies what the date means, the second is the value, and the third is the format code. Common qualifiers: 137=document date, 2=delivery requested, 63=latest delivery, 35=delivery date, 131=tax point date, 36=expiry date, 11=despatch date. Common format codes: 102=YYYYMMDD, 203=YYYYMMDDHHmm.

DTM+137:20260823:102DTM codes, structure and example

E

EANCOM

Concept

GS1's retail subset of UN/EDIFACT

EANCOM is the implementation of UN/EDIFACT defined by GS1 for retail and supply chain use. It restricts and profiles the base standard for specific use cases like purchase orders and invoices between retailers and suppliers. EANCOM messages are identified by EAN008 in the UNH association code. Most Australian retailers use EANCOM.

Element

Concept

A single data field within a segment

EDIFACT segments are made up of elements separated by the plus sign (+). Each element position has a defined meaning specified by the message standard. Some elements are simple (one value), others are composite (multiple sub-values separated by colons).

F

FTX

Segment

Free Text

The FTX segment carries free-form text that does not fit into structured data fields. Common uses include delivery instructions, special handling notes, and product descriptions that exceed the IMD segment capacity. The qualifier identifies the purpose: DEL=delivery instructions, AAI=general information, PUR=purchasing information.

FTX+DEL+++DELIVER TO LOADING DOCK B ONLYFTX codes, structure and example

Functional Acknowledgement

Concept

Confirmation that a message was received and valid

See CONTRL.

G

GIN

Segment

Goods Identity Number

The GIN segment carries identification numbers for goods, most commonly SSCCs (Serial Shipping Container Codes) and batch/lot numbers. GIN+BJ identifies a batch/lot number. GIN+ML or GIN+SRV identifies an SSCC. Used in DESADV messages within packaging groups.

GIN+BJ+LOT-2026-001GIN codes, structure and example

GLN

Concept

Global Location Number

A 13-digit GS1 identifier that uniquely identifies a physical location or legal entity. GLNs are used in EDIFACT NAD segments to identify buyers, suppliers, and delivery locations. The retailer's distribution centre, the supplier's warehouse, and each trading entity have their own GLN. GLNs eliminate ambiguity when multiple companies have similar names.

NAD+BY+9312345678901::9

GTIN

Concept

Global Trade Item Number

The barcode number that identifies a specific product at a specific unit of measure. GTINs are 8, 12, 13, or 14 digits. In EDIFACT, GTINs appear in the LIN segment. GTIN-13 (EAN-13) is the most common format in Australia. The item type code following the GTIN identifies the numbering scheme: EN=EAN-13, SRV=GTIN, UP=UPC.

LIN+1++9312345678901:EN

I

IMD

Segment

Item Description

The IMD segment carries a textual description of a product. IMD+F means free-form text description. The description itself appears as a composite in element 3, typically at sub-element index 3 or 4. IMD is optional but strongly recommended. Without it, the receiver must look up the product description from their own systems using the GTIN.

IMD+F++:::PREMIUM CHOCOLATE BOX 250GIMD codes, structure and example

Interchange

Concept

The outer envelope of an EDIFACT transmission

An EDIFACT interchange is the complete transmission from one sender to one receiver. It is bounded by UNB (interchange header) and UNZ (interchange trailer). An interchange can contain one or more messages (UNH to UNT). Most interchanges contain exactly one message.

INVOIC

Message Type

Invoice

The INVOIC message is sent by a supplier to request payment for goods or services. It includes line-level quantities, prices, and tax details, as well as summary totals and payment terms. Document type 380=invoice, 381=credit note, 383=debit note. INVOIC messages typically reference the original ORDERS purchase order number via RFF+ON.

L

LIN

Segment

Line Item

The LIN segment begins a line item group and carries the line number and product identifier. Element 1 is the line number (sequential, starting at 1). Element 3 is a composite containing the product ID and its type code. Each LIN is followed by PIA, IMD, QTY, PRI, MOA, TAX, and other segments that describe the line.

LIN+1++9312345678901:ENLIN codes, structure and example

LOC

Segment

Place/Location Identification

The LOC segment identifies a specific place. Qualifier 1=place of despatch, 7=place of delivery, 11=place of loading, 83=freight and charges paid to. Used in DESADV for despatch and delivery locations, and in ORDERS for line-level delivery locations in multi-site orders.

LOC+7+SYD-DC::92LOC codes, structure and example

M

MEA

Segment

Measurements

The MEA segment carries physical measurements such as gross weight, net weight, and volume. MEA+AAE+G+KGM:320.50 means the gross weight (G) is 320.50 kilograms (KGM). Used in DESADV packaging groups and ORDERS line items. Common unit codes: KGM=kilograms, LTR=litres, MTQ=cubic metres, MTR=metres.

MEA+AAE+G+KGM:320.50MEA codes, structure and example

Message Function Code

Concept

What this message is doing

The third element of the BGM segment. 9=original (new document), 5=replace (replaces a previous document with the same number), 1=cancellation (cancels the document), 4=change (modifies a previously sent document). This is critical for downstream processing. An ORDERS with function 1 is an order cancellation, not a new order.

MOA

Segment

Monetary Amount

The MOA segment carries a monetary amount. The qualifier identifies what the amount represents. Common qualifiers: 203=line item amount, 86=total amount payable, 79=total amount excluding tax, 124=tax amount, 125=taxable amount, 131=total line items amount, 77=invoice amount. MOA always uses decimal notation regardless of the currency.

MOA+203:1014.00MOA codes, structure and example

N

NAD

Segment

Name and Address

The NAD segment identifies a party to the transaction and optionally provides their address. The qualifier identifies the party's role: BY=buyer, SU=supplier, DP=delivery party (ship-to), IV=invoice party (bill-to), ST=ship-to (alternate), SE=selling party, CA=carrier. Element 2 carries the party's GLN. Elements 4-8 carry the address (name, street, city, state, postcode, country).

NAD+BY+9311000000123::9++EXAMPLE RETAIL PTY LTD+100 SAMPLE ST+SYDNEY+NSW+2000+AUNAD codes, structure and example

O

ORDERS

Message Type

Purchase Order

The ORDERS message is sent by a buyer to a supplier to place an order for goods or services. It contains line items with GTINs, quantities, and prices, plus header information for the buyer, supplier, delivery location, and dates. ORDERS with message function 9 is a new order. Function 5 is a replacement. Function 1 is a cancellation.

ORDRSP

Message Type

Order Response

The ORDRSP message is sent by a supplier in response to an ORDERS purchase order. It can accept the order as-is, accept with changes (different quantities, dates, or prices), or reject it. Each line can be responded to individually.

P

PAC

Segment

Package

The PAC segment describes a package type and quantity. Used in DESADV within a CPS packaging group to specify whether the package is a pallet (PF), carton (CT), bag (BG), etc. PAC+1+PF:::PALLET means 1 pallet. PAC+20+CT means 20 cartons. In ORDERS, PAC can appear at line level to indicate the number of trade units.

PAC+1+PF:::PALLETPAC codes, structure and example

PAT

Segment

Payment Terms Basis

The PAT segment specifies the payment terms for the transaction. PAT+1 means net payment. The terms details (number of days) appear in a composite in element 3. PAT+1++5:3:D:30 means net 30 days. Used in ORDERS and INVOIC.

PAT+1++5:3:D:30PAT codes, structure and example

PCD

Segment

Percentage Details

The PCD segment specifies a percentage associated with an allowance or charge in the preceding ALC segment. PCD+3:5 means a 5% discount. Used in ORDERS and INVOIC after ALC segments.

PCD+3:5.00PCD codes, structure and example

PCI

Segment

Package Content Identification

The PCI segment identifies the marking or label type applied to the package. PCI+33E means the SSCC label (GS1-128 barcode) is applied to the outside of the package. Always followed by a GIN segment carrying the actual SSCC number.

PCI+33EPCI codes, structure and example

PIA

Segment

Additional Product ID

The PIA segment provides additional product identifiers beyond the GTIN in the LIN segment. Common qualifiers: SA=supplier's article number (their internal SKU), IN=buyer's article number, VN=vendor's item number, UP=UPC code. A single LIN group can have multiple PIA segments for different ID types.

PIA+1+PREMCHOC250:SAPIA codes, structure and example

PRI

Segment

Price Details

The PRI segment carries the unit price for a line item. The qualifier identifies the price type: AAA=net price (after discounts), AAB=gross price (before discounts), AAE=net price per price unit, 1E=list price, AAG=inclusive price. The price is always per unit unless a price basis quantity is specified.

PRI+AAA:8.45PRI codes, structure and example

PRICAT

Message Type

Price/Sales Catalogue

The PRICAT message is sent by a supplier to communicate product information, pricing, and availability to buyers. It is used to set up or update the buyer's product database. Each product has its own line with GTIN, description, price, unit of measure, and other attributes.

Q

QTY

Segment

Quantity

The QTY segment carries a quantity value. The qualifier identifies what is being counted. In ORDERS: 21=ordered quantity. In DESADV: 12=despatched quantity, 52=quantity in trade units, 131=number of packages. In INVOIC: 47=invoiced quantity, 46=delivered quantity. The unit of measure appears in the third sub-element.

QTY+21:100:PCEQTY codes, structure and example

Qualifier

Concept

A code that identifies the meaning of a data element

Many EDIFACT segments use the same structure for different purposes, distinguished by a qualifier code in the first element. For example, DTM+137 means the date is the document date, while DTM+2 means it is the requested delivery date. Qualifiers are defined in the UN/EDIFACT code lists and can vary between message versions.

R

RECADV

Message Type

Receiving Advice

The RECADV message is sent by a buyer to confirm receipt of goods. It is used to close the loop on the DESADV and trigger invoice matching and payment. Each line can report the quantity actually received versus what was despatched.

Release Character

Concept

Escape character for special characters in text

In EDIFACT, the question mark (?) is the default release character. It allows the use of delimiter characters inside text fields. For example, O'Brien's would cause a parse error because the apostrophe is the segment terminator. Written with the release character: O?'Brien?'s. The release character itself is escaped as ??.

RFF

Segment

Reference

The RFF segment carries a reference number. The qualifier identifies what the reference is. Common qualifiers: ON=order number, DQ=delivery note, BM=bill of lading, AAK=despatch advice, IV=invoice number, VA=VAT/ABN registration number, CT=contract number, VN=vendor's order number. RFF is used at header level (order references) and line level (line-specific references).

RFF+ON:PO-2026-12345RFF codes, structure and example

S

Segment

Concept

A line of data in an EDIFACT message

An EDIFACT segment is a single record in the message, identified by a three-letter tag (BGM, DTM, NAD, LIN etc) and terminated by an apostrophe ('). Segments contain elements separated by plus signs (+). Each segment type has a defined position and meaning within the message structure.

Segment Terminator

Concept

The character that ends each segment

By default the apostrophe (') terminates each EDIFACT segment. This character is defined in the UNA service string. Some systems use newlines instead of apostrophes, which is technically non-conformant but common in practice. CleanEDI handles both formats automatically.

SSCC

Concept

Serial Shipping Container Code

An 18-digit GS1 barcode that uniquely identifies a logistic unit (pallet, carton, or other package). SSCCs appear in DESADV messages in GIN+BJ or GIN+ML segments within CPS/PAC packaging groups. Every pallet and carton in a despatch should have its own SSCC. Most retailers require SSCC scanning at receiving.

GIN+BJ+00393123456789012341

Syntax Identifier

Concept

Character set declaration in UNB

The first element of the UNB segment identifies the character set. UNOA uses the basic Latin character set (uppercase only). UNOB adds lowercase letters. UNOC adds additional characters for Western European languages. Most Australian EDIFACT uses UNOA or UNOB.

UNB+UNOA:2+...

T

TAX

Segment

Duty/Tax/Fee Details

The TAX segment specifies tax information for a line item or the whole transaction. TAX+7+VAT means the tax is GST/VAT. Element 5 sub-element 3 carries the tax rate (e.g. 10 for 10% GST). Element 6 is the category code (S=standard rate, Z=zero rated, E=exempt). The TAX segment is usually followed by MOA+124 for the tax amount.

TAX+7+VAT+++:::10+STAX codes, structure and example

TDT

Segment

Transport Information

The TDT segment carries transport and carrier information. Element 2 is the shipment reference number. Element 3 is the transport mode code (10=maritime, 20=rail, 30=road, 40=air). Element 5 is a composite identifying the carrier (name and code). Used in ORDERS for requested transport and in DESADV for actual carrier details.

TDT+20+TRUCK-REF-01+30++VANS:::FAST_FREIGHT_PTY_LTDTDT codes, structure and example

TOD

Segment

Terms of Delivery or Transport

The TOD segment carries Incoterms and delivery terms. TOD+3++DAP means delivered at place. Common Incoterms in Australian retail: EXW (ex works), FCA (free carrier), DAP (delivered at place), DDP (delivered duty paid). Not to be confused with TDT which carries the physical transport details.

TOD+3++DAPTOD codes, structure and example

U

UN/EDIFACT

Concept

The international EDI standard maintained by the United Nations

UN/EDIFACT (United Nations Electronic Data Interchange for Administration, Commerce and Transport) is the international standard for electronic business messaging. It is maintained by UN/CEFACT and published in annual versions (D96A from 1996, D01B from 2001, D10A from 2010 etc). EANCOM is the GS1 retail profile of UN/EDIFACT.

UNA

Segment

Service String Advice

The UNA segment is optional and defines the delimiter characters used in the interchange. If absent, the default delimiters apply: + for element separator, : for sub-element separator, . for decimal notation, ? for release character, space for reserved, ' for segment terminator. UNA:+.? ' is the standard default UNA.

UNA:+.? 'UNA codes, structure and example

UNB

Segment

Interchange Header

The UNB segment opens an EDIFACT interchange. It contains the syntax identifier and version, sender identification (with qualifier), recipient identification (with qualifier), preparation date and time, and the interchange control reference. Every UNB must have a matching UNZ at the end of the interchange.

UNB+UNOA:2+9322000000456:ZZ+9311000000123:ZZ+260823:0900+CTRL-001UNB codes, structure and example

UNH

Segment

Message Header

The UNH segment opens an individual message within an interchange. It contains the message reference number, the message type (ORDERS, DESADV, INVOIC etc), the version (D96A, D01B etc), the controlling agency (UN or EAN), and optionally the association code (EAN008 for EANCOM). Every UNH must have a matching UNT.

UNH+1+ORDERS:D:96A:UN:EAN008UNH codes, structure and example

UNS

Segment

Section Control

The UNS segment separates the detail section from the summary section of a message. UNS+S marks the start of the summary. Everything after UNS+S is summary-level data: total MOA segments, summary TAX segments, and the CNT line count. Line item groups must appear before UNS+S.

UNS+SUNS codes, structure and example

UNT

Segment

Message Trailer

The UNT segment closes an individual message and carries two values: the total number of segments in the message (including UNH and UNT) and the message reference number matching the UNH. If the segment count does not match, the message is malformed.

UNT+36+1UNT codes, structure and example

UNZ

Segment

Interchange Trailer

The UNZ segment closes an interchange and carries the number of messages in the interchange and the control reference matching the UNB. UNZ+1+CTRL-001 means one message in the interchange with control reference CTRL-001.

UNZ+1+CTRL-001UNZ codes, structure and example

V

VAN

Concept

Value Added Network

A third-party service that provides EDI connectivity between trading partners. VANs handle the transport layer (AS2, SFTP, FTP) and often provide message routing, transformation, and archival. Common VANs in Australia include MessageXchange, TrueCommerce, and OpenText. CleanEDI sits on top of the VAN connection and handles the EDIFACT parsing and mapping.

Version

Concept

The release of UN/EDIFACT used in a message

EDIFACT is published in annual directory versions. The version appears in the UNH segment as a two-part code: directory version (D) and release year and suffix (96A, 01B, 10A). D96A is from 1996, D01B from 2001. Most Australian retailers use D96A or D01B. Some use newer versions for specific message types.

UNH+1+ORDERS:D:96A:UN

How an EDIFACT message is put together.

Every EDIFACT message follows the same shape, whether it is an ORDERS purchase order, a DESADV despatch advice or an INVOIC invoice. Segments end with an apostrophe, data elements are separated by +, components by :, and ? releases a character that would otherwise be read as a delimiter. Once you know the five parts below, any message becomes readable.

Interchange envelope
UNA, UNB

Who is sending to whom, when, and which character set and delimiters are used.

Message header
UNH, BGM, DTM

The message type and version, the document number and its key dates.

Parties and terms
NAD, RFF, CUX, TAX

Buyer, supplier and delivery locations, references, currency and tax.

Line items
LIN, PIA, QTY, PRI

Each product, its identifiers, quantity and price.

Summary and trailers
UNS, CNT, MOA, UNT, UNZ

Totals and control counts that let the receiver confirm nothing is missing.

EDIFACT, explained.

Short answers to what people ask most when they first open an EDIFACT file.

How do I read an EDIFACT message?

An EDIFACT message is a series of segments, each ending with an apostrophe. Every segment starts with a three-letter tag such as BGM or NAD, followed by data elements separated by + and components separated by a colon. Read it top to bottom: the UNB and UNH envelope, then header segments like BGM and DTM, the parties in NAD, the line items in LIN and QTY, and finally the UNT and UNZ trailers. Paste a message into the explainer above to see this done for you.

What is the difference between UNB and UNH?

UNB opens the interchange, the electronic envelope that can carry several messages between two trading partners. UNH opens one individual message inside that envelope and states its type and version, for example ORDERS D:96A. Each UNH is closed by a UNT, and the UNB is closed by a UNZ.

What does a qualifier mean in EDIFACT?

A qualifier is a code that tells you what a value means. In DTM+137:20261001:102 the qualifier 137 says the date is the document date, and 102 says it is written as CCYYMMDD. In NAD+BY the qualifier BY says the party is the buyer. The explainer translates common qualifiers into plain English.

Is my message sent anywhere when I use the explainer?

No. The explainer runs entirely in your browser. Nothing you paste is uploaded to CleanEDI or stored, so it is safe to use with real trading-partner messages.

What is the difference between the explainer and the decoder?

The explainer helps a person understand a message, segment by segment, in plain English. The decoder converts the same message into structured JSON that software can use, which is the first step of an integration.

From understanding to integration

Once you can read the message, CleanEDI turns it into clean JSON your systems can use, and back again.

Try the decoderMessage types