Target Edi 856
What This Is
The Target EDI 856 is the X12 856 Advance Ship Notice (ASN) used by vendors to tell Target when and how merchandise is shipped. The 856 replaces or augments paper packing lists and contains hierarchical data about a shipment: the shipment-level (carton/pallet), order-level, and item-level details for each ASN. Target's ASN program enforces specific requirements for segment usage, hierarchy levels, carrier and routing data, GS/IEA control numbers, and packaging detail format. Effective date for Target program updates referenced in this guide: 2025-12-14.
This guide focuses on practical, actionable steps: why Target rejects ASNs, how to construct compliant 856s, how to convert 856s to flat CSV for ERP/warehouse systems, and how to validate ASNs using automation. It includes real-world examples, code snippets with line-by-line commentary, and troubleshooting for the most common Target-specific ASN errors. PlainEDI is referenced throughout to show how a validator/converter reduces manual effort; see PlainEDI to upload test files and validate automatically.
Who This Is For
This guide is for EDI analysts, vendor compliance teams, integration developers, and 3PL/warehouse engineers responsible for sending Target ASNs or consuming them in an ERP/WMS. If you map 856s to CSV, build EDI parsers, or troubleshoot Target ASN rejections, this is written for you.
Key Segments Explained
- ISA / IEA (Interchange Control Header/Trailer)
The envelope for all X12 messages. ISA defines delimiters, sender/receiver IDs, date/time, and the interchange control number in ISA13. Target requires consistent ISA control numbers and correct sender/receiver values matching your trading partner setup. IEA's element 2 contains the same interchange control number as ISA13 for integrity checks.
- GS / GE (Functional Group Header/Trailer)
Groups transactions of the same functional type. GS03 is the application sender code and GS04 is the group date/time control; GE01 holds the number of transaction sets in the group. Common failures occur when GE01 does not equal the number of ST/SE pairs in the group.
- ST / SE (Transaction Set Header/Trailer)
ST begins the 856 transaction set and ST02 is the transaction set control number that must match SE02 in the trailer. SE01 must report the segment count within the ST..SE block. Target's parser validates ST/SE consistency strictly, rejecting mismatches.
- BSN (Beginning Segment for Ship Notice)
BSN01 is the ASN purpose code (e.g., 00 = Original), BSN02 is the ASN identification (unique ASN number), and BSN03 the shipment date/time. Target requires unique BSN02 per ASN to link to orders. Incorrect BSN02 values cause duplicate or missing ASN records in Target systems.
- HL (Hierarchical Level)
856 uses nested HL segments to represent shipment -> order -> item levels. HL01 is the hierarchy ID number and HL02 points to the parent HL01 (or omitted for top-level). HL03 indicates level code (S = Shipment, O = Order, I = Item). Common errors include missing parent references and wrong level codes.
- TD1 / TD5 / REF (Carrier and Shipment Details)
TD1 provides weight and packaging counts, TD5 contains carrier identification and SCAC, and REF segments contain carrier reference numbers (e.g., PRO, BOL). Target requires consistent SCAC and carrier references to link ASNs to carrier invoices and routing confirmations.
- LIN / SN1 / PO4 / PID (Item-level)
LIN identifies the vendor's item (UPC/GTIN or vendor item number), SN1 provides shipped quantity and unit of measure, PO4 contains physical item dimensions, and PID can carry human-readable item descriptions. Accurate LIN+SN1 mapping to Target's purchase order number is critical to prevent short/over receipt errors.
- CTT (Transaction Totals)
CTT01 is the total number of line items in the ASN; CTT02 may convey the number of units shipped. Target validates CTT totals against the number of LIN segments and sum of SN1 quantities; discrepancies trigger rejections or manual exception processing.
Example EDI Snippet
ISA*00* *00* *ZZ*SENDERID *ZZ*TARGETID *231214*0800*U*00401*000000905*0*T*:~
GS*SH*SENDERID*TARGETID*20231214*0800*905*X*004010~
ST*856*0001~
BSN*00*ASN00012345*20231214*0800~
HL*1**S~
TD1*CTN25*10****G*500~
TD5*O*2*UPS*Ground*GND*SCAC~
REF*CN*PRO123456~
N1*ST*TARGET STORE 123*9*1234567890~
N3*123 TARGET LANE~
N4*MINNEAPOLIS*MN*55401*US~
HL*2*1*O~
PRF*4500012345~
HL*3*2*I~
LIN**VN*ABC-12345*UP*012345678905~
SN1**50*EA~
PO4*10*8*6*LB~
CTT*1*50~
SE*16*0001~
GE*1*905~
IEA*1*000000905~
Line-by-line annotations:
ISA*...~— Interchange start. ISA13 = 000000905 must match IEA02. Delimiters defined in ISA (element separator: *, segment terminator: ~).GS*SH*...~— Functional group for Ship Notice (SH). GS06 control number 905 must match GE02.ST*856*0001~— ASN transaction start; ST02 = 0001 must match SE02.BSN*00*ASN00012345*20231214*0800~— ASN identifier BSN02 used by Target to track the shipment; BSN03 date matches shipment date.HL*1**S~— Hierarchy level 1 = Shipment (S). No parent (HL02 blank).TD1*CTN25*10****G*500~— 10 cartons, gross weight 500 (units defined by code in TD1).TD5*O*2*UPS*Ground*GND*SCAC~— Carrier identification; SCAC required by Target.REF*CN*PRO123456~— Carrier pro number; Target uses REF*CN for tracking.N1/N3/N4*...— Ship-to name and address; N1*ST indicates the store/target location.HL*2*1*O~— Order level (O) with parent HL01=1.PRF*4500012345~— PO reference (Target PO number).HL*3*2*I~— Item level (I) child of order HL02.LIN**VN*ABC-12345*UP*012345678905~— Vendor and UPC identifiers; Target often prefers UPC (GTIN) for retail receipt matching; include vendor item code in LIN03.SN1**50*EA~— 50 units shipped, unit of measure each (EA).PO4*10*8*6*LB~— Package dimensions and weight unit LB.CTT*1*50~— One line item referenced, 50 total units shipped. Must reconcile to SN1 totals.SE*16*0001~— Segment count within ST..SE (including ST and SE). SE02 must match ST02.GE*1*905~andIEA*1*000000905~— End functional group and interchange; counts and control numbers must align.
CSV Output Example
| ASNNumber | ShipmentDate | CarrierSCAC | CarrierName | PRONumber | TargetPO | SKU | UPC | QuantityShipped | UOM | CartonCount | GrossWeight |
|---|---|---|---|---|---|---|---|---|---|---|---|
| ASN00012345 | 2023-12-14 | SCAC | UPS | PRO123456 | 4500012345 | ABC-12345 | 012345678905 | 50 | EA | 10 | 500 |
Step-by-Step Conversion Process
- Collect and parse the X12 856
- Detect and read delimiters from ISA: element separator (usually *), component separator (usually :), and segment terminator (often ~).
- Split into ISA/GS/ST/HL segments and build an in-memory hierarchical model keyed by HL01 values.
- Validate envelope and control numbers
- Verify ISA13 equals IEA02 and GS06 equals GE02. If mismatch, reject and generate human-readable error.
- Validate ST02 equals SE02 and SE01 equals the counted segments inside the ST..SE block.
- Normalize hierarchical data to flat rows
- Walk HL tree: for each item-level HL (HL03 = I), capture parent Order (HL03 = O) and Shipment (HL03 = S) data to produce a single flat row per item with repeating fields (Carrier SCAC, ASN number, PO number).
- Map LIN/SN1/PO4 into CSV columns: SKU, UPC, Quantity, UOM, dimensions, weight.
- Perform Target-specific compliance checks
- Ensure BSN02 uniqueness and PO number presence for order-level HLs. Flag missing PO numbers.
- Validate that CTT totals equal the number of item HLs and that sum of SN1 quantities matches CTT02 when present.
- Format and write CSV
- Use consistent column order (see CSV example headers). Escape or quote values containing commas or line breaks.
- Include metadata header lines if your ERP/WMS requires them (for example, a file-wide date or vendor ID).
- Run automated validation and pre-send checks
- Use PlainEDI to auto-validate GS/IEA counts, HL nesting, mandatory fields, SCAC codes, and PO matching before sending to Target. PlainEDI detects delimiter mistakes and reports actionable errors.
- Fix violations, reprocess, and then either push via VAN/AS2 or upload to Target portal as required.
Common Errors and Fixes
- Error: ST/SE mismatch (SE01 incorrect) — Fix: Recount segments inside ST..SE block and set SE01 accordingly. Why: Automated transmitters or manual editors often drop or add line breaks; SE01 prevents message truncation or padding.
- Error: ISA/IEA control number mismatch (ISA13 != IEA02) — Fix: Ensure interchange control number is assigned consistently at transmit time and updated in both ISA and IEA. Why: Gateways reject envelopes that fail integrity checks to prevent out-of-order processing.
- Error: CTT total mismatch (CTT01 doesn't equal number of item HLs) — Fix: Recompute item count and correct CTT01; verify that removed or added resolution lines are not forgotten. Why: CTT ensures header-to-line reconciliation at the receiver.
- Error: Missing PO number (PRF segment missing at order level) — Fix: Include PRF segment under the order-level HL with the Target PO number (e.g., PRF*4500xxxxx). Why: Target matches shipped items to outstanding POs; missing PRF prevents automated matching.
- Error: Invalid or missing SCAC in TD5 — Fix: Use registered SCAC for the carrier or include the carrier's SCAC at TD5, or provide carrier reference in REF segments per Target specs. Why: Carrier/SCAC is used to reconcile carrier invoices and schedule deliveries.
- Error: HL parent reference missing (HL02 wrong) — Fix: Ensure HL02 points to the correct parent HL01 at creation; top-level HLs have empty HL02. Why: Incorrect HL nesting breaks shipment->order->item relationships.
- Error Code: 997 rejection - Functional Group/Transaction Errors — Fix: Read the 997; identify ST/SE control mismatches or invalid segment usage; correct the EDI and retransmit. Why: Target sends a 997 to indicate structural or functional errors post-receipt. See reading 997 functional acknowledgments and resolving 997 rejection codes.
Related Resources
- target-edi-850: How to read Target purchase orders (PO format)
- target-edi-855: How acknowledgments map to ASNs
- target-edi-compliance-requirements: Target ASN compliance overview
- how-to-convert-target-edi-to-excel: Converting 856 to Excel/CSV step-by-step
- reading-997-functional-acknowledgments: Interpret Target 997 acknowledgments
- resolving-edi-997-rejection-codes: Fixing common 997 rejection reasons
- edi-to-csv-for-dropshippers: CSV mapping for drop-ship ASN scenarios
FAQ
Q: What is the minimum set of segments Target requires in an 856?
Target requires a valid ISA/IEA and GS/GE envelope, ST/SE transaction wrapper, BSN with a unique ASN identifier (BSN02), at least one shipment-level HL (HL03 = S) with carrier details (TD1/TD5), order-level PRF or REF linking to PO, item-level LIN and SN1 lines for each shipped SKU, and CTT totals. Validate ST/SE and GS/GE control numbers before sending.
Q: How do I convert Target 856 HL hierarchies into a flat CSV for my WMS?
Parse HL segments to build a parent-child hierarchy in memory, then emit a flat row per item-level HL combining shipment-level fields (BSN, TD5, REF), order-level fields (PRF/PO), and item-level fields (LIN, SN1, PO4). Use the CSV example column order in this guide and verify CTT sums match SN1 totals.
Q: Why am I receiving 997 rejections from Target after sending an ASN?
997 rejections typically indicate structural or functional errors: incorrect ST/SE counts, missing mandatory segments (BSN, PRF), invalid control numbers, or syntax violations (wrong delimiters). Use the 997 detail to identify loop/segment issues, correct the EDI, and resend. PlainEDI can pre-validate before transmission to avoid 997s; upload to PlainEDI.
Q: What are the most common Target ASN compliance failures?
Common failures include missing PO reference (PRF), incorrect HL hierarchy (missing HL02 parent references), CTT totals mismatch, invalid SCAC in TD5, and duplicate or non-unique BSN02 values. Target enforces these checks as part of shipment automation (Effective date: 2025-12-14).
Q: How should carrier references be formatted in the 856 for Target?
Include SCAC in TD5 and carrier tracking/pro number in REF*CN. Use appropriate TD5 qualifiers for carrier routing (e.g., O for origin). Target uses SCAC to cross-reference with carrier invoices and routing guides; missing or incorrect SCAC leads to exceptions.
Q: How do I handle multiple carton/package level details in 856?
Include multiple TD1 segments if you need to report different package types, or use repeated TD1 for each packaging type with counts. For carton-level detail, use PACK/HL nesting with a separate HL for each pack if Target requires individual carton IDs. Ensure unique carton identifiers are in REF or MAN segments as required by Target's carton-level ASN policy.
Q: Can I use GTIN/UPC or do I need vendor item numbers in LIN?
Include both if possible: LIN with LIN03 or LIN04 populated for UPC (GTIN) and include vendor item number in LIN element qualifiers (VN). Target reconciles shipments against PO lines by UPC/GTIN when available; vendor numbers aid internal cross-references.
Q: What validation features does PlainEDI provide to prevent ASN errors?
PlainEDI validates delimiter detection, ISA/IEA and GS/GE control consistency, ST/SE segment counts, HL hierarchy nesting and parent references, mandatory segment presence (BSN, PRF, LIN, SN1), CTT totals versus actual lines, and Target-specific rules like SCAC and PRF presence. Use PlainEDI to catch errors before transmission and to generate human-readable error reports for developers and operations staff.
Call to Action
Ready to validate or convert your Target 856 files automatically? Upload a sample to PlainEDI to run Target-specific ASN validations, error reports, and CSV conversion in minutes.