Costco Edi 856

By Alexander Georges|Updated June 30, 2026
TL;DR: This guide explains how to build, validate, convert, and troubleshoot Costco EDI 856 Advance Ship Notice (ASN) files. It includes segment-level explanations, real-world EDI 856 examples with line-by-line annotations, a CSV mapping table, step-by-step conversion instructions, common error codes with fixes, and links to related resources. Use the PlainEDI validator and uploader (PlainEDI) to catch format and business-rule errors before sending to Costco.

What This Is

The Costco EDI 856 Advance Ship Notice (ASN) is the X12 transaction used to communicate shipment-level and packaging-level details to Costco’s receiving and warehouse systems. The ASN tells Costco when a shipment will arrive, what carrier and service are used, the hierarchical packing (shipment > order > pack), and the item-level quantities and serial/container IDs. Accurate 856s drive timely receiving, putaway, and invoice reconciliation.

This guide focuses specifically on Costco EDI 856 requirements, common failure modes, and practical fixes. It explains the X12 structural elements you must get right (ISA/GS/ST/BSN/HL loops, TD1/TD5 carrier data, REF purchase-order references, PRF/PO1 linkage, SN1 quantities, and CTT totals). It also shows how to convert the 856 into CSV for ERP or WMS ingestion, how to validate with PlainEDI to prevent rejections, and how to resolve the typical errors that trigger penalties or chargebacks. When discussing Costco program changes and penalties, this guide cites the effective date of the latest verified data: 2026-05-31; verify specific penalty amounts and thresholds in Costco’s vendor portal as required.

Who This Is For

This guide is for EDI administrators, fulfillment managers, integration engineers, and 3PLs who send ASNs to Costco or who convert Costco 856 files into CSV for downstream systems. It assumes basic familiarity with X12 structure and EDI terminology (ISA, GS, ST, segments, elements, composites).

Key Segments Explained

  • ISA / GS / ST / SE / GE / IEA (Envelope and transaction control)

    Purpose: Encapsulate the 856 transaction. Common causes of rejection: mismatched control numbers between ISA13/IEA02 or GS06/GE02, wrong element lengths, or incorrect delimiters. Fix: ensure you generate and increment control numbers consistently and declare separators precisely in the ISA header.

  • BSN (Beginning Segment for Ship Notice)

    Purpose: Identifies the ASN number (BSN02), shipment creation date/time (BSN03/BSN04), and hierarchical structure. Why errors occur: missing or duplicate BSN02 values or incorrect date/time format (CCYYMMDD/HHMM). Fix: use a unique shipment ID per ASN and ISO-formatted dates.

  • HL (Hierarchical Level)

    Purpose: Creates the HL tree (shipment -> order -> pack -> item). Why errors occur: HL loops out of order, missing HL parent-child relationships (HL03 parent pointer), or wrong HL04 (child code). Fix: generate HL segments sequentially and ensure parent pointers reference existing HL IDs. Verify HL03 values for correct parent linking.

  • TD1 / TD5 (Carrier and packaging details)

    Purpose: TD1 reports gross weight and packaging counts; TD5 identifies the carrier/SCAC and shipment method. Why errors occur: wrong unit-of-measure codes, missing SCAC, or inconsistent total weights leading to receiving mismatches. Fix: validate UOM values against X12 code lists and confirm SCAC matches the carrier used on the bill of lading.

  • REF (Reference Identification) and PRF (Purchase Order Reference)

    Purpose: REF conveys shipper references such as ASN number or Bill of Lading; PRF links the ASN to the Costco PO number. Why errors occur: PRF missing PO number or PO mismatch with PO1/PO4 item references. Fix: ensure PRF01 contains the correct PO number and that PO-level references match PO1 lines.

  • PO1 / LIN / SN1 (Item and quantity detail)

    Purpose: PO1 or LIN identifies item-level data; SN1 reports shipped quantities. Why errors occur: incorrect unit-of-measure, missing UPC/GTIN, or quantity discrepancies between ASN and physical cartons. Fix: map product identifiers to Costco’s required type (GTIN preferred), and validate SN1 shipped quantity against packing detail.

  • CTT (Transaction Totals)

    Purpose: Provides total line count and quantities (CTT02 total weight or cartons). Why errors occur: mismatched totals between CTT and actual HL/PO1/SN1 counts. Fix: compute CTT values after building HL and item loops to ensure totals reconcile.

