Electronic data interchange
Electronic data interchange (EDI) is the computer-to-computer exchange of business documents, such as purchase orders and invoices, in a strict standard format. The receiving computer normally processes each message without a person reading it.[1] EDI is used in business and supply chain management.[2]
EDI grew out of work by transport companies in the 1960s and 1970s.[3] Two families of EDI standards are widely recognized: ASC X12 from the United States, and UN/EDIFACT, developed under the United Nations.[4]
The basic idea
EDI replaces paper and email documents with messages that a computer can read directly. A U.S. government standard, Federal Information Processing Standard (FIPS) 161-2, defines it as "the computer-to-computer interchange of strictly formatted messages that represent documents other than monetary instruments."[1] People step in mainly for errors, quality review, and special cases.[1]
Early electronic exchanges used private formats agreed between two companies, which made it hard to trade electronically with many partners.[4] A shared standard format solved this, so one company's system can exchange data with many others.
The companies that exchange EDI messages are called trading partners. A buyer and a seller are a common example.[1] Typical messages include:
- From buyer to seller: request for quotation, purchase order, receiving advice, and payment advice.[1]
- From seller to buyer: bid, purchase order acknowledgment, shipping notice, and invoice.[1]
Some messages only give information, such as a shipping notice. Others, such as a bid or a purchase order, may contain data that can be read as a legally binding obligation.[1]
How an exchange works
Software called an EDI translator converts data between a company's own systems and the EDI format.[4] The translator does two jobs:[4]
- Data mapping matches fields in the company's files to fields in the standard.
- Formatting writes the data using the standard's syntax rules, which set how data is ordered and separated.
A purchase order moves from buyer to seller in these steps:
- The buyer's business application, such as an enterprise resource planning system, writes the order data to a file or database.[4]
- The buyer's translator maps the data and formats it as an EDI message.[4]
- The message travels to the seller, directly or through a network service.[4]
- The seller's translator checks that the standard's version is supported and that the syntax is correct, then hands the data to the seller's application.[4]
- The seller's system sends back a functional acknowledgment that reports whether the message was accepted or rejected and lists any syntax errors.[4]
Agreements between partners
The standards allow many ways to express the same data, so partners agree on how to use them. For example, an X12 response to a request for quotation can carry prices in its header or line by line.[4] Industries publish implementation conventions, which are shared rules for using a standard within that industry.[4]
Partners also sign an interchange agreement, which sets how they will exchange EDI messages and handle the practical details. The UN guidelines list items such as:[5]
- The syntax level, which in UN/EDIFACT decides the character set, the set of characters partners can use in messages.[6]
- The message types to be exchanged.
- Security, such as encryption and passwords.
- The communications service to use.
- How acknowledgments and error correction work.
Common documents
Each type of business document has its own standard message. X12 calls these transaction sets and numbers them, such as 850 for a purchase order.[7] UN/EDIFACT gives each message type a six-letter code, such as ORDERS for a purchase order.[8]
X12 describes a typical supply chain flow from order to payment.[2] In the table, a remittance advice is a notice telling the seller which invoices a payment covers.[2]
| Step | X12 transaction set | Usually sent by | UN/EDIFACT message with the same purpose |
|---|---|---|---|
| Order | 850 Purchase Order | Buyer | ORDERS (purchase order message) |
| Confirm order | 855 Purchase Order Acknowledgment | Seller | ORDRSP (purchase order response message) |
| Ship | 856 Ship Notice/Manifest | Seller | DESADV (despatch advice message) |
| Bill | 810 Invoice | Seller | INVOIC (invoice message) |
| Pay | 820 Payment Order/Remittance Advice | Buyer | REMADV (remittance advice message) |
| Confirm receipt of any message | 997 Functional Acknowledgment | Receiver | CONTRL (service message for acknowledgments and syntax errors) |
X12 transaction names are from X12,[2][7] UN/EDIFACT names are from the UN message directory,[8] and CONTRL is described in the UN syntax guidelines.[5]
What each step does
- The 855 can confirm the order or report changes to it. Other sets (860 and 865) handle later changes requested by either side.[2]
- The 856 is an advance ship notice. It lists the items, quantities, and lot or serial numbers in a shipment, and its case or pallet markings let the buyer match boxes to orders by barcode or radio-frequency identification (RFID) tags, which use radio waves to identify items.[2]
- The 810 must at least reference the purchase order and give the total invoice amount (charges included, allowances subtracted, before any terms discount), so the buyer can check it against open orders.[2]
- The 820 can be a payment order to a bank, a remittance advice to the seller, or both.[2] A similar transaction set for health care, the 835, is the electronic remittance advice used by U.S. health plans.[9]
The 997 checks only syntax. X12 states that it does not cover the meaning of the data in the transaction sets.[7]
Message structure
Every EDI standard builds messages from the same kinds of parts. A message is a sequence of standard data elements arranged by a standard syntax, taken from a fixed set of message types.[1] This strict structure is what lets computers build, split apart, and process the messages.[1]
Building blocks
From smallest to largest, the parts are:
| Part | What it is |
|---|---|
| Data element | One unit of data, such as a quantity, date, or name.[3] A composite data element holds two or more smaller component data elements.[10] |
| Segment | A short sequence of related data elements, such as all the parts of an address. Each segment starts with a tag that names it.[1][5] |
| Message | An ordered set of segments for one business document. X12 calls this a transaction set.[10][11] |
| Functional group | A batch of messages of the same type, required in X12 and optional in UN/EDIFACT.[11][6] |
| Interchange | Everything sent in one transmission, from a header segment to a trailer segment.[11][10] |
Separators
Special characters mark where each part ends, so a message is one long string of text. In UN/EDIFACT's basic character set (level A), the apostrophe ends a segment, the plus sign separates data elements, and the colon separates components.[6] A question mark placed before one of these characters means it is ordinary data, not a separator.[6]
The UN guidelines give this name-and-address segment as an example:[5]
NAD+BY+ABC CO:26 MAIN STREET:LONDON:TW17 9NW'
Here NAD is the segment tag, BY is a qualifier meaning "buyer," and the part from ABC to 9NW is one composite data element.[5]
X12 lets the sender choose its separators. The first segment of each interchange (ISA) declares the data element separator and the segment terminator.[11] The short X12 purchase order below uses an asterisk and a tilde, and is based on a sample from an EDI software maker:[12]
ST*850*0001~
BEG*00*SA*XX-1234**20170301~
PO1*1*25*EA*36*PE*MG*XYZ-1234~
CTT*1~
SE*5*0001~
- ST opens transaction set 850 with control number 0001.[13]
- BEG starts the order. The code 00 marks an original order, XX-1234 is the order number, and 20170301 is the date.[13][12] The empty field between two asterisks skips an unused element.
- PO1 is one line item: quantity 25, unit code EA, unit price 36, product XYZ-1234.[12]
- CTT gives the number of line items, here 1.[12]
- SE closes the set. It counts 5 segments, including ST and SE, and repeats control number 0001.[12]
Envelopes
Header and trailer segments wrap the data in nested envelopes. X12 and UN/EDIFACT use the same three-level plan with different segment names.[11][6]
| Level | X12 header / trailer | UN/EDIFACT header / trailer | What it holds |
|---|---|---|---|
| Interchange | ISA / IEA | UNB / UNZ | One whole transmission, with sender and receiver IDs |
| Functional group | GS / GE | UNG / UNE (optional) | Messages of one type |
| Message | ST / SE | UNH / UNT | One business document |
The EDIFACT interchange may also start with a UNA segment that declares nonstandard separator characters.[6] UN guidelines note that functional grouping is required in EDIFACT interchanges to and from North America.[5]
Trailers carry counts and control numbers that let the receiver check that nothing was lost. An X12 GE gives the number of transaction sets in its group, and its control number must match the one in GS.[11] In UN/EDIFACT, UNT counts all segments in the message, including UNH and UNT, and UNZ repeats the interchange reference from UNB.[5]
Versions
Both standards change over time, so each message states which version it follows.
| Standard | Version format | Example |
|---|---|---|
| X12 | A six-digit code for version and release[4] | 003050 is version 3, release 5.[4] U.S. health care uses X12 version 5010.[9] |
| UN/EDIFACT | Directories named by status, year, and a letter that goes up for each directory of the same type in a year[5] | D.96A is the first draft directory of 1996. Its messages carry version D and release 96A in the UNH header, with agency code UN.[5][8] |
Sending the messages
The EDI standards define the message content but not how it travels.[4] FIPS 161-2 notes that messages may go over communication networks or be carried physically on electronic storage media, and the UN guidelines mention magnetic tapes.[1][5]
Value-added networks
A value-added network (VAN) is a third-party service that connects trading partners. In 1996, the National Institute of Standards and Technology (NIST) wrote that trading partners seldom communicated directly and instead used VANs.[4] Each partner connects to the VAN, and the VAN handles the links to all the others, even if they use different hardware or protocols.[4]
A VAN also acts as a clearinghouse. It reads the header of each interchange and drops it in the right partner's mailbox, where the partner can collect it later.[5][4] This helps when partners work on different schedules or in different time zones.[5]
Internet protocols
A family of internet standards lets partners send EDI directly and securely. They are known as applicability statements (AS1, AS2, AS3) and were later joined by AS4.[14][15] The first three are each defined in a Request for Comments (RFC), a numbered series of Internet technical documents published by the Internet Engineering Task Force.[14]
| Protocol | Carried over | Defined in | Date |
|---|---|---|---|
| AS1 | Email, using the Simple Mail Transfer Protocol (SMTP), the standard used to send email | RFC 3335 | September 2002 |
| AS2 | Web (HTTP) | RFC 4130 | July 2005 |
| AS3 | File Transfer Protocol (FTP), used to transfer files | RFC 4823 | April 2007 |
| AS4 | Web services, using ebXML Messaging Services 3.0 (ebMS 3.0), an OASIS web services messaging standard | OASIS Standard | Approved 24 January 2013 |
Dates for AS1 to AS3 are from RFC 6017,[14] and the AS4 date is from OASIS.[15]
AS4 is a profile of ebMS 3.0, meaning a set of rules for how to use it.[15] A key reason for AS4 was to give small and medium-sized companies a simpler profile of ebMS 3.0 for exchanging messages.[16]
AS2 packs EDI data in MIME structures and sends it with an HTTP POST.[17] It uses S/MIME for encryption and authentication. The receiver can return a digitally signed receipt called a message disposition notification (MDN), which gives the sender proof that the message arrived unchanged.[17]
An AS2 receipt is not the same as a 997 acknowledgment. The sample MDN in RFC 4130 notes that it does not guarantee that the EDI interchange was syntactically correct or reached the translator.[17]
Standards bodies
ASC X12
ASC X12 is the main U.S. EDI standards body:
- Founding: in 1979 the American National Standards Institute (ANSI) authorized the Accredited Standards Committee X12 to create EDI standards.[4]
- Scope: its standards cover ordering, shipping and receiving, invoicing, payment, and many other transactions.[4] It also publishes XML schemas.[18]
- Organization: X12 describes itself as a non-profit, ANSI-accredited, cross-industry standards body.[18] Its work is done by subcommittees, each covering a set of business functions.[4]
- Administration: the Data Interchange Standards Association (DISA) served as its administrative office (secretariat) and published X12 releases.[4][3]
UN/EDIFACT
UN/EDIFACT stands for the United Nations rules for Electronic Data Interchange for Administration, Commerce and Transport.[19] Its main facts are:
- Origin: a UN Economic Commission for Europe working party (WP.4) drew on both X12 and the European Guidelines on Trade Data Interchange to create it.[4]
- Syntax rules: approved as an ISO standard in 1987, after the UN and U.S. syntax proposals came together,[5] and published as ISO 9735 in 1988.[20]
- Directory: UNECE publishes the rules, messages, and code lists in the United Nations Trade Data Interchange Directory (UNTDID).[19]
- Use: in 2017 UNECE reported that UN/EDIFACT is used by 100,000 traders in the retail sector alone, and the shipping line MSC said it sends over 250 million EDIFACT messages per year.[21]
Other standards
Other families serve particular fields:
- HL7: FIPS 161-2 accepted it as an alternative for certain health care applications.[1]
- ISO 20022: a multi-part international standard for financial messages, prepared by ISO Technical Committee 68. It can use XML or ASN.1, another notation for describing data.[22]
Uses by sector
EDI is used well beyond retail ordering. FIPS 161-2 lists uses in:[1]
- Exchanges between health care providers and insurers.
- Travel and hotel bookings.
- Education administration.
- Government regulatory, statistical, and tax reporting.
Three sectors stand out in the sources:
- Retail and manufacturing: the order, ship notice, invoice, and payment flow shown above.[2]
- Transport and logistics: UN/EDIFACT is widely used in international supply chains, transport, and logistics, including maritime shipping.[21]
- U.S. health care: under the Health Insurance Portability and Accountability Act (HIPAA), X12 version 5010 is the adopted standard for most transactions, except those with retail pharmacies.[9]
Following the Version 5010 standards became required on January 1, 2012. They include:[9]
| Health care transaction | X12 standard |
|---|---|
| Claims (institutional, professional, dental) | 837 |
| Eligibility and benefit check | 270/271 |
| Claim status inquiry and response | 276/277 |
| Claim payment and electronic remittance advice | 835 |
| Enrollment in a health plan | 834 |
| Premium payment from an employer | 820 |
History
The roots of EDI lie in cargo tracking. X12 traces the idea to the Berlin Airlift of 1948 to 1949.[3][23] Colonel Edward Guilbert, the airlift's traffic manager, decided that standard cargo information had to be sent ahead of the aircraft, in effect standard manifests.[3]
Transport standards
Shared transport standards took shape over about 15 years:
- 1960s: Guilbert, then at DuPont, developed a standard set of electronic messages for cargo information between DuPont and the carrier Chemical Leaman Tank Lines.[3] Industry groups also made early common formats, but only for purchasing, transportation, and finance data, used mainly within single industries.[4]
- 1968: railroads, airlines, truckers, and ocean shipping companies had formed the Transportation Data Coordinating Committee (TDCC), a group to set shared standards so their computers could exchange data.[3]
- July 1975: the TDCC published its first manual, with 45 transaction sets, 68 segments, and 189 data elements.[3] Its main author was Buddy Bass. The manual produced the terms transaction set, data segment, and data element that U.S. EDI still uses, and Bass proposed the term data element.[3]
National and international standards
National and international standards followed in this order:
- 1979: after national standards work began in the late 1970s, ANSI authorized ASC X12.[4]
- 1987: ISO approved the UN/EDIFACT syntax rules, which merged ideas from X12 and Europe's Guidelines on Trade Data Interchange.[4][5]
- 1991: the U.S. federal EDI standard, FIPS 161, took effect on September 30.[1]
- 1996: FIPS 161-2 named a single, universal family of EDI standards as a long-range goal and noted planned alignment of X12 and UN/EDIFACT.[1]
- 2005 and 2013: the internet transport standards AS2 and AS4 appeared.[17][15]
Strengths and limitations
EDI cuts manual work between companies. NIST notes three benefits of electronic exchange:[4]
- Faster response times.
- Less paperwork.
- No chance of errors from retyping data.
When a supplier's ship notices reliably match its shipments, a buyer can mark orders complete and put goods away without checking each box.[2]
EDI also has costs and limits:
- Many standards: FIPS 161-2 notes that several standards mean more staff training, duplicated features, and more kinds of translation software.[1]
- No one-to-one mapping: X12 and UN/EDIFACT data elements do not match one-to-one, and several X12 elements may be needed for one EDIFACT element.[4]
- Flexible rules: partners must agree on implementation conventions before they can exchange data reliably.[4]
- Systems out of step: if a change is made by phone or email instead of EDI, it must be entered by hand, or the delivery may not match what the buyer expects.[2]
In a 2017 UNECE news release, the supply chain company Warrant Group said it had moved clients and partners from many incompatible in-house XML formats to the centrally maintained UN/EDIFACT standard.[21]
References
- Federal Register notice: Approval of FIPS PUB 161-2, Electronic Data Interchange (EDI), National Institute of Standards and Technology, 1996.
- Supply Chain Transaction Flow, X12.
- Awards: The Story Behind the Awards, X12.
- Guidelines for the Evaluation of Electronic Data Interchange Products (NIST SP 500-231), National Institute of Standards and Technology, 1996.
- UN/EDIFACT Syntax Implementation Guidelines, UNECE.
- Part 4. UN/EDIFACT Rules, Chapter 2.2 Syntax Rules, UNECE.
- X12 Transaction Sets, X12.
- UNTDID D.96A Index of message types by code, UNECE, 1996.
- Adopted Standards and Operating Rules, Centers for Medicare & Medicaid Services.
- UN/EDIFACT Message Design Guidelines, UNECE.
- Structure of X12 Envelopes, Oracle.
- X12 850 purchase order: format and example, EdiFabric.
- ANSI X12 Explained: Message Standards and Transaction Sets, Data Interchange.
- RFC 6017: Electronic Data Interchange - Internet Integration (EDIINT) Features Header Field, IETF, 2010.
- AS4 Profile of ebMS 3.0 v1.0, OASIS, 2013.
- AS4 Profile of ebMS 3.0 Version 1.0 (specification), OASIS, 2013.
- RFC 4130: MIME-Based Secure Peer-to-Peer Business Data Interchange Using HTTP, Applicability Statement 2 (AS2), IETF, 2005.
- X12 home page, X12.
- Introducing UN/EDIFACT, UNECE.
- ISO 9735:1988 Electronic data interchange for administration, commerce and transport (EDIFACT), Application level syntax rules, ISO, 1988.
- Celebrating 30 years of successful data exchange for trade and logistics using the UN/EDIFACT standard, UNECE, 2017.
- About ISO 20022, ISO 20022 Registration Authority.
- The Berlin Airlift, 1948-1949, Office of the Historian, U.S. Department of State.
