EDI Segments

A complete reference to the building blocks of UN/EDIFACT messages.

In Electronic Data Interchange, a segment is the fundamental unit of structured information within a message. Each segment serves a specific purpose, such as identifying the sender, specifying a date, describing a product, or stating a monetary amount. Segments are composed of data elements separated by delimiters, and they always begin with a three-letter segment tag that identifies their type.

UN/EDIFACT messages are built by combining segments in a defined order according to message specifications. Some segments are mandatory in every message (such as the envelope segments UNB, UNH, UNT, and UNZ), while others are conditional and appear only when relevant to the business scenario. Understanding each segment's role, structure, and data elements is essential for anyone implementing, mapping, or troubleshooting EDI transactions.

The segments listed below represent the most commonly used building blocks across EDIFACT message types. Whether you are working with invoices (INVOIC), purchase orders (ORDERS), despatch advice (DESADV), or any other standard message, you will encounter these segments regularly.

Service Segments (Envelope)

These segments form the interchange and message envelopes. They are required in every EDIFACT transmission and handle routing, identification, and integrity checking.

Common Data Segments

These segments carry the core business information within messages. They appear across many different message types and form the backbone of most EDI transactions.