Example EDI Snippet

ISA*00*          *00*          *ZZ*SENDERID      *ZZ*COSTCOID      *200531*1234*U*00401*000000905*0*T*:~
GS*SH*SENDERID*COSTCOID*20200531*1234*905*X*004010~
ST*856*0001~
BSN*00*ASN00012345*20200531*123456~
HL*1**S~
TD1*CTN*20*G*1500*LB~
TD5*O*2*UPS*GND~
REF*BM*BOL123456~
N1*ST*Costco Warehouse*92*COSTCOLOC001~
HL*2*1*O~
PRF*4500001234*20200501~
PO1*1*10*EA*12.00**VN*ABC123*UP*0012345678905~
SN1**10*EA~
HL*3*2*P~
MAN*GM*1Z999AA10123456784~
CTT*3*3~
SE*13*0001~
GE*1*905~
IEA*1*000000905~

Line-by-line explanation:

  1. ISA...~ — Interchange header. ISA13 (control number 000000905) must match IEA02. Delimiters: element separator '*' and segment terminator '~' are declared in ISA.
  2. GS*SH...~ — Functional group header; GS06 (905) matches GE02.
  3. ST*856*0001~ — Transaction set header, ST02 is the transaction control number for SE matching.
  4. BSN*00*ASN00012345*20200531*123456~ — ASN ID in BSN02. Date/time in BSN03/BSN04 must be CCYYMMDD and HHMMSS (or HHMM).
  5. HL*1**S~ — HL1 defines the shipment level. HL03 blank means no parent; HL04 'S' indicates shipment.
  6. TD1*CTN*20*G*1500*LB~ — 20 cartons, gross weight 1500 LB.
  7. TD5*O*2*UPS*GND~ — Carrier is UPS Ground; element positions indicate identification method and name; ensure SCAC if required.
  8. REF*BM*BOL123456~ — Reference qualifier BM indicates Bill of Lading number.
  9. N1*ST*Costco Warehouse*92*COSTCOLOC001~ — Ship-to name and Costco location ID in N104 (92 qualifier).
  10. HL*2*1*O~ — HL2 is order level, parent HL=1.
  11. PRF*4500001234*20200501~ — References Costco PO number and PO date.
  12. PO1*1*10*EA*12.00**VN*ABC123*UP*0012345678905~ — PO1 item line: quantity 10 EA, unit price 12.00, vendor item number and GTIN/UPC.
  13. SN1**10*EA~ — Shipped quantity of 10 EA. SN1 includes the actual shipped quantity.
  14. HL*3*2*P~ — HL3 is pack level under order HL2.
  15. MAN*GM*1Z999AA10123456784~ — Serialized container ID (GM qualifier) with container number.
  16. CTT*3*3~ — CTT01 = number of line items (3); CTT02 optional total quantity.
  17. SE*13*0001~ ... IEA*1*000000905~ — Transaction and envelope trailers. SE02 must equal ST02; GE02 must match GS06; IEA02 must match ISA13.

CSV Output Example

CSV Column EDI Source Segment/Element Value Example Notes
asn_number BSN02 ASN00012345 Unique shipment identifier
shipment_date BSN03 2020-05-31 Convert to ISO date
po_number PRF01 4500001234 Costco PO linked to order
line_number PO1 (PO1.01) 1 PO1 index per order loop
gtin PO1:UP element 0012345678905 Preferred product identifier for Costco
shipped_qty SN1 (SN1.02) 10 Quantity units should match UOM
uom SN1.03 EA Unit of measure code
carton_id MAN when pack-level 1Z999AA10123456784 Container or SSCC barcode

