X12 segment reference
HL — Hierarchical Level
Understand X12 HL segments in EDI 856 ASNs: parent/child shipment, order, pack, and item levels retailers require.
HL segment facts
- HL03 level codes define the ASN tree — skipping a pack level breaks carton-to-item reconciliation at major retailers.
- HL02 parent pointers must reference a prior HL01 or parsers cannot rebuild the shipment hierarchy.
- SignalEDI validation flags orphaned HL rows before an 856 reaches a partner mailbox.
What the HL segment does
HL builds the shipment → order → pack → item tree in an 856. HL03 parent ID links each level so retailers can reconcile nested quantities.
Loop: Multiple per 856
Common transaction sets: 856
Key elements
| Element | Name | Description |
|---|---|---|
| HL01 | Hierarchical ID number | Sequential ID within the transaction. |
| HL02 | Hierarchical parent ID | Points to parent HL01; empty at shipment root. |
| HL03 | Hierarchical level code | S=shipment, O=order, P=pack, I=item. |
Example HL segment
HL*1**S~
Parse and validate samples with the free EDI validator or send JSON via the JSON→X12 mapping guide.
Common HL errors
- Broken parent pointers
- Missing item-level HL when cartons are declared
- Duplicate HL01 IDs
Related reference
FAQ
Frequently asked questions
Retailers require complete S-O-P-I chains with quantities that roll up correctly at each level.