Free tool · EDI viewer

EDI 856 ship notice (ASN) explained

The 856 is the advance ship notice in ANSI X12. The supplier sends it when the goods leave, so the receiving dock knows which order, carton and item is on the truck. Below is a complete 856 with its HL hierarchy explained, a segment table and the EDIFACT DESADV message.

ANSI X12 · 004010

856 · Ship notice (ASN)

From BRIGHTLINE to HARBORIND · 2026-11-10 14:00

Messages
1
Line items
3
Segments
36
Errors / Warnings
0 / 0

All checks passed: control numbers match and the segment counts are right.

Interchange 000000301Version 00401Test dataSeparators: segment ~ · element * · component >
856

Ship notice (ASN)

Shipment ID SHP-20261110-01 · 2026-11-10 14:00

Purpose
00Original
Structure
0001Shipment, order, pack, item
Carrier
Example Carrier Ground
Order reference
4500012345
PO date
2026-11-03

Parties

  • SF Ship-fromBrightline Tools Inc.Buyer's code: V-20417
  • ST Ship-toHarbor Industrial Supply DC 21200 Example AvenueSpringfield, IL 62701, USBuyer's code: DC02
Shipped
2026-11-10
Delivery estimated
2026-11-13
Bill of lading
BOL-55102
Line items of Ship notice (ASN) SHP-20261110-01
LineBuyer item no.Supplier item no.GTIN / UPCDescriptionQtyUnitPOPackage (SSCC)
100234BLT-M8-40012345678905Hex bolt M8 x 40 mm, zinc plated120EA4500012345001234560000000018
100871GLV-NIT-LNitrile gloves, size L, box of 10030BX4500012345001234560000000018
104552DRL-18V-KCordless drill 18 V, kit with 2 batteries6EA4500012345001234560000000025
3 lines

Annotated sample

An EDI 856, line by line

This 856 ships the order from the 850 page in two cartons. HL segments build a tree: the shipment (S) holds the order (O), the order holds the cartons (P), and each carton holds its items (I). Each HL names its own ID and its parent.

X12 856What it says
Envelope
ISA*00* *00* *ZZ*BRIGHTLINE *ZZ*HARBORIND *261110*1400*U*00401*000000301*0*T*>~Interchange header from the supplier BRIGHTLINE to the buyer HARBORIND: 10 Nov 2026 at 14:00, control number 000000301, test data.
GS*SH*BRIGHTLINE*HARBORIND*20261110*1400*301*X*004010~Functional group. SH = ship notices; group control number 301.
ST*856*0001~Start of transaction set 856.
BSN*00*SHP-20261110-01*20261110*1400*0001~Ship notice header. 00 = original, shipment ID SHP-20261110-01, date and time, and 0001 = the levels follow the order shipment, order, pack, item.
Shipment level
HL*1**S~Level 1, the shipment (S). The segments up to the next HL describe it.
TD1*CTN*2****G*38.5*LB~2 cartons (CTN), gross weight (G) 38.5 pounds (LB).
TD5**2*EXCR*M*Example Carrier Ground~Carrier. 2 = the next code is a SCAC (EXCR), M = motor carrier, then the service name.
REF*BM*BOL-55102~BM = bill of lading number.
DTM*011*20261110~011 = shipped on 10 Nov 2026.
DTM*017*20261113~017 = delivery expected on 13 Nov 2026.
N1*SF*Brightline Tools Inc.*92*V-20417~Party. SF = ship from.
N1*ST*Harbor Industrial Supply DC 2*92*DC02~Party. ST = ship to, with the address in N3 and N4.
N3*1200 Example Avenue~Street of the ship-to address.
N4*Springfield*IL*62701*US~City, state, ZIP code and country of the ship-to address.
Order level
HL*2*1*O~Level 2, the order (O), a child of level 1.
PRF*4500012345***20261103~The purchase order this shipment fills: PO 4500012345 of 3 Nov 2026.
Carton 1 and its items
HL*3*2*P~Level 3, a pack (P): the first carton, inside order level 2.
MAN*GM*001234560000000018~Carton label. GM = SSCC-18, the serial shipping container code printed on the carton.
HL*4*3*I~Level 4, an item (I) in carton 1.
LIN*1*VP*BLT-M8-40*BP*100234*UP*012345678905~Item: PO line 1 with the vendor's, the buyer's and the UPC number.
SN1**120*EA~Shipped quantity: 120 EA.
PID*F****Hex bolt M8 x 40 mm, zinc plated~Description of the item.
HL*5*3*I~Level 5, a second item in carton 1.
LIN*2*VP*GLV-NIT-L*BP*100871~Item: PO line 2.
SN1**30*BX~30 BX shipped; 40 were ordered.
PID*F****Nitrile gloves, size L, box of 100~Description of the item.
Carton 2 and its item
HL*6*2*P~Level 6, the second carton, again under order level 2.
MAN*GM*001234560000000025~SSCC of carton 2.
HL*7*6*I~Level 7, the item in carton 2.
LIN*3*VP*DRL-18V-K*BP*104552~Item: PO line 3.
SN1**6*EA~Shipped quantity: 6 EA.
PID*F****Cordless drill 18 V, kit with 2 batteries~Description of the item.
Totals and envelope end
CTT*7~Totals. In an 856 many partners count the HL segments here: 7.
SE*32*0001~End of the transaction set: 32 segments, control number 0001.
GE*1*301~End of the group: 1 ship notice, control number 301.
IEA*1*000000301~End of the interchange: 1 group, control number 000000301.

Segment reference

Segments of the 856

856 layouts vary more than other transactions: some partners skip the pack level, others add a pallet (tare) level. These are the common segments in our own words.

