EDI 850, 855, 856 and 810: the X12 order flow, and the purchase orders that never arrive as EDI

EDI 850, 855, 856 and 810 are the X12 transaction sets that carry a B2B order from purchase order to invoice: the buyer's 850 purchase order, the supplier's 855 acknowledgment, the 856 advance ship notice (ASN) that says what is on the truck, and the 810 invoice. A 997 confirms each one parsed. Not every customer sends them: some order by email, PDF or spreadsheet and will never set up EDI. Those orders need the same checks an 850 gets (item, unit, price, ship-to, duplicates), and they can get them without forcing the customer onto EDI, by reading the email and writing the order to the ERP. That is what Mirage's EDI alternative does for small and mid-size customers. Below, one invented order goes through all five documents.

Published
Updated
Reading time
14 min
Written by
Jules Toussaint

Scope: X12 release 004010 between US suppliers and their customers, order to invoice. X12 standards are copyrighted by ASC X12; segment and code names follow the 004010 implementation references cited. Each trading partner's implementation guide governs what it requires.

In production, on orders that are not EDI

Biodéal, an organic dairy distributor, receives its customers' orders by email in their own formats: PDFs, Word tables, scanned forms, plain text. Mirage creates each order in SAP Business One. Since go-live on July 22, 2025: 2,943 orders and 12,993 lines entered automatically for 113 customers, a median of 48 seconds from email to order ready in SAP, and about 7% of orders flagged for a human check. None of those orders is EDI. Mirage is not an EDI translator: where a customer sends 850s, your translator keeps that job.

One order, two ways in: an 850 or an email

An 850 arrives structured: every value sits in a numbered element, with a code that says what it is. An email order carries the same content in the customer's own words. The checks are the same; what differs is how much the format has already done.

What an 850 gives the order desk, and what an email or PDF order makes you rebuild (recommended practice)
QuestionIn an 850In an email or PDF order
New order, copy or change?BEG01 purpose code (00 original, 01 cancellation, 05 replace, 07 duplicate) and the PO numberA "revised" PDF or "same as last week": compare customer, PO number and content
Which item?Each PO1 ID has a qualifier: VP your part, BP the buyer's, UP a consumer UPCThe customer's own reference: a cross-reference per customer, a person when it fails
Which unit?PO103 from a code list: EA each, CA case"12 / 5 Kg", "PACK (X6P)" or no unit at all, as Biodéal's customers write them: convert with the pack size you hold
Ship to where?N1*ST with a location code your cross-reference resolvesAn address matched to the customer's records
Is it all there?CTT01 counts the lines, SE01 the segmentsNothing counts the lines: check against the document
Does the buyer know your answer?A 997 for syntax, an 855 line by lineA reply email or a confirmation PDF
What an 850 gives the order desk, and what an email or PDF order makes you rebuild (recommended practice)

Source: Purpose codes, ID qualifiers, units, CTT01, SE01 (Stedi X12 004010 reference); quantity conventions: Biodéal case study.

The format carries the controls; the business checks below apply to both channels.

When EDI is not worth setting up, and when it is

EDI is built for volume. In IBM's words, it "is best suited for use cases involving business partners that exchange a high-volume of (often repetitive) documents in scheduled batches"; it "can have a significant up-front cost, generally requiring specialized software and expertise to set up", and each partner can have "its own individual requirements" (IBM). A buyer that prefers EDI still makes room: the GSA lets partners "with small order volume and less technical proficiency" use its vendor portal instead (GSA).

In practice, a new EDI connection rarely pays for itself with:

  • A customer who orders a few times a month: mapping and testing against its guide is the same work as for one who orders daily.
  • A customer who does not send EDI. Biodéal's 113 customers order by email in their own formats, and their orders still reach SAP Business One checked.
  • Ad hoc orders: a one-off buyer, a spot order, a rush order confirmed by email after a call.

