EDI2XML

12
Aug 2019
EDI-ANSI-ASC-X12-Technical Overview
(Last Updated On: March 19, 2024)

This post was updated to reflect current trends and information.


Understanding the Basics of  EDI ANSI ASC X12

This article describes the EDI ANSI ASC X12 standard (American National Standards Institute Accredited Standards Committee X12).

This overview provides full information on the EDI ANSI X12 standards, including general terms (Interchange, functional group, document), description of the main components of an EDI document (segments, elements), and how an EDI document is structured.

What is meant by EDI?

EDI Electronic Data Interchange is the process of electronically exchanging business documents (in a pre-defined format) between trading partners.

The EDI ANSI ASC X12 standard has different versions (related to development standards) – 4010, 5010, 5020

In EDI X12, each document has a three-digit number identifier. For example, an Invoice is 810, an Inventory Inquiry/Advice is 846,  an Advance Ship Notice  is 856, etc. more detailed list of EDI X12 documents with its identifier you can find here: Complete List of EDI X12 Codes


ANSI (American National Standards Institute) – is a non-profit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States. EDI is handled by the Accredited Standards Committee X12 (ASC X12), it develops and maintains the X12 Electronic data interchange (EDI).

EDIFACT (Electronic Data Interchange for Administration, Commerce, and Transport.) EDIFACT standard is used mainly in Europe.


EDI Terminologies:

Interchange (or Envelop)

Interchange envelope is a structured data set to deliver electronic transactions to a receiving. Interchange can include a package of groups of documents but also may contain only one group with one document.

The Interchange structure

EDI document structure

Interchange begins with the ISA segment and ends with the IEA segment (ISA / IEA Envelope).

EDI X12 – Functional Group

A functional group is a group of one or more similar transaction sets. The beginning of the functional group is determined by the GS segment and the end by the GE segment.

How does an EDI document look (example)

ISA*00*          *00*          *ZZ*A1STORES    *12*5142645505     *190510*0728*|*00403*100000013*0*P*}

GS*PO*A1STORES*5142645505*20190510*0728*1013*X*004030

ST*850*1013

BEG*00*SA*2332233**20190510

REF*IA*66910

PER*BD*Contact Name*TE*123-456-7890

FOB*DF

DTM*010*20190517

DTM*001*20190525

TD5*****Carrier Routing*******CG

N1*ST*Towner Square Schooms*92*006

N3*Williston Towner Square*2100 11th St SW

N4*Williston*ND*58701

PO1*1*4*EA*4.15**UP*066810348563*IT*WACT750SP16-BLK

CTP**RTL*7.99

PID*F*08***Nike Boy Short Black sz M

PO1*2*6*EA*5.00**UP*066810349983*IT*WACT170SP16-AMP

CTP**RTL*7.99

PID*F*08*** Reebok Boy Short Abstract Print sz M

PO1*3*4*EA*5.25**UP*066810349747*IT*WACT790SP16-BLK

CTP**RTL*9.99

PID*F*08*** Puma Boy Short Red sz M

CTT*3

SE*22*1013

GE*1*1013

IEA*1*100000013

What is an EDI envelope?

The outer envelope ISA / IEA contains one or more functional Groups (GS/GE Envelopes) that contain the data, each in a separate envelope (ST/SE Envelopes).

The ISA / IEA envelope contains the addresses of the recipient company and the sending company.

The GS / GE envelope contains information about the type of documents contained in it, they are denoted as a two-letter code. (functional ID code). For example, PO for 850 Purchase Order, IN for 810 Invoice. Such an envelope contains only documents of the same type. GS also contains sender’s and receiver’s ID code, functional Group control numbers, date and time.

Functional Group Header (GS)


Functional Group Trailer (GE)

Functional Group Trailer (GE)

EDI segments

A segment in an EDI document is a group of identical data elements that may occur several times, to provide information about a product (i.e. weight, color, size, etc.)

edi x12 Segment

Segment optionality

Segments in a EDI X12 document  can be of two types:

M (mandatory) – a mandatory segment. Such a segment contains the basic information of the document. The mandatory segment cannot be omitted from the document. Example of the mandatory segment:

BEG*00*SA*2332233**20190510

This is the (BEG) segment of the header, it contains general document information:

  • Destination (00 – Original)
  • type (SA – Stand-alone Order)
  • order number (2332233)
  • 20190510 – Mai 10, 2019

This segment identifies the document.

O is an optional segment. These are segments containing secondary information. Optional segments may not be present in the EDI document. An example of an optional segment:

PER*BD*Contact Name*TE*123-456-7890

This is a PER segment – Administrative Communications Contact, i.e. “contact information”. This segment contains the following information:

  • BD- Buyer Name or Department
  • TE – Telephone
  • The phone number itself 123-456-7890

EDI Document Structure

The initial segments of each section, is called Header, and the final segment is called Trailer:

  • ISA – Interchange Control Header – this is the segment that defines the sender and recipient.
  • GS – Functional Group Header – this segment defines the type of document(s) that are included in this group.
  • ST – Transaction Set Header – this segment starts the document and is used to assign a control number.
  • SE – Transaction Set Trailer – the segment defines the end of the document.
  • GE – Functional Group Trailer– defines the end of the data that was started by the GS segment.
  • IEA – Interchange Control Trailer – is ending the Interchange segment.

EDI document: Header, Details, and Summary

Each EDI document (i. e. an order, an invoice) is divided into three groups – Header, Details, and Summary.

EDI structure

The Header of the document contains general information such as number, contact information, dates of delivery, addresses, etc.

The details of the EDI document contain information about the ordered product (quantity, price, etc.).

The Summary contains information such as the total cost of the goods, number of goods, etc.

Using EDI in business

EDI is used in many industries, but primarily in trading, transport, and logistics.

Retailers such as Costco, Walmart, and others use EDI X12 to exchange electronic documents with their trading partners.

Typically, a retailer and suppliers exchange the following EDI documents:

EDI is the connecting suppliers and retailers and allows business partners to minimize errors, and automate processes.

Free EDI consultation

RELATED POSTS:

What is EDIFACT? | UN / EDIFACT standard overview

Electronic Data Interchange: Key Information You Need to Know

What Are the Differences Between ANSI X12 and UN/EDIFACT

A technical introduction to EDI

Comments are closed.