Delimiters are characters used to separate segments, data elements, and components within an EDI message.
Example:
BEG*00*NE*PO12345~
*— separates data elements~— marks the end of a segment
EDI stands for Electronic Data Interchange, a system that allows businesses to exchange documents electronically in a standardized format. This blog is about the understanding of EDI standards, structure, messages, mapping, and communications.
Delimiters are characters used to separate segments, data elements, and components within an EDI message.
Example:
BEG*00*NE*PO12345~
* — separates data elements
~ — marks the end of a segment
ISA, GS, ST, SE, GE, and IEA segments form the envelope structure of an X12 EDI file. They tell us:
X12 Envelope Structure
ISA
GS
ST
Transaction Data
SE
GE
IEA
Example
ISA*00*
*00*
*ZZ*BUYERID*ZZ*SUPPLIERID*260609*1000*U*00401*000000001*0*T*>
GS*PO*BUYERID*SUPPLIERID*20260609*1000*1*X*004010
ST*850*0001
BEG*00*NE*PO12345
N1*ST*ABC HOSPITAL
SE*4*0001
GE*1*1
IEA*1*000000001
1. ISA – Interchange Control Header
The ISA segment is the outermost header of the EDI
file.
Purpose
Example
ISA*00* *00* *ZZ*BUYERID*ZZ*SUPPLIERID...
Important Elements
|
Element |
Meaning |
|
ISA06 |
Sender ID |
|
ISA08 |
Receiver ID |
|
ISA13 |
Interchange Control Number |
|
ISA15 |
Test or Production Indicator |
Example
ISA15 = T
Means Test Environment
ISA15 = P
Means Production Environment
2. GS – Functional Group Header
The GS segment starts a group of related transaction sets.
Example
GS*PO*BUYERID*SUPPLIERID*20260609*1000*1*X*004010
Purpose
Groups similar transactions together.
For example:
GS
ST 850
ST 850
ST 850
GE
Three Purchase Orders inside one Functional Group.
Common Functional IDs
|
Code |
Meaning |
|
PO |
Purchase Orders |
|
IN |
Invoices |
|
SH |
Ship Notices |
|
FA |
Acknowledgments |
3. ST – Transaction Set Header
Begins a transaction document.
Example
ST*850*0001
Meaning
|
Element |
Value |
|
ST01 |
850 |
|
ST02 |
0001 |
850 = Purchase Order
4. SE – Transaction Set Trailer
Ends the transaction document.
Example
SE*4*0001
Meaning
|
Element |
Value |
|
SE01 |
Number of Segments |
|
SE02 |
Transaction Control Number |
5. GE – Functional Group Trailer
Ends the Functional Group.
Example
GE*1*1
Meaning
|
Element |
Value |
|
GE01 |
Number of Transactions |
|
GE02 |
Group Control Number |
6. IEA – Interchange Control Trailer
Closes the entire EDI interchange.
Example
IEA*1*000000001
Meaning
|
Element |
Value |
|
IEA01 |
Number of Functional Groups |
|
IEA02 |
Interchange Control Number |
How Control Numbers Work
Transaction Level
ST*850*0001
...
SE*10*0001
ST02 must equal SE02.
Group Level
GS*PO*...*100
...
GE*1*100
GS06 must equal GE02.
Interchange Level
ISA*...*999999999
...
IEA*1*999999999
ISA13 must equal IEA02.
1. What is a Segment?
A Segment is a line of information in an EDI
document.
Example (X12 N1 Segment)
N1*ST*ABC HOSPITAL*92*1001
Here, N1 is the segment identifier.
This segment contains Ship-To information.
Common X12 Segments
|
Segment |
Meaning |
|
ISA |
Interchange Header |
|
GS |
Functional Group Header |
|
ST |
Transaction Header |
|
BEG |
Beginning Segment for PO |
|
N1 |
Name Information |
|
PO1 |
Purchase Order Line |
|
CTT |
Transaction Totals |
|
SE |
Transaction Trailer |
2. What is a Data Element?
A Data Element is the smallest piece of business
information.
Example
N1*ST*ABC HOSPITAL*92*1001
Breaking it down:
|
Position |
Value |
Meaning |
|
N1 |
Segment ID |
Name Segment |
|
ST |
Entity Code |
Ship-To |
|
ABC HOSPITAL |
Name |
Customer Name |
|
92 |
Qualifier |
Assigned by Buyer |
|
1001 |
ID |
Customer Number |
Each value separated by * is a data element.
3. What is a Composite Element?
A Composite Element contains multiple related values
grouped together.
Example (EDIFACT)
C506:USD:4
Breaking it down:
|
Component |
Value |
|
Currency Code |
USD |
|
Qualifier |
4 |
The : separator divides components inside the composite.
In EDIFACT, composites are very common.
Example
PRI+AAA:10.50
|
Component |
Meaning |
|
AAA |
Price Type |
|
10.50 |
Unit Price |
4. What is a Loop?
A Loop is a repeating group of related segments.
Imagine a Purchase Order with multiple products.
PO Example
PO1*1*100*EA
PID*Widget A
PO1*2*50*EA
PID*Widget B
PO1*3*25*EA
PID*Widget C
Each PO1 + PID group forms a repeating loop.
Example from EDI Work
Consider this EDI segment:
PIA+5+B0C2ZNX6T8:BP'
Breaking it down:
Segment
PIA
(Product Identification)
Data Elements
5
B0C2ZNX6T8:BP
Composite Element
B0C2ZNX6T8:BP
|
Component |
Meaning |
|
B0C2ZNX6T8 |
Product ID |
|
BP |
Buyer's Part Number |
What is an EDI Standard?
An EDI standard is a set of rules that defines:
Businesses use different EDI standards.
1. ANSI X12
ANSI X12 (American National Standards Institute X12)
is the most widely used EDI standard in North America.
This standard is commonly used In
Industries
Example: Purchase Order (850)
ST*850*0001
BEG*00*NE*PO12345
N1*ST*ABC HOSPITAL
PO1*1*100*EA
SE*4*0001
Common X12 Transactions
|
Transaction Set |
Description |
|
850 |
Purchase Order |
|
855 |
Purchase Order Acknowledgment |
|
856 |
Advance Ship Notice |
|
810 |
Invoice |
|
997 |
Functional Acknowledgment |
|
846 |
Inventory Inquiry/Advice |
2. EDIFACT
EDIFACT stands for:
Electronic Data Interchange for Administration, Commerce
and Transport
It was developed under the supervision of the United Nations
and is the most widely used international EDI standard.
This standard is commonly used In
Example: Purchase Order (ORDERS)
UNH+1+ORDERS:D:96A:UN
BGM+220+PO12345
NAD+BY+123456789
LIN+1
UNT+4+1
Common EDIFACT Messages
|
Message Type |
Description |
|
ORDERS |
Purchase Order |
|
ORDRSP |
Order Response |
|
DESADV |
Advance Ship Notice |
|
INVOIC |
Invoice |
|
CONTRL |
Functional Acknowledgment |
Different between X12 vs EDIFACT
|
Feature |
ANSI X12 |
EDIFACT |
|
Origin |
USA |
United Nations |
|
Primary Usage |
North America |
International |
|
Segment Separator |
* |
+ |
|
Element Separator |
* |
+ |
|
Terminator |
~ |
' |
|
Purchase Order |
850 |
ORDERS |
|
Invoice |
810 |
INVOIC |
|
ASN |
856 |
DESADV |
Example Comparison
X12 Purchase Order
BEG*00*NE*PO12345
EDIFACT Purchase Order
BGM+220+PO12345
Both mean:
"Purchase Order Number = PO12345"
The business meaning is the same, but the format differs.
Why Do We Have Different EDI Standards?
Reason 1: Regional Adoption
Different regions created standards before global
standardization became common.
Reason 2: Industry Requirements
Certain industries adopted standards tailored to their
needs.
Examples:
Reason 3: Existing Investments
Large companies have used the same EDI standard for decades.
Changing standards would require:
So, companies continue using the standard already adopted by
their trading partners.
Example from My Experience
At any companies, you may see:
US Customer
850 Purchase Order
856 ASN
810 Invoice
(X12)
European Customer
ORDERS
DESADV
INVOIC
(EDIFACT)
Although the formats differ, the business process remains
the same:
Order → Acknowledgment → Shipment → Invoice
1. EDI (Electronic Data Interchange)
EDI follows industry standards.
Example (X12 850 Purchase Order)
ISA*00*
*00* *ZZ*BUYER*
GS*PO*BUYER*SUPPLIER*
ST*850*0001
BEG*00*NE*PO12345
SE*4*0001
GE*1*1
IEA*1*000000001
Characteristics
2. XML (Extensible Markup Language)
XML uses opening and closing tags.
Example
<PurchaseOrder>
<OrderNumber>PO12345</OrderNumber>
<Customer>ABC
Hospital</Customer>
</PurchaseOrder>
Characteristics
3. JSON (JavaScript Object Notation)
JSON uses key-value pairs.
Example
{
"OrderNumber":
"PO12345",
"Customer": "ABC
Hospital"
}
Characteristics
4. Flat Files
Plain text files with delimiters or fixed positions.
CSV Example
PO12345,ABC Hospital,100
Pipe Delimited Example
PO12345|ABC Hospital|100
Fixed Length Example
PO12345 ABC
Hospital 100
Characteristics
Example
Imagine a customer sends a Purchase Order.
EDI Version
BEG*00*NE*PO12345
XML Version
<OrderNumber>PO12345</OrderNumber>
JSON Version
{
"OrderNumber":"PO12345"
}
Flat File Version
PO12345
Same business information, different formats.
When to Use What?
Use EDI when:
Use XML when:
Use JSON when:
Use Flat Files when:
EDI (Electronic Data Interchange) is the computer-to-computer exchange of business documents in a standard electronic format without manual intervention.
Instead of:
EDI allows systems to exchange data automatically.
Simple Example
Without EDI
Buyer → Email PDF PO → Supplier → Manual Entry → ERP
With EDI
Buyer ERP → EDI → Supplier ERP
No printing, no email, no manual typing.
Common EDI Documents
|
EDI Document |
Purpose |
|
850 |
Purchase Order |
|
855 |
PO Acknowledgment |
|
856 |
Advance Ship Notice (ASN) |
|
810 |
Invoice |
|
997 |
Functional Acknowledgment |
|
ORDERS (EDIFACT) |
Purchase Order |
|
DESADV (EDIFACT) |
ASN |
|
INVOIC (EDIFACT) |
Invoice |
Real-Life Example
Imagine a hospital orders ventilator consumables from a
medical manufacturer.
Step 1
Hospital sends:
EDI 850 Purchase Order
Step 2
Manufacturer sends:
EDI 855 Acknowledgment
Step 3
Manufacturer ships goods and sends:
EDI 856 ASN
Step 4
Manufacturer sends:
EDI 810 Invoice
Everything happens electronically between systems.
Benefits of EDI
1. Faster Processing
Orders reach trading partners within seconds.
Manual Process: Hours or days
EDI Process: Seconds or minutes
2. Reduced Errors
Manual typing causes mistakes.
Example:
EDI eliminates re-keying of data.
3. Cost Savings
Reduces:
Organizations often save significant operational costs after
EDI implementation.
4. Better Accuracy
Data is transferred exactly as generated by the source
system.
This improves:
5. Faster Cash Flow
Invoices reach customers immediately.
Result:
6. Improved Supply Chain Visibility
Documents move electronically and can be tracked.
Businesses can quickly know:
7. Scalability
A company can process thousands of orders without hiring
additional staff.
Typical EDI Flow
Customer ERP
|
EDI Translator
|
AS2 / SFTP / VAN
|
EDI Translator
|
Supplier ERP
Delimiters are characters used to separate segments, data elements, and components within an EDI message. Example: BEG*00*NE*PO12345~ * — s...