The mirror case: move a customer to EDI when it requires it (Shopbop's July 2026 manual requires the 850 and the 856, with SSCC labels, though not the 855, and charges back an ASN that arrives after the goods, sections 5.1 and 10), when its orders come often and in batches, or when it needs what an email cannot carry: an 856 its dock matches to the SSCC on each label (GS1 US). Between the two sit a customer portal and software that reads the email; the order entry automation guide compares them customer by customer.

The order between buyer, seller and warehouse

X12 order flow: 850, 997, 855, 940, 945, 856 and 810 between buyer, seller and an optional third-party warehouse, with email orders joining the same business checksBuyeryour customerSelleryouWarehousethird party, optional850Purchase order997Parsed: syntax onlyEmail, PDF or spreadsheet orderBusiness checksitem, unit, price, ship-to,date, duplicate POfailsHeld: a person decidespassesSales order in the ERP855Answer, line by line940Shipping order945Shipped quantities856Ship notice, before the goods810Invoice for what shipped
An 850 and an email order reach the same checks. A receiver may return a 997 for each set it gets; one is drawn. The 940 and 945 only when a third-party warehouse ships.

Source: X12 supply chain transaction flow; 997; 940, 945 (Stedi X12 004010 reference).

This guide follows one order through these sets. For every segment and element, see Stedi's free X12 004010 reference, one page per set: the 850, 855, 856, 810 and 997, and the 940 and 945 for the warehouse. Your partner's implementation guide says which segments it uses.

A change to a PO already sent travels as an 860, answered by an 865; the 857 combines ship notice and invoice; the 820 carries the payment, beyond this guide (X12).

The envelope: a complete ISA, then GS and ST

Every X12 file nests three envelopes: the interchange (ISA to IEA); functional groups (GS to GE) of one kind, named in GS01 (PO, PR, SH, IN, FA for the 850, 855, 856, 810, 997); and each document, ST to SE. Each trailer counts what it closes and repeats its header's control number: IEA02 equals ISA13, GE02 equals GS06, SE02 equals ST02.

Every ISA element has a fixed length, so a 004010 ISA is always 106 characters, terminator included. The sample order's ISA:

ISA*00*          *00*          *ZZ*EXAMPLEBUYER   *ZZ*EXAMPLESUPPLY  *261027*0930*U*00401*000000101*0*T*>~
The sample ISA, element by element, with fixed lengths (X12 004010, invented IDs)
ElementsValueLengthMeaning
ISA01 to ISA0400, 10 spaces, 00, 10 spaces2, 10, 2, 10No authorization or security information
ISA05, ISA06ZZ, EXAMPLEBUYER + 3 spaces2, 15Sender qualifier (mutually defined) and ID
ISA07, ISA08ZZ, EXAMPLESUPPLY + 2 spaces2, 15Receiver qualifier and ID
ISA09, ISA10261027, 09306, 4Date, YYMMDD only, and time
ISA11U1U.S. EDI Community of ASC X12, TDCC and UCS
ISA12004015Envelope version; the release is in GS08
ISA130000001019Control number, repeated in IEA02
ISA1401No TA1 requested
ISA15T1Test data; P in production
ISA16>1Component separator
The sample ISA, element by element, with fixed lengths (X12 004010, invented IDs)

Source: ISA elements and lengths, ISA15, GS, GS01, SE, ISA09 date format; EdiFabric on IEA02 and GE02.

Control numbers detect lost and repeated files, not orders: detect repeats on sender, receiver, ISA15 and ISA13 together, stored as text to keep the zeros. The release is agreed between partners and declared in GS08. X12 publishes one a year, usually in January: 004010 in January 1998, 005010 in January 2004, 008070 in March 2026 (X12 release schedule). A new release obliges no one to move.

One order through the 850, 997, 855, 856 and 810

Illustrative example, invented figures: a two-line order, from purchase order to invoice

Assumptions, all invented: parties, PO, address, parts and prices. Asterisk between elements, tilde after each segment, line breaks for reading. The buyer accepts no backorders: a quantity not confirmed is canceled. After the 850, each document shows ST to SE only.

The 850 purchase order

ISA*00*          *00*          *ZZ*EXAMPLEBUYER   *ZZ*EXAMPLESUPPLY  *261027*0930*U*00401*000000101*0*T*>~
GS*PO*EXAMPLEBUYER*EXAMPLESUPPLY*20261027*0930*101*X*004010~
ST*850*0001~
BEG*00*SA*PO-10457**20261027~
CUR*BY*USD~
REF*DP*042~
DTM*002*20261105~
N1*ST*EXAMPLE BUYER DC 3*92*DC03~
N3*100 SAMPLE ROAD~
N4*ANYTOWN*OH*44000~
PO1*1*24*CA*41.50*CT*VP*BRK-220*BP*778-0042~
PID*F****BRAKE PAD SET, 4 PER CASE~
PO1*2*6*EA*12.80*CT*VP*SEAL-14*BP*778-0187~
PID*F****SHAFT SEAL 14 MM~
CTT*2~
SE*14*0001~
GE*1*101~
IEA*1*000000101~
The sample 850, segment by segment, and where each value goes in the sales order (invented)
SegmentWhat it saysIn the sales order
BEG*00*SA*PO-10457**20261027Original, stand-alone order, PO-10457 of October 27Customer PO number and date
CUR*BY*USDBuyer's prices in US dollarsCurrency, checked against the price agreement
REF*DP*042Department 042Returned on the 856 or 810 if the guide asks
DTM*002*20261105Delivery requested November 5Requested date
N1*ST, N3, N4Ship to DC 3, code DC03 assigned by the buyerShip-to found through a cross-reference
PO1*1*24*CA*41.50*CT*VP*BRK-220*BP*778-004224 cases at 41.50, contract price, vendor part BRK-220Line 1, price checked against the contract
PO1*2*6*EA*12.80*CT*...6 each at 12.80, part SEAL-14Line 2
CTT*2, SE*142 lines, 14 segmentsControls
The sample 850, segment by segment, and where each value goes in the sales order (invented)

Only ST, BEG, the PO1 loop and SE are mandatory in a 004010 850; partners add terms (ITD), pack size (PO4), charges (SAC) or routing (TD5) as their guide says. Read each PO1 qualifier before its number. Line 1 is 24 x 41.50 = 996.00, line 2 is 6 x 12.80 = 76.80: 1,072.80 USD. Sold by the set (4 per case, says the PID), line 1 is 96 EA at 10.375; rounded to 10.38 it would total 996.48.

The 997 that goes back

ST*997*0001~
AK1*PO*101~
AK2*850*0001~
AK5*A~
AK9*A*1*1*1~
SE*6*0001~

AK1 names the group (PO, 101), AK2 the document, AK5 accepts it, AK9 the group: 1 included, 1 received, 1 accepted. It says nothing about delivery.

The 855 acknowledgment

ST*855*0001~
BAK*00*AC*PO-10457*20261027~
PO1*1*24*CA*41.50*CT*VP*BRK-220*BP*778-0042~
ACK*IA*24*CA*068*20261103~
PO1*2*6*EA*12.80*CT*VP*SEAL-14*BP*778-0187~
ACK*IQ*4*EA*068*20261103~
CTT*2~
SE*8*0001~

Only 4 of the 6 seals are available. BAK02 AC: lines follow, one differs. Line 1 is IA, line 2 IQ for 4 EA, both with a current schedule ship date (qualifier 068) of November 3.

The 856 ship notice

ST*856*0001~
BSN*00*SHP-5531*20261103*1400*0001~
HL*1**S~
DTM*011*20261103~
N1*ST*EXAMPLE BUYER DC 3*92*DC03~
HL*2*1*O~
PRF*PO-10457***20261027~
HL*3*2*P~
MAN*GM*00095212340000001027~
HL*4*3*I~
LIN**VP*BRK-220*BP*778-0042~
SN1**24*CA~
HL*5*3*I~
LIN**VP*SEAL-14*BP*778-0187~
SN1**4*EA~
CTT*5~
SE*17*0001~

BSN05 0001 announces shipment, order, pack, item. HL 1 is the shipment, shipped November 3 (DTM 011); HL 2 the order; HL 3 the pallet, by its SSCC in MAN; HL 4 and 5 the items, with what was packed in SN1. CTT01 counts the five HLs. A real 856 adds carrier, weight and bill of lading (TD5, TD1, REF) as the guide requires.

The 810 invoice

ST*810*0001~
BIG*20261103*INV-88120*20261027*PO-10457~
IT1*1*24*CA*41.50*CT*VP*BRK-220*BP*778-0042~
IT1*2*4*EA*12.80*CT*VP*SEAL-14*BP*778-0187~
TDS*104720~
CTT*2~
SE*7*0001~

BIG gives invoice date and number, then the PO date and number the buyer matches on. It bills what shipped: 24 x 41.50 + 4 x 12.80 = 1,047.20. TDS01 has two implied decimals, so it is sent as 104720; 1047 would mean 10.47. IT1 prices keep their decimal point.

The sample order line by line, 850 to 810, no backorders (invented)
LineOrdered (850)Accepted (855)Shipped (856)Invoiced (810)
1, BRK-22024 CA24 CA (IA)24 CA24 CA, 996.00
2, SEAL-146 EA4 EA (IQ)4 EA4 EA, 51.20
The sample order line by line, 850 to 810, no backorders (invented)

With backorders, line 2 would add an ACK IB for 2 EA, covered by a later 856 and 810: the buyer's rule, not X12's.

Source: 850, 855, 856, 810, 997, date qualifiers, BSN05, TDS, data types (Stedi X12 004010 reference).

Sent as a PDF, the same order takes the same steps on the supplier's side, minus the 997: the confirmation, packing list and invoice go out the way that customer receives them.

The five documents above in one text file, as shown, to test a map or a parser. Everything in it is invented.

855 codes: the header type and the line status

The 855 reports back once the seller's system has processed the 850, affirming it or indicating changes (X12); it can also announce an order the vendor generated (855). BAK02 sets the kind of answer: AC when lines follow and one differs, AD when none does, AK for the header alone, RJ to reject. ACK01 gives each line's status: IA accepted, IQ quantity changed, IP price changed, DR date rescheduled, IB backordered, IR rejected. Both lists are longer: Stedi has them in full under element 587 and element 668.

Generate the 855 from the checked sales order, not from the 850: one sent the moment the order is translated says IA on lines the plant cannot ship.

The 856: hierarchy, SSCC, timing and the 945

X12 calls the 856 a critical transaction that ties the order to the delivery process (X12). Its body is a tree of HL segments: an ID (HL01), a parent (HL02) and a level, S shipment, O order, T tare, P pack, I item (element 735). BSN05 0001 orders them shipment, order, packaging, item; element 1005 lists the other structures. HL is the only mandatory segment of its loop, so a senseless tree still passes syntax (856). With carton detail, the pallet becomes T and each carton a P.

The SSCC

GS1's Serial Shipping Container Code identifies a logistic unit in 18 digits: extension digit, GS1 Company Prefix, serial reference, check digit. One scan at the dock links it to the ASN received in advance, which holds the product GTINs (GS1 US). A reprinted label keeps the number, a repacked unit gets a new one, and none is reallocated within a year of shipment (GS1 General Specifications 26.0, 2.2.1).

The sample uses GS1 prefix 952, reserved for examples: extension 0, prefix 9521234, serial 000000102, check digit 7 (1.2.3.1, 7.9.1). Under the barcode: (00) 095212340000001027, parentheses never encoded (4.14). In the 856: MAN*GM*00095212340000001027, 20 characters, since GM means SSCC-18 with its Application Identifier; AA is the 18 digits alone (element 88).

Timing, and the 945

The ASN must reach the receiver before the goods; the window is the partner's. Shopbop wants it within two hours of the shipment leaving the dock, one PO per ASN, MAN02 matching the GS1-128 label on every carton, and charges back an ASN not delivered before the shipment arrives (sections 5.3 and 10). Build the 856 from what was packed, never from the order.

Shipping from a third-party warehouse, the seller receives a 945 Warehouse Shipping Advice: the warehouse reports the shipment and reconciles ordered and shipped quantities (945). The 856 stays the seller's notice to its customer.

What each acknowledgment proves, and how files travel

A 997 reports syntax; AK3 and AK4 locate the errors. AK9 P means at least one document was rejected: resend those. The 997 does not cover meaning and is never itself acknowledged (997, element 715). A 999 also checks the partner's implemented subset (X12); a TA1 answers for the envelope (EdiFabric).

What each signal proves, and what it does not
SignalWhat it showsWhat it does not show
Signed AS2 receipt, verifiedThe message arrived intactThat it parsed
TA1The envelope was read or rejectedAnything inside it
997 or 999, acceptedSyntax passed (and the partner's subset, for a 999)That the order is accepted
855Your answer, line by lineThat the buyer agrees with a change
What each signal proves, and what it does not

Files move through a value-added network mailbox, over AS2 or over SFTP, which lacks AS2's proof of receipt (IBM). In AS2, signing, encryption and the receipt are each optional; a signed receipt, once verified, proves arrival, and HTTP success can coexist with an error disposition (RFC 4130, 2.4.2, 7.1, 7.6). An email order has none of these signals.

Checks before any order becomes a sales order

A translator that accepts an 850's syntax has not checked its content; an email order has had no check at all. These rules, recommended practice, apply to both.

Business checks on an incoming order, EDI or email (recommended practice)
CheckWhat goes wrongRule
CurrencyNone stated, or not the agreement'sHold; never assume one
ItemNo cross-reference, or twoHold until a person chooses
Identifier levelA consumer UPC (UP) where you sell the case (UK)Map each qualifier to the right level
UnitCA ordered, sold by EA; or CS for case, though 004010's CS is CassetteConvert quantity and price together, or hold
PriceOff contract, or another price basisHold outside a stated tolerance
DatesPast, or inside your lead timeFlag it; answer in the 855 if expected
Business checks on an incoming order, EDI or email (recommended practice)

A PO number you already hold

It does not prove a duplicate: an order comes back five ways, and only the first two leave the ERP untouched. Email has the same five, without codes: a forwarded copy, a corrected PDF, "cancel line 2".

Five ways a known purchase order comes back (recommended practice)
What arrivesHow to recognize itWhat to do
Transport retrySame sender, receiver, ISA15, ISA13Process nothing twice
Identical resendNew control numbers, same content; BEG01 may be 07No second order
ReplacementSame PO, new content; BEG01 05Hold and compare
ChangeAn 860, or an 850 used for changes (Shopbop's 850FR)Change the existing order
CancellationAn 860, or BEG01 01Cancel what has not shipped
Five ways a known purchase order comes back (recommended practice)

Source: Purpose codes, CA and CS, 860, Shopbop's 850FR, section 5.1.

The item, unit, price, ship-to, date and repeat PO checks as a spreadsheet: one row per order line, EDI or email, a hold when a check fails. Your items, prices and ship-to codes go in; no amount is filled in.

A failed order is exception handling: hold, show the reviewer the source, log the decision. See the sales order exception handling guide and the order entry error cost calculator.

Questions readers ask

  • The 850 is the buyer's purchase order. The 855 is the seller's answer once its system has processed it: BAK02 says whether the order is accepted, changed or rejected, and an ACK per line gives the status, quantity and date. A 997 only says the 850 parsed.

  • The trading partner decides: its guide asks for a 997, a 999 or neither, and sets the deadline. ISA14 requests something else, a TA1 on the envelope only. A 997 is never itself acknowledged, so no 997 ever answers a 997.

  • The 856 goes from the supplier to its customer and describes the shipment against the purchase order. The 945 goes from a warehouse to the seller, the depositor, to say a shipment was made and reconcile ordered and shipped quantities. A seller using a third-party warehouse may receive a 945, then send the 856.

  • An SSCC can identify any logistic unit, from a carton to a pallet; the partner's guide says which levels it wants labeled and described. With a pallet only, the pallet is the pack level; with carton detail, the pallet is the tare and each carton a pack with its own SSCC. Shopbop asks for one per carton.

  • Yes, without the customer setting up EDI. Software reads each order, runs the item, unit, price, ship-to and duplicate checks an 850 gets, writes the order to the ERP and holds for a person what it cannot confirm. The structure is what is lost: qualifiers, line counts and a 997 have to be rebuilt from the document.

Sources and scope

Checked on . X12 standards are copyrighted by ASC X12 and are not reproduced here; segment and code names come from X12's pages and Stedi's X12 004010 reference. GS1 rules from GS1 and GS1 US, AS2 from RFC 4130, one retailer's rules from its published manual, as an example. The order, its documents and the SSCC are invented.

This guide explains EDI practice for educational purposes. Your trading partner's implementation guide and agreements prevail over anything here.

Related on this site

Send us the orders that never arrive as an 850

Send a batch of the email and PDF orders your team still keys. Each comes back as a sales order for your ERP, with the lines that need a decision flagged.

Prefer to talk it through? Book a call

We use your email to reply to you and, now and then, to tell you about Mirage. You can opt out at any time. Privacy policy