Implementation reference
EDI 856 example: read the hierarchy, then test the exact bytes
Sample documents are useful because they show how segments relate, but copying an example into production is unsafe. Delimiters, identifiers, hierarchy, partner usage, and physical packing all need to come from the actual transaction and current implementation guide.
Direct answer: Use an 856 example to understand the envelope and hierarchy, not as a universal template. Replace every identity and operational value from authoritative sources, regenerate controls and counts, validate the parent tree, and reconcile the completed file with the shipment before sending it.
Compact accepted example
ISA*00* *00* *ZZ*SENDER *ZZ*AMAZON *260717*1200*U*00401*000000001*0*P*>~
GS*SH*SENDER*AMAZON*20260717*1200*1*X*004010~
ST*856*0001~
BSN*00*SHIP-1001*20260717*1200*0001~
HL*1**S~
TD1*CTN25*1****G*10*LB~
REF*BM*BOL-1001~
DTM*011*20260717~
HL*2*1*O~
PRF*PO-1001~
HL*3*2*P~
MAN*GM*000123456789012343~
HL*4*3*I~
LIN**UP*012345678905~
SN1**6*EA~
CTT*4~
SE*14*0001~
GE*1*1~
IEA*1*000000001~
This is illustrative test data. The MAN value, counts, qualifiers, version, and hierarchy must be validated against the actual partner guide and shipment.
How to read it
The ISA/IEA pair wraps the interchange, GS/GE wraps the functional group, and ST/SE wraps the 856 transaction. BSN identifies the notice. The first HL establishes Shipment; Order points to Shipment; Pack points to Order; Item points to Pack. PRF supplies the PO, MAN identifies the logistics unit, and LIN/SN1 carries item identity and quantity.
The example is intentionally small so its parentage is visible. Real files can contain many branches, and the correct SE01 is based on emitted segments rather than the apparent number of business objects.
Rejected variations worth testing
HL*4*9*I~ # parent appears nowhere earlier
MAN*GM*000123456789012340~ # altered value / check-digit risk
SN1**-6*EA~ # negative shipped quantity
SE*13*9999~ # wrong count and transaction control
The free preflight reports these as separate findings with locations and fixes. It does not silently rewrite the file, because automatic “repair” can hide a source-system defect.
Before adapting any sample
- Confirm the X12 version and partner guide.
- Generate unique interchange, group, transaction, shipment, and container identifiers through controlled allocators.
- Build the actual packing tree before assigning HL IDs.
- Populate PO, item, quantity, and transport values from source systems.
- Regenerate trailers after serialization.
- Compare the outbound MAN/container values with label scans.
- Run both accepted and rejected fixtures through automated tests.
Common questions
Can I send this exact example to Amazon’s test environment?
No. It contains illustrative identities and may not match your version, account, shipment type, or required hierarchy. Use it to understand and test your mapping.
Why do public examples disagree?
X12 defines a flexible transaction set and each trading partner publishes usage constraints. Two valid partner implementations can require different levels, qualifiers, or segments.
Primary sources
Public sources cannot establish every account-specific EDI rule. Current Vendor Central documentation and your trading-partner agreement remain controlling.