Electronic data interchange (EDI) is the computer-to-computer exchange of business documents such as purchase orders, invoices and shipping notices in a standardized, machine-readable format agreed between trading partners. In integration, EDI is the oldest and still the most widely used method for automating business-to-business (B2B) transactions between companies that run different internal systems.
EDI replaces paper, email attachments and manual rekeying with structured messages that an ERP or warehouse system can process without human intervention. Within Automation, it forms the external edge of order-to-cash and procure-to-pay processes, where accuracy, traceability and partner compliance matter more than raw speed.
How electronic data interchange works
EDI works by converting an internal business record into a standard message, transmitting it over an agreed channel and converting it back into the receiver’s own data structure. The conversion step is called translation or mapping, and it is usually performed by EDI translator software or an integration platform.
- The sender’s ERP produces an internal record, for example a purchase order.
- A translator maps the record to a standard document such as an X12 850 or EDIFACT ORDERS message.
- The message is wrapped in envelopes that identify sender, receiver and control numbers.
- It travels through a value-added network (VAN) or a direct protocol such as AS2.
- The receiver validates syntax, returns a functional acknowledgment, and maps the data into its own system.
Envelopes form a hierarchy. In ANSI X12 the interchange (ISA/IEA) contains functional groups (GS/GE), which contain transaction sets (ST/SE); EDIFACT uses the equivalent UNB, UNG and UNH segments. Control numbers at each level allow both sides to detect duplicates and missing messages.
EDI standards and common transaction sets
Two standards dominate EDI: ANSI ASC X12, used mainly in North America, and UN/EDIFACT, the international standard maintained under the United Nations. Industry subsets narrow them further, for example EANCOM for retail, HL7 messaging in health care, ODETTE and VDA in European automotive supply chains, and HIPAA-mandated X12 formats for US health claims.
The table below shows the transaction sets that appear in nearly every retail and manufacturing EDI program.
| Business document | X12 code | EDIFACT message | Direction |
|---|---|---|---|
| Purchase order | 850 | ORDERS | Buyer to supplier |
| Order acknowledgment | 855 | ORDRSP | Supplier to buyer |
| Advance ship notice | 856 | DESADV | Supplier to buyer |
| Invoice | 810 | INVOIC | Supplier to buyer |
| Functional acknowledgment | 997 or 999 | CONTRL | Receiver to sender |
| Remittance advice | 820 | REMADV | Buyer to supplier |
Each large trading partner publishes an implementation guide that specifies which optional segments, qualifiers and code values it requires. Two retailers can both accept an X12 856, yet expect different packing hierarchies and label data, which is why each new partner needs its own map and testing.
Transport methods for EDI messages
EDI messages travel either through a third-party network or over a direct, secured connection between partners, and the choice affects cost, setup effort and visibility. Many companies use both, because each partner dictates its preferred channel.
| Method | How it works | Main advantage | Main drawback |
|---|---|---|---|
| Value-added network | Provider mailboxes relay messages | One connection reaches many partners | Per-message or per-character fees |
| AS2 | Signed, encrypted HTTP with receipts | Non-repudiation through MDN receipts | Certificate management per partner |
| SFTP | Files exchanged over SSH | Simple and inexpensive | No built-in delivery receipt |
| AS4 | Web services messaging profile | Used in modern e-invoicing networks | More complex to configure |
| EDI over API | Documents sent through HTTPS APIs | Fits cloud integration platforms | Not accepted by every partner |
AS2 returns a Message Disposition Notification (MDN), a signed receipt proving that the partner received an unaltered message. This legal evidence is a key reason large retailers such as major grocery chains have required AS2 for years.
EDI compared with API integration
EDI and API integration both move data between systems, but EDI is batch-oriented, document-based and governed by external standards, whereas APIs are typically real-time, resource-based and defined by each vendor. Neither replaces the other in most enterprises; they serve different relationships.
| Aspect | Electronic data interchange | API integration |
|---|---|---|
| Message model | Complete business documents | Individual requests and resources |
| Timing | Batches, often scheduled | Real time or near real time |
| Format authority | X12, EDIFACT and industry guides | Each provider’s own schema |
| Onboarding a partner | Weeks of mapping and testing | Days with good documentation |
| Audit trail | Envelopes, control numbers, receipts | Depends on logging design |
| Typical partners | Retailers, carriers, insurers | SaaS platforms, marketplaces |
Modern iPaaS products and dedicated EDI services often translate EDI to JSON at the edge, so internal systems consume an API while external partners still receive standard documents. This hybrid pattern relies heavily on data mapping and a canonical data model.
Implementation challenges and common mistakes
Most EDI problems stem from mapping errors and partner-specific rules, not from the transport. Retailers commonly issue chargebacks for late, missing or inaccurate advance ship notices, so EDI quality has a direct financial effect.
- Ignoring functional acknowledgments hides rejected messages; monitor 997 and 999 responses daily.
- Reusing one map for all partners breaks on partner-specific qualifiers; maintain a map per guide.
- Sending an ASN after the truck arrives triggers penalties; generate it at shipment confirmation.
- Skipping partner testing cycles sends malformed data to production; complete test and certification rounds.
- Letting AS2 certificates expire silently stops traffic; track expiry dates and renew early.
A further risk is hidden dependence on a single specialist who understands legacy maps. Documenting each map, keeping test files per partner and storing versions in source control make EDI programs maintainable when staff or platforms change.
Explained without jargon
Electronic data interchange is a way for companies to send business paperwork directly between computers. Instead of emailing a PDF order that someone must type in again, the buyer’s system sends a structured message that the seller’s system reads by itself.
It works like a shared form that every company fills in the same way, so each box always means the same thing. The result is fewer typing errors and faster orders, even between businesses that use completely different software.
A typical use case
A mid-sized household goods manufacturer supplies a national retail chain that requires EDI for every order. Each morning the retailer’s system sends X12 850 purchase orders over AS2; the manufacturer’s integration platform maps them into its ERP within minutes and returns 997 acknowledgments and 855 order confirmations automatically.
When pallets leave the warehouse, the shipping system creates an 856 advance ship notice with carton-level barcodes, and the ERP issues an 810 invoice after delivery. Before EDI, two clerks rekeyed about 300 orders a week, and the retailer charged penalties for missing shipment data. After the rollout, order entry errors fell to near zero, chargebacks dropped sharply and payment arrived several days sooner because invoices matched orders and receipts exactly.