Electronic Data Interchange (EDI) is a minimalist format that is widely popular among business and even some government agencies as a medium of data exchange. In addition to regulatory requirements, its standardized format, time and resources saved by reducing paper use, lesser errors in comparison to manual processes, and low carbon footprint in exchange and storing data are some of the reasons for this adoption . Despite these advantages, understanding an EDI file at first glance (or even after several attempts ) can be a daunting task for a beginner.
Before trying to understand an EDI file, there are some key concepts to understand.
An EDI transaction is a message sent between partners that complies with a predefined EDI specification. To start an EDI transaction, both parties must agree to the same standard, same version and finally the same EDI specification, a syntax set to follow for each document type they are exchanging. Examples of such document types are:
For most of these document types, there is a standard EDI specification offered by EDI standard organizations like X12 Electronic Data Interchange (EDI) Standards, GS1 EANCOM EDI (Electronic Data Interchange) Standards, etc. Users can opt to use the same specification that the standard organization issues, or they can use a subset of the standard segments. In most cases, it would be the latter. To understand an EDI file, one must first obtain the corresponding EDI specification relevant to the EDI transaction they are using.
Below is a part of an EDI specification for an invoice.
What an EDI specification defines is basically the arrangement of segments and elements for a particular EDI transaction. A segment is a unit of information in an EDI file that represents a specific piece of information in the document. Every segment has a unique segment identifier. ISA, GS, ST, BIG, REF, N1, FOB, and others from figure 1 are examples of such segment identifiers. Segments are separated by a segment terminator; usually this is ~ (tilde) or a new line. For each segment there are some additional parameters,
Each segment consists of elements that represent a qualifier, a value, or a description relevant to the segment. Every element has a data type and a value, and similar to a segment, elements are separated by an element separator. The * (asterisk) character is used in most cases as this element separator. Each element is also given a unique reference, created with the segment identifier of the element and the element’s position in the file.
With the information above, let’s interpret the below X12 EDI file for an invoice. Originally, the segments will be separated by only the segment terminator. However, to simplify the explanation, note that the below EDI was pre-formatted to have each segment in a new line.
ISA*00* *00* *ZZ*ADRTPROD *08*925485US00 *210701*1017*;*00501*100100547*0*P*>~
GS*IN*ADRTPROD*925485US00*20210701*1017*200200547*X*005010~
ST*810*300300547~
BIG*20210704*WM0000001*20210624*5712201706***~
REF*IA*123456789~
REF*BM*BL123456789~
N1*ST*REGIONAL DISTRIBUTION CENTER 6285*UL*0078742090955~
N3*94-1420 MOANIANI ST~
N4*WAIPAHU*HI*96797*US~
N1*BT*WALMART INC.*UL*0078742090955~
N1*VN*SUPPLIER HAWAII LLC~
N3*12-345 BAKER ST~
N4*Laie*HI*12345*US~
DTM*011*20210703~
IT1**20*EA*3.75**IN*592351350*EN*7930526001294*UK*07930526001294~
IT1**20*EA*3.75**IN*592351352*EN*8801600264982*UK*08801600264982~
TDS*15000~
CAD*T***UPSN***BM*BL123456789~
ISS*02020*EA~
CTT*2~
SE*19*300300547~
GE*1*200200547~
IEA*1*100100547~
Each segment begins with its unique segment identifier and ends with the predefined segment terminator; in this case, the terminator is ~. For any EDI file of the X12 standard, there are two envelope segments, ISA and GS, which indicate the beginning of the file and include details about the sender, recipient, date, versions, and unique control numbers for the transaction. Additionally there are two corresponding trailer segments that mark the end of the EDI file, namely GE and IEA.
The actual content of the EDI file starts with the ST segment.
ST*810*300300547~
For every segment, the element position is counted with the help of the element separator; in this case, first element appears after the first * character, and likewise the second element appears after the second * character, and the segment ends with the segment separator (~). To understand the EDI file, one has to refer to the segment overview of each segment.
ST01 | 810 | Transaction set identifier code. This helps the reader identify the document type they are receiving; here the document is an 810, which means it’s an invoice. |
ST02 | 300300547 | Transaction set control number is a unique number in the document originators point of view. |
BIG*20210704*WM0000001*20210624*5712201706***~
The next segment is the BIG segment, which indicates the beginning segment of the invoice. Before going into the interpretation, notice how there are three * characters at the end of the segment. That is because the 5th and 6th elements are opted out by the 2 parties that exchange the invoice. Additionally the sender has not set the 7th element in this particular Invoice, since BIG07 is an optional element according to the EDI specification.
BIG01 | 20210704 | Date for the invoice in YYYYMMDD format: 4th July, 2021 |
BIG02 | WM0000001 | This is the invoice number assigned by the issuer. |
BIG03 | 20210624 | Retailer’s original purchase order date in the same format as BIG01; here it is 24th June, 2021. |
BIG04 | 5712201706 | Purchase order number assigned by the purchaser |
By following this same method, one can understand an EDI file segment by segment with the help of the relevant EDI specification. However, this conversion of EDI to a human-readable format could be a tiring task with a steep learning curve. Therefore , the quickest and easiest way to understand and generate an EDI file is to use an EDI solution.
EDI Generator is a complete hosted solution that specializes in converting EDI files to a human-readable document and vice versa, along with many other features. Sign up for the free trial and enjoy hassle-free EDI transactions.
Samadhi is a Software Engineer at Aayu Technologies with around 1 year experience in the company during which she worked in various Aayu products. She specializes in Full Stack Development with a strong focus on B2B communication software and Cloud Technologies. Outside of work she enjoys watching a movie or a TV show or going on a shopping spree with friends.