Convert an X12 856 ASN to Excel
The advance ship notice is a nested document, and that is exactly what makes it hard to read. Drop it here and the shipment, order, pack and item levels come out as rows you can follow.
| # | Description | Qty | Unit | Unit price | VAT % | Net amount |
|---|
| Category | Rate | Taxable base | VAT amount |
|---|
| # | Qualifier | Reference | Amount | Paid |
|---|
| Segment | Element | Value |
|---|
The HL hierarchy is the whole document
An 856 is not a flat list. It is a tree built out of HL segments: shipment, then order, then tare, then pack, then item, with each level inheriting the one above it. Flatten it carelessly and the quantities stop meaning anything. The export keeps the level of every row so a pack quantity is never mistaken for an item quantity.
What you get out
Every field below is read from the file itself. Nothing is inferred, and a field the invoice does not carry is left empty rather than filled in with a plausible guess.
- BSN shipment identifier, purpose and date
- The HL hierarchy with each row's level and parent
- Item detail with quantities and product identifiers
- Marks and numbers, carrier and reference segments
- Everything else as raw segments, in document order
Questions
Why are there rows with no quantity?
Those are structural levels, usually the shipment or order node. They carry the context for the rows underneath rather than a quantity of their own.
Can I get one row per item only?
Filter the exported sheet on the item level. The level column exists for exactly that.
Does it check the ASN against a purchase order?
No. It reads one file at a time. Cross-document matching is a paid-side idea, not something quietly happening here.