# X12 856 Advance Ship Notice (ASN) Generator

> Source: https://netray.co/tools/x12-856-advance-ship-notice-generator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Fill in shipment, carrier and item details and get a clean X12 856 skeleton with shipment, order and item hierarchy to use as a test file.

## Category

developer

## Audience

- EDI analyst
- ERP developer
- Logistics coordinator

## Tool

**Kind:** template

**Output:** code

**Language:** edi

**Fields:**

#### Sender ID (15 chars, space padded)

**Key:** sender

**Type:** text

**Default:** ACMEMFG        

#### Receiver ID (15 chars, space padded)

**Key:** receiver

**Type:** text

**Default:** BIGCUSTOMER    

#### Sender code (GS02)

**Key:** sender_gs

**Type:** text

**Default:** ACMEMFG

#### Receiver code (GS03)

**Key:** receiver_gs

**Type:** text

**Default:** BIGCUSTOMER

#### Date YYMMDD

**Key:** date6

**Type:** text

**Default:** 261020

#### Date CCYYMMDD

**Key:** date8

**Type:** text

**Default:** 20261020

#### Time HHMM

**Key:** time

**Type:** text

**Default:** 0930

#### Interchange control number (9 digits)

**Key:** control

**Type:** text

**Default:** 000000101

#### Shipment ID

**Key:** shipment_id

**Type:** text

**Default:** SHP0004512

#### Carrier SCAC

**Key:** scac

**Type:** text

**Default:** ABCD

#### Bill of lading number

**Key:** bol

**Type:** text

**Default:** BOL778812

#### Number of cartons

**Key:** cartons

**Type:** number

**Default:** 4

#### Gross weight (lb)

**Key:** weight

**Type:** number

**Default:** 120

#### Ship-to name

**Key:** ship_to

**Type:** text

**Default:** BIGCUSTOMER DC 12

#### Purchase order number

**Key:** po

**Type:** text

**Default:** PO558123

#### Buyer part number

**Key:** part

**Type:** text

**Default:** PN-48213

#### Quantity shipped

**Key:** qty

**Type:** number

**Default:** 400

**Blocks:**

#### X12 856 (version 004010)

**Body:** ISA*00*          *00*          *ZZ*{{sender}}*ZZ*{{receiver}}*{{date6}}*{{time}}*U*00401*{{control}}*0*P*>~
GS*SH*{{sender_gs}}*{{receiver_gs}}*{{date8}}*{{time}}*101*X*004010~
ST*856*0001~
BSN*00*{{shipment_id}}*{{date8}}*{{time}}*0001~
DTM*011*{{date8}}~
HL*1**S~
TD1*CTN25*{{cartons}}****G*{{weight}}*LB~
TD5**2*{{scac}}*M~
REF*BM*{{bol}}~
N1*ST*{{ship_to}}~
HL*2*1*O~
PRF*{{po}}~
HL*3*2*I~
LIN**BP*{{part}}~
SN1**{{qty}}*EA~
CTT*3~
SE*15*0001~
GE*1*101~
IEA*1*{{control}}~

**Notes:** This is a generic SOI (shipment, order, item) structure for testing. Trading partners publish their own implementation guides that decide which segments are mandatory, qualifiers, packaging levels (SOTPI is common for retailers) and the ISA/GS identifiers. Verify against the partner's guide and your EDI translator before you send production data. SE01 must equal the segment count from ST to SE inclusive: if you add or remove segments, update it.

## Content

**Intro:** The X12 856 Advance Ship Notice tells a customer what is in a shipment before it arrives. This generator builds a minimal, correctly structured 856 from your shipment, carrier and item details so you can test your translator or a trading partner connection.

**Sections:**

#### How to use the generator

**Body:** Fill in the sender and receiver identifiers, the date and control number, the shipment ID, carrier SCAC, bill of lading, ship-to and one purchase order line. The output updates as you type. Copy it into a .edi or .txt file, or into your translator's test harness. ISA fields are fixed width: sender and receiver IDs must be exactly 15 characters, so keep the trailing spaces in the defaults.

**Bullets:**

- ISA13 and IEA02 must carry the same control number.
- GS06 and GE02 must carry the same group control number.
- ST02 and SE02 must match as well.
- CTT01 counts HL segments in this transaction.

#### The 856 hierarchy

**Body:** The 856 uses HL (hierarchical level) loops. Level S is the shipment and carries BSN, dates, packaging totals in TD1, routing in TD5 and references such as the bill of lading. Level O is the order, identified with PRF. Level I is the item, with LIN identifying the buyer part number and SN1 giving the quantity shipped. Retailers often add tare and pack levels between order and item. The HL01 value is the loop ID, HL02 points to the parent loop, and HL03 is the level code.

#### Common mistakes

**Body:** Frequent rejections come from the wrong SE count after editing segments, ISA padding errors, quantity units that do not match the customer's PO, ship dates in the wrong format, and a missing or wrong SSCC when the customer requires pack level detail. Always send a test file first and read the 997 or 999 functional acknowledgement from the partner. A syntax pass does not prove that the content satisfies the partner's business rules.

**Cta:** If you need ASNs generated directly from deliveries in SAP, Infor, Epicor or NetSuite, Netray can help review the mapping and build a controlled integration.

**Faq:**

#### What is an X12 856?

**Answer:** It is the ANSI X12 transaction set for the Ship Notice or Manifest, commonly called the Advance Ship Notice or ASN. The supplier sends it electronically when goods ship, listing shipment, order and item details so the receiver can plan receiving.

#### Why does the ISA segment need exact padding?

**Answer:** ISA is a fixed length segment. Sender and receiver IDs must each be 15 characters, the control number 9 digits and so on. If the lengths are wrong the whole interchange is rejected at the first parse, before any business data is read.

#### What does the HL loop structure mean?

**Answer:** HL segments nest parts of the shipment. S is the shipment, O is order, I is item, and retailers may add T for tare and P for pack levels. Each HL says its own ID, its parent, and its level code, so receivers can rebuild the tree.

#### Does this generate a file I can send to a customer in production?

**Answer:** No, it is a test skeleton. Production ASNs must follow the customer's implementation guide, use their qualifiers and identifiers and be sent through your EDI translator or VAN. Treat the output as a starting point for mapping and testing only.

## Search terms

x12 856 example, 856 advance ship notice sample, EDI 856 format, ASN EDI template, 856 segment layout, EDI 856 shipment order item, generate 856 test file, X12 ship notice manifest

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