Step-by-Step Conversion Process

  1. Extract delimiters and header values
    1. Read ISA to determine element separator (ISA element positions declare separators) and segment terminator.
    2. Validate ISA/IEA and GS/GE control numbers match; fail fast if they do not.
  2. Parse the HL hierarchy
    1. Build a tree: HL segments produce nodes with HL01 (ID), HL03 (parent pointer), HL04 (level code: S/O/P/I).
    2. Ensure parent pointers reference a previously defined HL ID; if not, log an HL hierarchy error.
  3. Aggregate pack and item details
    1. Within each HL order loop, collect PRF, PO1, and SN1 lines. Map PO1 line number to SN1 quantities by PO1 sequence.
    2. For pack-level HL (P), capture MAN/SSCC/GTIN pack identifiers and associate them with the correct items or cartons.
  4. Normalize identifiers and units
    1. Translate EDI product identifiers (UPC/GTIN/VN) into the identifier your ERP/WMS expects. Prefer GTIN for Costco.
    2. Convert unit-of-measure codes (EA, CT) to the system-native units; normalize decimal separators.
  5. Validate business rules and totals
    1. Recalculate totals: number of line items vs CTT01, total quantity vs SN1 sums, carton counts vs TD1.
    2. Run business rule checks (e.g., PO referenced must exist in your system, carrier SCAC valid, ASN date/time within acceptable range).
  6. Convert to CSV or load directly into ERP
    1. Map fields into the CSV columns described above. Export one row per PO1/SN1 item or per carton depending on your processing model.
    2. Sample mapping: asn_number, shipment_date, po_number, line_number, gtin, shipped_qty, uom, carton_id.
  7. Validate with PlainEDI and send
    1. Upload the EDI file to PlainEDI to run format-level and Costco-specific validations. PlainEDI checks ISA/GS control consistency, HL hierarchy, required REF/PRF elements, and common Costco business rules to prevent rejections.
    2. After passing validation, transmit your 856 via AS2/VAN per your carrier agreement. Keep the 997 functional acknowledgment and resolve any rejections immediately.

Common Errors and Fixes

  • EID-001: HL hierarchy mismatch — Error: child HL points to a non-existent parent HL (HL03 invalid). Fix: regenerate HL loops sequentially, ensure HL01 increments, and HL03 references existing HL01 values. Validate the hierarchy tree before attaching PO1/SN1 lines.
  • EID-002: Missing or duplicate BSN02 — Error: BSN02 is blank or repeats an ASN already submitted. Fix: use a unique ASN identifier per physical shipment; include BSN03 and BSN04 with correct CCYYMMDD/HHMM format.
  • EID-003: PRF/PO mismatch — Error: PRF PO number does not match the PO in Costco's system. Fix: confirm the PO number in PRF01 is the Costco PO and that PO1 line quantities align with the PO. Use your PO management system to verify open POs.
  • EID-004: Carrier/SCAC missing in TD5 — Error: TD5 lacks SCAC or valid identification method. Fix: populate TD5 with the appropriate SCAC code and method, e.g., TD5*O*2*UPS*GND or include insurer codes if required. Confirm SCAC with your carrier contract.
  • EID-005: Unit-of-measure mismatch causing quantity discrepancy — Error: SN1 UOM doesn’t match PO1 or expected inventory unit. Fix: standardize UOM codes (EA, CT, LB) and convert quantities to the PO’s UOM before creating SN1. Document conversion rates in integration logic.
  • EID-006: Missing SSCC or MAN at pack level — Error: pack-level HL lacks MAN/SSCC container ID. Fix: generate or capture SSCC barcodes and include MAN with the correct qualifier (e.g., GM). Ensure carton-level scanning procedures record SSCCs for packing.
  • EID-007: CTT totals don't reconcile — Error: CTT01 number of lines or CTT02 totals mismatch actual counts. Fix: compute totals after building the full transaction set; set CTT values from authoritative in-memory counters.

