Electronic data interchange

Also known as: EDI

On this page 7

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.

  1. The sender’s ERP produces an internal record, for example a purchase order.
  2. A translator maps the record to a standard document such as an X12 850 or EDIFACT ORDERS message.
  3. The message is wrapped in envelopes that identify sender, receiver and control numbers.
  4. It travels through a value-added network (VAN) or a direct protocol such as AS2.
  5. 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 documentX12 codeEDIFACT messageDirection
Purchase order850ORDERSBuyer to supplier
Order acknowledgment855ORDRSPSupplier to buyer
Advance ship notice856DESADVSupplier to buyer
Invoice810INVOICSupplier to buyer
Functional acknowledgment997 or 999CONTRLReceiver to sender
Remittance advice820REMADVBuyer to supplier
Frequently used EDI documents in X12 and EDIFACT

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.

MethodHow it worksMain advantageMain drawback
Value-added networkProvider mailboxes relay messagesOne connection reaches many partnersPer-message or per-character fees
AS2Signed, encrypted HTTP with receiptsNon-repudiation through MDN receiptsCertificate management per partner
SFTPFiles exchanged over SSHSimple and inexpensiveNo built-in delivery receipt
AS4Web services messaging profileUsed in modern e-invoicing networksMore complex to configure
EDI over APIDocuments sent through HTTPS APIsFits cloud integration platformsNot accepted by every partner
Comparison of EDI communication methods

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.

AspectElectronic data interchangeAPI integration
Message modelComplete business documentsIndividual requests and resources
TimingBatches, often scheduledReal time or near real time
Format authorityX12, EDIFACT and industry guidesEach provider’s own schema
Onboarding a partnerWeeks of mapping and testingDays with good documentation
Audit trailEnvelopes, control numbers, receiptsDepends on logging design
Typical partnersRetailers, carriers, insurersSaaS platforms, marketplaces
EDI and API integration side by side

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.