X12 EDI transaction sets, explained
What each document does, who sends it to whom, and what goes wrong on the dock and in accounts payable.
What is X12?
X12 is the standard most North American companies use to exchange business documents between computers. Each document type is a transaction set with a three-digit code: the 850 is a purchase order, the 856 a ship notice, the 810 an invoice. A file is a string of segments (ST, BEG, PO1 and so on) separated by delimiters and wrapped in an ISA and GS envelope. Versions are numbered by release. Retail and manufacturing mostly run 4010, and newer partners ask for 5010.
The standard sets the shape of each document. Every large trading partner then publishes an implementation guide that narrows it: which segments they require, which codes they accept, and how fast they want the document. Most of the work, and most of the chargebacks, live in the gap between that guide and what your ERP actually records.
How do the order-to-cash documents move?
Order to cash
The documents between a buyer and a supplier, from the purchase order to the payment, plus the acknowledgments that ride along.
| Code | Document | What it does |
|---|---|---|
| 850 | Purchase Order | The buyer's order: items, quantities, prices, ship-to and dates. |
| 855 | Purchase Order Acknowledgment | The supplier accepts, changes or rejects the order, line by line. |
| 860 | Purchase Order Change Request (buyer initiated) | The buyer changes an order it already sent. |
| 865 | Purchase Order Change Acknowledgment (seller initiated) | The supplier answers an 860, or proposes a change of its own. |
| 856 | Ship Notice/Manifest (ASN) | What is on the truck, carton by carton, sent before it arrives. |
| 810 | Invoice | The bill for what shipped, tied back to the purchase order. |
| 820 | Payment Order/Remittance Advice | Which invoices a payment covers, and what was deducted. |
| 812 | Credit/Debit Adjustment | A deduction or charge outside the invoice, such as a shortage or pricing claim. |
| 824 | Application Advice | The partner's system read the document but rejected its business content. |
| 864 | Text Message | Free-form text, often compliance notices or rule changes. |
| 997 | Functional Acknowledgment | Confirms a group of documents arrived and parsed. It says nothing about whether the data was right. |
| 999 | Implementation Acknowledgment | A 5010-era acknowledgment that also checks guide rules. Mostly used in healthcare. |
Warehouse
The documents between the owner of the goods and a third-party warehouse that stores and ships them.
| Code | Document | What it does |
|---|---|---|
| 940 | Warehouse Shipping Order | Tells a 3PL warehouse to pick and ship an order. |
| 945 | Warehouse Shipping Advice | The warehouse reports what actually shipped. |
| 943 | Warehouse Stock Transfer Shipment Advice | The owner tells the warehouse that inbound stock is on the way. |
| 944 | Warehouse Stock Transfer Receipt Advice | The warehouse reports what it received. |
| 947 | Warehouse Inventory Adjustment Advice | Damage, cycle-count corrections and other changes to stock on hand. |
Transportation
The documents between a shipper and a carrier, from the load tender to the freight bill.
| Code | Document | What it does |
|---|---|---|
| 204 | Motor Carrier Load Tender | The shipper offers a load to a carrier. |
| 990 | Response to a Load Tender | The carrier accepts or declines the load. |
| 214 | Transportation Carrier Shipment Status Message | Pickup, in-transit and delivery events. |
| 210 | Motor Carrier Freight Details and Invoice | The carrier's freight bill, accessorials included. |
| 753 | Request for Routing Instructions | The supplier asks the buyer how a collect shipment should move. |
| 754 | Routing Instructions | The buyer answers with the carrier and pickup details. |
Inventory and pricing
The documents that keep catalogs, stock positions and store lists in step between partners.
| Code | Document | What it does |
|---|---|---|
| 846 | Inventory Inquiry/Advice | On-hand and available quantities, usually sent daily. |
| 852 | Product Activity Data | A retailer's sales and stock by item and location. |
| 832 | Price/Sales Catalog | Items, descriptions, UPCs and prices. |
| 816 | Organizational Relationships | A partner's list of stores and distribution centers. |
| 180 | Return Merchandise Authorization and Notification | Returns, requested and approved. |
New trading partner sent you an implementation guide?
Send it to us. We will tell you which documents your ERP can already produce, what data is missing, and how long testing usually takes with a partner of that size.