Related Resources

FAQ Section

Q: What are the must-have elements in a Costco 856?

At minimum, a valid Costco 856 must include envelope headers (ISA/GS/ST), a unique BSN02 ASN number, a properly-formed HL hierarchy (shipment/order/pack/item), PRF with the Costco PO number, PO1/SN1 for item quantities, TD1/TD5 with packaging and carrier data, and CTT transaction totals. Include MAN/SSCC at pack level if cartons are serialized.

Q: How should I format dates and times in the 856?

Use CCYYMMDD for dates and HHMM or HHMMSS for times in BSN03/BSN04 and DTM elements. Costco systems expect consistent ISO-like date formats. Ensure timezone alignment with your trading partner agreement and declare dates that reflect shipment creation, not system processing time.

Q: What are common reasons Costco rejects an ASN?

Common rejections include HL hierarchy errors, PO number mismatch or missing PRF, missing or invalid carrier SCAC in TD5, quantity or UOM mismatches between PO and SN1, and SSCC/MAN missing at pack level. Rejections will be returned via a 997 functional acknowledgment; consult the 997 content to identify the specific segment and element at fault.

Q: Does Costco penalize vendors for ASN errors?

Retailers, including Costco, enforce penalties for compliance failures such as incorrect ASNs or OTIF non-compliance. Effective date of the most recent verified Costco program guidance is 2026-05-31. Verify current penalty amounts and thresholds in Costco’s vendor portal. Typical penalty types include OTIF deductions, ASN accuracy chargebacks, and receiving-related fines. Use automated validation (for example, PlainEDI) to reduce the risk of penalties.

Q: How do I map serialized carton IDs (SSCC) into my CSV output?

Capture MAN segments at the pack-level HL and map the MAN data qualifier and value into the CSV column (e.g., column carton_id). If a single ASN contains multiple cartons, create one CSV row per carton-item combination or create a separate carton manifest CSV depending on your WMS requirements.

Q: Can I send an 856 without a 997 acknowledgment back from Costco?

You can send an 856 and not receive a 997 if Costco’s partner configuration differs, but Costco typically returns a 997 to confirm structural acceptance. If you do not receive a 997, follow up via your VAN or AS2 logs and ensure your EDI VAN/AS2 receipts are enabled. Always log and reconcile the transmission receipts within your EDI platform.

Q: How does PlainEDI help with Costco 856 validation?

PlainEDI validates both syntactic (ISA/GS/ST control numbers, segment terminators, element counts) and business-level rules (required PRF presence, HL hierarchy integrity, mandatory MAN SSCC presence for cartons). PlainEDI prevents common rejections by flagging issues pre-transmission and provides actionable error messages for remediation.

Q: What is the best practice for handling PO changes and canceled lines?

When Costco issues PO changes, reflect the change in subsequent ASNs using updated PRF or PO1 references. If lines are canceled, either omit them from the ASN and include a REF or DTM indicating cancellation or explicitly send a new ASN that shows shipped quantities of zero where required. Coordinate with your EDI support team to follow Costco-specific rules for cancellations and changes, and use costco edi 855 guidance for acknowledgment flows.

Final Notes and Call to Action

Costco EDI 856 ASNs require strict adherence to hierarchical structure, correct identifiers (POs and GTIN/UPC), accurate carton and item quantities, and carrier details. Follow the step-by-step conversion and validation workflow above, integrate checks into your packing and scanning processes, and run every 856 through automated validators such as PlainEDI before transmission. PlainEDI’s validation features reduce rejections and the risk of compliance penalties by catching envelope, segment, and business-rule errors.

Ready to validate or upload your Costco 856? Use PlainEDI to run a full validation and upload your file to Costco-compliant channels.