SegmentNameWhat it holds
ISA / IEAInterchange envelopeSender and receiver IDs, date and time, version, control number, a test or production flag, and the separators.
GS / GEFunctional groupGroups messages of one kind (SH here) with application codes and a group control number.
ST / SETransaction setStart and end of one ship notice. SE counts the segments in between.
BSNShip notice headerPurpose, shipment ID, date, time and the code for the order of the levels.
HLHierarchy levelLevel ID, parent level ID and level type: S shipment, O order, T tare (pallet), P pack, I item.
TD1Packages and weightPackage type, number of packages and weight.
TD5CarrierCarrier code, transport method and service.
REFReferenceBill of lading, tracking or pro number.
DTMDateShip date and expected delivery date.
N1, N3, N4Party loopShip-from and ship-to with ID and address.
PRFOrder referencePO number and PO date on the order level.
MANMarks and numbersThe package label, usually the SSCC-18 (GM).
LINItem identificationPairs of item number type and value on the item level.
SN1Shipped quantityQuantity and unit shipped, optionally the ordered quantity.
PIDItem descriptionDescription of the item as free text or as a code.
CTTTotalsNumber of HL segments or of lines, depending on the trading partner.

EDIFACT counterpart

The EDIFACT counterpart: DESADV

In EDIFACT the ship notice is a DESADV (despatch advice). CPS segments build the same hierarchy as HL, PAC and GIN describe the packages and their SSCC, and QTY 12 is the despatched quantity.

X12 856EDIFACT DESADVWhat it carries
ISA, GSUNA, UNBEnvelope: separators, sender, receiver, date and interchange reference. A group level (UNG) is rare in EDIFACT.
ST / SEUNH / UNTStart and end of the message. UNT counts the segments.
BSN, DTMBGM, DTMBGM 351 = despatch advice with its number; DTM 137 the document date, DTM 11 the despatch date, DTM 17 the expected delivery.
PRFRFFOrder number (ON), in the header or per line.
N1, N3, N4NADParties: BY = buyer, SU = supplier, DP = delivery party.
TD5TDTTransport details such as the carrier.
HLCPSCPS builds the same tree as HL: each CPS has its own number and the number of its parent.
TD1PACNumber and type of packages, CT = carton.
MANGINGIN BJ carries the SSCC of the package.
LINLIN, PIAItem with the GTIN in LIN and other numbers in PIA.
SN1QTYQTY 12 = despatched quantity.
CTTCNTControl count, here CNT 2 = number of lines.
GE, IEAUNZEnd of the interchange with the number of messages and the reference from UNB.

EDIFACT DESADV sample

UNA:+.? '
UNB+UNOC:3+4012345000016:14+4012345000009:14+261110:1400+DES0001'
UNH+1+DESADV:D:96A:UN:EAN005'
BGM+351+LS-60231+9'
DTM+137:20261110:102'
DTM+11:20261110:102'
DTM+17:20261112:102'
RFF+ON:PO-88231'
NAD+BY+4012345000009::9'
NAD+SU+4012345000016::9'
NAD+DP+4012345000023::9'
CPS+1'
CPS+2+1'
PAC+1++CT'
GIN+BJ+340123450000000017'
LIN+1++4012345111118:EN'
PIA+5+HS-12-2000:SA'
QTY+12:25:PCE'
RFF+ON:PO-88231:1'
CPS+3+1'
PAC+1++CT'
GIN+BJ+340123450000000024'
LIN+2++4012345222227:EN'
PIA+5+OR-SET-NBR:SA'
QTY+12:2:SET'
RFF+ON:PO-88231:2'
CNT+2:2'
UNT+26+1'
UNZ+1+DES0001'

Choose “EDIFACT DESADV” in the viewer's sample menu above to read this message as a table.

Orders by email and PDF

Not every customer can send EDI.

EDI works for the large accounts that have set it up. Most other customers still send purchase orders by email, as a PDF or as a spreadsheet, and someone types them into the ERP. Mercura reads those orders and creates the sales order in your ERP, so they are processed like the orders that come in over EDI.

FAQ

Questions about EDI files.

An EDI 856 is the advance ship notice (ASN) in ANSI X12. The supplier sends it when a shipment leaves, with carrier, dates, the purchase orders it fills, the packages with their labels and the quantity of each item.

HL builds the hierarchy of an 856. Each HL has its own ID, the ID of its parent and a level code such as S (shipment), O (order), P (pack) or I (item). The segments after an HL belong to that level.

The SSCC is the 18-digit serial shipping container code on a carton or pallet label. In the 856 it sits in MAN with qualifier GM, in the EDIFACT DESADV in GIN with qualifier BJ. Scanning it at the dock pulls up the carton's contents.

DESADV, the despatch advice. BGM 351 marks it, CPS builds the hierarchy, PAC and GIN describe the packages, and LIN with QTY 12 lists what was shipped.

Paste it into the viewer on this page or open the file. It lists the shipped items with their purchase order and package SSCC and exports them to Excel, CSV or JSON. Nothing is uploaded.

Customers who order by email or PDF send no 850 to ship against. Mercura reads those orders and creates the sales order in your ERP, next to the orders that come in over EDI.

Book a demo

See Mercura on

your own orders.

Bring a purchase order that your team keys in by hand, from email or PDF. We’ll show you how Mercura reads it and creates the sales order in your ERP.

Book a demo

See Mercura on

your own orders.

Bring a purchase order that your team keys in by hand, from email or PDF. We’ll show you how Mercura reads it and creates the sales order in your ERP.

Book a demo

See Mercura on

your own orders.

Bring a purchase order that your team keys in by hand, from email or PDF. We’ll show you how Mercura reads it and creates the sales order in your ERP.