X12 856 Advance Ship Notice: The Complete EDI Guide
Everything you need to build, validate, and troubleshoot an X12 856 ASN — including the HL hierarchy that trips up almost every new implementation.
In this article
The 856 Advance Ship Notice is arguably the most technically demanding of the common retail EDI transactions — not because any individual segment is complicated, but because its HL (Hierarchical Level) structure requires you to correctly model a physical packing hierarchy in flat, sequential EDI segments. Get the hierarchy wrong and nothing downstream works.
1. What is X12 856?
The 856 tells a buyer exactly what was shipped, how it's packed, and when it will arrive — sent before or at the moment of shipment, so the receiving dock knows what to expect.
2. Why ASNs matter
- Enables scan-based receiving: workers scan a pallet's barcode and the system pulls up its full contents automatically.
- Lets warehouses plan labor and dock schedules ahead of a truck's arrival.
- Forms the backbone of retailer vendor-compliance programs — late or inaccurate ASNs are one of the most common sources of chargebacks.
3. The HL hierarchy
Unlike the flat PO1 loops in an 850, the 856 uses HL segments to build parent-child relationships. A typical structure has four levels: Shipment (S), Order (O), Pack (P), and Item (I). Each HL segment declares its own ID number and points to its parent's ID number.
| HL01 (This Loop) | HL02 (Parent) | HL03 (Level Code) | Meaning |
|---|---|---|---|
| 1 | (none) | S | Shipment — the top of the hierarchy |
| 2 | 1 | O | Order — this shipment fulfills PO-2024-88213 |
| 3 | 2 | P | Pack — a pallet or carton within that order |
| 4 | 3 | I | Item — a specific SKU inside that pack |
The #1 mapping mistake
When you have nested packaging (a pallet containing multiple cartons), each carton's HL02 must point to the pallet's HL01 — not back to the order loop. Skipping a nesting level is the single most common cause of 997 hierarchy rejections.
4. Example 856
ST
This is an envelope or control segment. Select a highlighted segment on the left (shown in green) for a full business explanation.
5. SSCC labels explained
The MAN segment carries the SSCC (Serial Shipping Container Code) — an 18-digit GS1 identifier printed as a barcode on the physical carton or pallet label. When the SSCC on the label matches the SSCC in the ASN's MAN segment, receiving software can pull up the full contents of that container with a single scan, with no manual counting required.
6. How X12 856 works, end to end
Zooming out from individual segments, here's the complete business and technical journey the 856 takes — from the supplier's warehouse all the way through to inventory being updated on the buyer's dock. Press Play Flow to watch the ASN travel through each stage, or click any step for a deeper explanation, including its common segments.
How it works
How 856 Advance Ship Notice Works
Sender
Supplier / Distribution Center
Receiver
Buyer / Retailer / Warehouse
Direction
Seller → Buyer
Standard
ANSI ASC X12
Version
005010
Transport
AS2 / SFTP / VAN / API
Business Purpose
Logistics & Fulfillment
Sender — Supplier / Distribution Center
EDI Transmission
856
Advance Ship Notice
ANSI ASC X12 004010 / 005010
Receiver — Buyer / Retailer / Warehouse
Related transaction flows
Need help understanding this EDI flow?
Ask EDI AI →856 Advance Ship Notice workflow. Steps: Order Fulfillment, Create 856 EDI, Validate EDI, Send to Trading Partner, Receive EDI, Validate / Translate, Process in ERP / WMS, Physical Goods Receiving, Inventory Update, Confirmation / Acknowledgment. Transmitted from Supplier / Distribution Center to Buyer / Retailer / Warehouse via AS2, SFTP, VAN, API, following ANSI ASC X12 004010 / 005010.
7. Mapping example
EDI Mapping Visualizer
Pick a source and target format to see how fields translate.
Source · SAP
Target · X12
Business fields represented: Item / Material · Quantity · Unit Price · Delivery Date · Order Reference. Hover a row to trace it across formats.
8. Validation rules
- Every HL loop must reference a valid parent via HL02, except the top-level Shipment loop.
- MAN02 (SSCC) must be exactly 18 digits and pass GS1 check-digit validation.
- PRF (PO number reference) must match an open, previously received 850.
- CTT01 must equal the total count of HL loops in the transaction.
9. Common errors
| Error | Likely Cause | Fix |
|---|---|---|
| Receiving can't match cartons to the ASN | SSCC regenerated after ASN was sent (e.g., repack) | Lock SSCC assignment before transmission, or send a corrected 856 |
| HL hierarchy error on 997 | HL02 points to a nonexistent HL01 | Validate parent-child integrity before sending |
| Quantity variance at receiving | Last-minute pick shortage not reflected | Generate ASN only after final pack confirmation, not at wave release |
10. ASN compliance and chargebacks
Most major retailers enforce ASN timing and accuracy requirements through their vendor compliance programs, with financial chargebacks for violations — late transmission, missing SSCC labels, or quantity mismatches between the ASN and what physically arrives. Building ASN generation directly off final pack confirmation (not off an earlier wave-release event) is the single highest-leverage change most suppliers can make to reduce these penalties.
Related transactions
Purchase Order
The X12 850 is the electronic purchase order a buyer sends to a supplier to request goods or services, replacing paper or PDF POs with a structured, machine-readable document.
Purchase Order Acknowledgment
The X12 855 is the supplier's formal response to an 850 Purchase Order, confirming, changing, backordering, or rejecting each line item.
Warehouse Shipping Order
The X12 940 instructs a third-party warehouse to pick, pack, and ship a specific order on behalf of the merchandise owner.
Warehouse Shipping Advice
The X12 945 is the warehouse's confirmation back to the merchandise owner that a 940 shipping order was picked, packed, and shipped.
Frequently asked questions
Because automated receiving and labor scheduling both depend on the ASN arriving before the truck.
Related articles
X12 850 Purchase Order: Complete EDI Guide
A complete, segment-by-segment walkthrough of the X12 850 Purchase Order — what it is, how it's structured, how to map it, and how to troubleshoot the errors that show up most often in production.
EDI Mapping Explained: From ERP Fields to X12 and EDIFACT Segments
A practical guide to how EDI mapping actually works — the concepts, common source formats, and a worked example translating SAP IDoc fields into an X12 850.
Have a follow-up question about this topic?
Ask EDI AI →