Grant Holden EDI Author.png
Grant Holden
Jan 14, 2025 6 Min Read

How to Read EDI Files: Definition, Formats, and Examples

Decoding electronic data documents begins with understanding their core elements. Learn how to read EDI files effectively and streamline your processes.

EDI 101

One of the biggest selling points of electronic data exchange (EDI) is its ability to simplify complex data exchange processes in a digitized, standardized manner. But behind the scenes, it’s actually anything but simple.

EDI relies on hundreds of file types, each with specific standards and rules, that at first glance may appear as a chaotic mix of letters, numbers, and symbols. In reality, it’s a meticulously organized system that allows trading partners to share vital information in real time from anywhere in the world.

The code might seem uncrackable, but if you understand what each component means, learning how to read EDI files is easier than you might think.

In this guide, we'll tell you what you need to know.

What Is an EDI File Format?

An EDI format is a data file that follows specific standards, allowing trading partners to exchange information digitally. By automating processes, these formats eliminate the need for manual input. The result? Smoother operations, fewer errors, and real-time data updates.

EDI data formats follow standards like EDIFACT and ANSI X12, which define the syntax and structure of the information they contain (more on these below). These formats allow industries to efficiently manage large volumes of data transactions. In logistics, they automate key tasks such as shipping tracking, inventory management, and order fulfillment. In retail, EDI streamlines order processing, communication with manufacturers, and inventory tracking. For SaaS companies, EDI supports partner integrations and boosts automation across services.

Common EDI File Formats

EDI standards follow specific formats that allow trading partners to transact across the globe with ease. Here’s an overview of the most common EDI templates used worldwide:

UN/EDIFACT

Created by the United Nations, UN/EDIFACT is an internationally recognized standard that supports a broad range of documents and industries, with subsets like EANCOM tailored for retail. By standardizing cross-border transactions, EDIFACT helps trading partners manage complex supply chains more effectively.

TRADACOMS

Developed for domestic trade in the United Kingdom, TRADACOMS predates EDIFACT and features 26 hierarchical message types, each identified by six-letter references. TRADACOMS stands out by allowing multiple messages within a single transmission, unlike other EDI standards. It also employs segments, similar to EDIFACT, to simplify translation and ensure smooth communication across systems.

ANSIX12

Introduced by the Accredited Standards Committee (ASC), ANSI X12 defines transaction codes and segments that standardize business transactions across industries. Primarily used in North America, this standard ensures consistency and clarity in document exchanges between trading partners in the United States and Canada.

UBL (Universal Business Language)

Developed by the OASIS group (a global organization dedicated to the development and adoption of open standards), UBL uses an XML structure, making its data format easier to read and translate than traditional EDI formats. UBL organizes messages into high-level categories like transportation, procurement, and sourcing and includes features like parsers and validators to support data exchange.

VDA

Developed by the German Automotive Industry Association (Verband der Automobilindustrie) and commonly used across the European Union, VDA outlines clear communication guidelines to support accurate and reliable business transactions within the automotive sector.  

Key Components of an EDI File Format Sample

EDI files consist of a series of segments and elements, each key to maintaining data integrity. Here’s a closer look at both:

Segments

Segments are groups of related data elements within an EDI message. Each line in an EDI file represents a segment, and each segment usually starts with a three-character identifier, like BEG-01, making it easy to recognize. Commonly found in documents like purchase orders or invoices, segments can include information such as street addresses or product numbers.

Elements

Elements are the smallest components of an EDI document, representing individual data items. They act as placeholders between unique characters. For example, in an invoice, elements might include product names, quantities, or costs. These elements provide the granular details required for accurate data exchange.

How to Interpret EDI Files

EDI files vary by standard and industry, but all follow strict structured formats — a must for accurate data exchange. They consist of hierarchical segments, each serving a specific purpose, with data elements providing key document information. Control numbers, segment counts, and validation rules ensure data accuracy and compliance with EDI standards.

EDI File Elements

  • Check the file header segment: The header indicates the file’s EDI standard and contains metadata, including the data type, sender ID, and receiver ID. ANSI X12 uses a header segment called ISA, while EDIFACT uses UNH.

  • Locate the functional groups: Functional groups contain related transaction sets, such as invoices or purchase orders. For example, in ANSI X12, the GS segment represents a group of related transactions.

  • Identify key segments within a message: Each segment has a unique identifier and purpose. Common examples include ST (the start of a transaction set), N1 (details about a specific party, such as a buyer or seller), BEG (the start of a purchase order), and SE (the end of a transaction set).

EDI Data Elements

  • Refer to the implementation guide: The guide outlines the structure of each segment, describing mandatory fields, acceptable values, and expected formats.

  • Understand the segment syntax: Tags like ST or BEG denote segments, and their elements are separated by delimiters such as minus signs, plus signs, and colons, depending on the EDI standard.

Control Numbers and Validation Rules

  • Track control numbers: Control numbers keep transactions organized and prevent duplicates. In ANSI X12, for instance, the GS06, ISA13, and ST02 numbers should match across all related transactions.

  • Count segments: Double-check that the number of segments matches the totals in the file to verify nothing is missing from the interchange.

  • Validate segments:Make sure the segments follow the rules of the EDI standard, whether EDIFACT, ANSI X12, or another standard. Check for missing elements or syntax errors.

  • Find and fix errors: Using an EDI parsing tool (software that reviews EDI files for errors), check for issues like mismatched data or missing fields.

EDI File Format Example: EDI 850 (Purchase Order)

Again, the specifics of every EDI file vary depending on the standard and transaction type. To better understand their structure, here’s an example of a common EDI transaction, the EDI 850 Purchase Order that follows the ANSI X12 standard, and a breakdown of its segments and their purpose:

ISA*00*          *00*          *ZZ*SENDERID      *ZZ*RECEIVERID    *210315*1234*U*00401*000000001*0*P*>

GS*PO*SENDERID*RECEIVERID*20210315*1234*1*X*004010

ST*850*0001

BEG*00*NE*123456789**20210315

REF*IA*987654

DTM*002*20210320

N1*ST*BUYER NAME*92*12345

N3*123 BUYER STREET

N4*BUYER CITY*CA*90001

N1*BT*SELLER NAME*92*67890

N3*456 SELLER STREET

N4*SELLER CITY*NY*10001

PO1*1*100*EA*10.00**VP*123456*UP*0123456789012

CTT*1

SE*12*0001

GE*1*1

IEA*1*000000001

EDI 850 segment meanings

  • ISA (interchange control header): This contains metadata such as sender and receiver IDs, date, and time of transmission.

  • GS (functional group header): This groups related transactions, such as purchase orders.

  • ST (transaction set header): This marks the beginning of the EDI 850 transaction.

  • BEG (beginning segment for Purchase Order): This includes purchase order type, number, and date.

  • REF (reference identification): This provides additional references, such as internal tracking numbers

  • DTM (date/time reference): This specifies key dates, such as shipment or delivery.

  • N1, N3, N4 (name and address segments): This defines buyer and seller names and addresses.

  • PO1 (Purchase Order line item): This details ordered items, including quantity, unit price, and product codes.

  • CTT (transaction totals): This provides the total number of line items.

  • SE (transaction set trailer): This indicates the end of the transaction set.

  • GE (functional group trailer): This closes the functional group.

  • IEA (interchange control trailer): This marks the end of the interchange.

Deciphering EDI File Formats Made Easy

Understanding EDI files might seem like learning a new language. But with the right EDI partner as your expert translator, you’ll have the support you need to decode complex transactions and integrate EDI seamlessly into your operations, saving you valuable time and resources.

Connect with an EDI expert to get started today.