Costco Edi 855
What This Is
The Costco EDI 855 Purchase Order Acknowledgment is the transaction set suppliers use to confirm receipt of a Costco purchase order and to communicate acceptance, rejection, or change details for each line item. An accurate 855 is critical to order flow because it informs Costco whether items will ship as ordered, be backordered, or rejected, and it drives downstream processes including ASN (856) generation and invoice reconciliation.
This guide covers the full lifecycle of a Costco EDI 855 for suppliers: understanding the key segments that Costco expects, reading and parsing real 855 payloads, converting EDI 855 into CSV records for ERP ingestion, preventing common validation failures, and resolving 997 acknowledgments. Where retailer-specific program changes or penalties apply, this guide references the effective date (2026-05-31) and instructs you to verify the vendor portal for current dollar amounts and thresholds.
Who This Is For
This guide targets EDI analysts, integration engineers, supplier operations managers, and third-party logistics (3PL) teams who receive Costco purchase orders and must send or process EDI 855 acknowledgments reliably.
Key Segments Explained
Below are the most important segments in an X12 855 as processed for Costco, their purpose, and what to validate.
- ISA (Interchange Control Header) — Wraps the entire interchange. Validate ISA01-ISA16 delimiters, control number consistency with IEA, and functional group separators. Costco expects consistent ISA control numbers and the correct element separator (commonly '*') and segment terminator ('~').
- GS (Functional Group Header) — Groups transaction sets of the same functional type. Verify GS01 (functional ID code =
PRfor 855), GS02/GS03 sender/receiver IDs and GS06 date/time consistency with transaction content. - ST (Transaction Set Header) — Marks the start of the 855. Validate ST02 (transaction set control number) and ensure ST-SE counts match. Costco validates unique ST02 values per transmission.
- BAK (Beginning Segment for Purchase Order Acknowledgment) — Contains the PO number, acknowledgment type, and date. Key elements: BAK01 (transaction handling code:
ACaccepted,AEaccepted with changes,ARrejected), BAK02 (acknowledgement type code), BAK03 (original PO number). Ensure PO number exactly matches the PO received from Costco (case and leading zeros). - PO1 Loop (Line Item Detail) — Each line item acknowledgment uses PO1 with quantity, unit of measure, unit price and reference to the original PO line number. Validate PO1-01 (line item quantity), PO1-02 (UOM), PO1-03 (unit price) and REF segments that follow for vendor or buyer item IDs (REF with qualifiers such as
VN). - CTT (Transaction Totals) — Contains the number of line items acknowledged. Count must match the number of PO1 loops and match SE02 for line count sanity checks.
- SE / GE / IEA — Transaction, functional group and interchange trailers. SE01 (segment count in the transaction) must be accurate, GE and IEA control counts must match. Costco systems will reject mismatched trailer counts.
Example EDI Snippet
ISA*00* *00* *ZZ*SENDERID *ZZ*COSTCOID *210601*1200*U*00401*000000123*0*P*>~
GS*PR*SENDERID*COSTCOID*20210601*1200*1*X*004010~
ST*855*0001~
BAK*00*AC*PO123456**20210601~
REF*PO*PO123456~
DTM*011*20210601~
N1*BY*COSTCO WHOLESALE*92*12345~
N1*ST*COSTCO WAREHOUSE*92*54321~
PO1*1*100*EA*10.00*PE*VN*ITEM123*UP*000123456789~
ACK*IA*100~
PO1*2*0*EA*0*PE*VN*ITEM456*UP*000987654321~
ACK*RE*0~
CTT*2~
SE*16*0001~
GE*1*1~
IEA*1*000000123~
Line-by-line explanation:
ISA*...~— Interchange header: element separator*, segment terminator~. ISA control number000000123.GS*PR*...~— Functional group for purchase order acknowledgments. GS timestamp matches ISA date/time.ST*855*0001~— Start of transaction set 855 with control0001.BAK*00*AC*PO123456**20210601~— BAK01=00 (original), BAK02=AC (acknowledgment code Accepted), BAK03=PO123456 (PO number), BAK05=20210601 (ack date).REF*PO*PO123456~— REF identifies PO for cross-reference.N1*BY*andN1*ST*— Buyer and Ship-to identification loops; Costco uses qualifier92for assigned IDs.PO1*1*100*EA*10.00*PE*VN*ITEM123*UP*000123456789~— Line 1: PO1-01=1 (line number), PO1-02=100 (quantity accepted), PO1-03=EA (unit of measure), PO1-04=10.00 (unit price). REF qualifiers follow to identify vendor and UPC.ACK*IA*100~— Acknowledgment status for the previous PO1:IA= Item Accepted (Accepted Quantity 100).PO1*2*0*EA*0*PE*VN*ITEM456*UP*000987654321~— Line 2 accepted quantity 0 (backordered or rejected).ACK*RE*0~— Acknowledgment status RE = Rejected with 0 quantity accepted.CTT*2~— Two PO1 lines in the transaction.SE*16*0001~— SE segment with total segments count (must match actual).
CSV Output Example
Below is a practical CSV mapping you can use to import 855 acknowledgments into an ERP or order management system. Each PO1 loop becomes a CSV row.
| PO_Number | Ack_Type | Ack_Date | Line_Number | Item_ID | Vendor_SKU | UPC | Accepted_Qty | Rejected_Qty | Unit_Price | UOM |
|---|---|---|---|---|---|---|---|---|---|---|
| PO123456 | AC | 2021-06-01 | 1 | ITEM123 | ITEM123 | 000123456789 | 100 | 0 | 10.00 | EA |
| PO123456 | AC | 2021-06-01 | 2 | ITEM456 | ITEM456 | 000987654321 | 0 | 0 | 0.00 | EA |
Step-by-Step Conversion Process
-
Receive and Validate the Interchange
- Ingest the raw file and detect delimiters by reading ISA element positions (ISA is fixed width for element separator in ISA16). Confirm element separator and segment terminator.
- Verify ISA/IEA control numbers match and that the GS/GE counts are consistent. Stop processing if control numbers mismatch to avoid duplicate or partial processing.
-
Parse Functional Groups and Transaction Sets
- Split the interchange by GS/GE and identify ST/SE transaction sets where ST01==855.
- Keep transaction set control numbers to correlate with generated 997 acknowledgments.
-
Extract Header Data (BAK, REF, DTM, N1)
- Read BAK03 for PO number. Normalize PO number (trim whitespace, preserve leading zeros as text) to avoid mismatches when joining to ERP.
- Capture DTM dates in ISO format (YYYY-MM-DD) for CSV output.
-
Process PO1 Loops into Rows
- For each PO1, capture PO1-01 (line number), quantity values, unit price and follow-on ACK segments for accepted/backordered quantities. Convert UOMs to standardized codes if your ERP requires mapping (e.g., EA -> Each).
- Create a CSV row per PO1 containing PO header fields plus PO1 detail values.
-
Validate Totals and Trailer Counts
- Confirm the number of PO1 loops equals CTT count. Verify SE segment segment count equals counted segments. If mismatches occur, log and generate a corrective 997 rejection or send a manual alert.
-
Generate and Send Processing Acknowledgment
- Generate a software 997 functional acknowledgment for incoming 855 files. If internal validation fails, include precise rejection codes and textual reason in the 997 details.
- Use reading 997 functional acknowledgments logic to interpret Costco responses and to retry or correct rejected transactions.
-
Audit and Load into ERP
- Store raw 855 files and the converted CSV/transaction record for audit. Import CSV into ERP using an import map that assigns PO numbers to orders and updates line status for acceptance, backorder, or rejection.
- Track and reconcile differences between what Costco expects and what your system shows, then generate ASNs (856) only for accepted lines.
Common Errors and Fixes
- Error: Invalid ISA/IEA control number mismatch — Symptom: Costco 997 returns rejection or partner systems warn of duplicate interchange. Fix: Ensure your EDI gateway increments ISA control numbers uniquely per interchange, and verify IEA02 equals ISA13. Use PlainEDI to validate control number consistency before sending.
- Error: ST-SE segment count mismatch (SE01 incorrect) — Symptom: Processing fails or 997 rejects with segment count error. Fix: Recalculate segment counts programmatically based on the actual parsed segments and regenerate SE01. Validate with PlainEDI pre-send check to prevent rejects.
- Error: PO number mismatch (BAK03 != expected PO) — Symptom: Costco cannot match the acknowledgment to their PO; PO sits unacknowledged. Fix: Normalize PO number formats (strip system-added prefixes or suffixes, preserve leading zeros) and verify against the PO received. When matching fails, send a manual message to vendor relations if immediate correction is required.
- Error: Missing or incorrect ACK segment after PO1 — Symptom: Line-level status unknown; Costco marks lines in error. Fix: Ensure for each PO1 loop you include an ACK segment with a valid status code (IA, RE, IB, etc.) and the accepted quantity numeric value. Use unit tests that parse PO1+ACK pairs.
-
Error: Invalid N1 or missing Costco identifiers — Symptom: Buyer/ShipTo not matched; order may be assigned incorrectly. Fix: Use the exact Costco N1 qualifier and ID supplied in the PO (often qualifier
92for assigned codes). If your system trims leading zeros, disable that behavior for N1 IDs. - Error: 997 Functional Acknowledgment shows a rejection code — Symptom: 855 rejected with a 997 code. Fix: Use resolving EDI 997 rejection codes to interpret the reason, correct the underlying segment or data, and resend a corrected 855 within the required time window.
- Error: Date formatting mismatches (DTM values invalid) — Symptom: Costco rejects DTM or dates misinterpret. Fix: Use ISO date formats where required by the mapping (YYYYMMDD in DTM) and ensure leading zeros for months/days. Confirm Costco's expected DTM codes and format in their vendor documentation.
Related Resources
- costco edi requirements
- costco edi 850 (Purchase Order) handling
- converting edi files for accounting software
- reading 997 functional acknowledgments
- resolving edi 997 rejection codes
- edi to csv for small business vendors
Case Studies and Real-World Scenarios
Case Study 1 — Fast-moving Consumer Goods (FMCG) supplier
A mid-size FMCG supplier received hundreds of Costco POs weekly. Their initial 855s failed due to PO number formatting differences between systems (ERP removed leading zeros). The supplier remedied it by normalizing PO numbers as strings and adding unit tests that compared BAK03 to incoming PO records. Post-fix, 997 rejection rates dropped to zero and ASN generation for accepted items increased efficiency.
Case Study 2 — 3PL converting EDI to warehouse pick lists
A 3PL processed Costco 855 files to determine which items to pick and stage. The first implementation parsed accepted quantities but ignored ACK segment codes, resulting in backorders being treated as accepted. They updated their parser to read the ACK qualifier following each PO1 and to set pick status only when ACK indicated acceptance. They used PlainEDI validation to reject any 855 missing ACK entries, preventing downstream shipping errors.
Best Practices and Prevention
- Always store the raw interchange and parsed transaction set for audit and dispute resolution.
- Implement a strict delimiter auto-detection step at ingestion to handle partner variances in element/segment separators.
- Use schema and business-rule validation: require BAK, PO1+ACK pairs, and CTT matching before importing into production.
- Automate generation of 997s for every received 855 and process inbound 997s to close the loop on transmission status using reading 997 functional acknowledgments.
- Use PlainEDI pre-send and pre-ingest validation to catch common errors like control number mismatches, missing segments, and data type violations.
Penalties, Compliance and Effective Dates
Retailers, including Costco, enforce compliance requirements and penalties for recurring EDI failures, late acknowledgments, and ASN inaccuracies. Program changes and penalty policies for Costco were last updated effective 2026-05-31. Verify current penalty amounts and thresholds on Costco’s vendor portal. Typical penalty types include OTIF deductions, ASN accuracy chargebacks, and invoice deduction chargebacks. Establish automated monitoring and alerting to prevent compliance failures and to remediate issues within the vendor portal timelines.
FAQ Section
Q: What is the required acknowledgment code in BAK for full acceptance?
Use BAK02 = AC to indicate the purchase order is accepted without changes. Ensure BAK03 contains the exact PO number from the original Costco 850. Include the BAK date in BAK05 using YYYYMMDD format.
Q: How do I indicate a line-level quantity is backordered?
Include the PO1 loop with the actual accepted quantity (for backorder, typically 0 accepted) and follow with an ACK segment using the appropriate status qualifier (for example IB for item backordered if that qualifier is in your implementation guide). Always provide a reason code if required by Costco’s mapping and update your CSV import to interpret zero accepted quantity as backorder or rejection according to your fulfillment policy.
Q: Which segments trigger a 997 rejection most often?
Common 997 rejections are triggered by ISA/IEA control number mismatches, ST/SE count mismatches, missing mandatory segments (such as BAK or CTT), and data type violations (non-numeric quantities). Use automated validation to catch these before sending and reference resolving edi 997 rejection codes for remediation steps.
Q: How should I map PO1 loops to CSV when multiple identifiers exist (vendor SKU, UPC)?
Map each PO1 to a single CSV row and include all identifiers as separate columns (Vendor_SKU, Item_ID, UPC). Use primary key logic in your ERP to decide which identifier to use for matching; preserve all IDs to allow for cross-reference and reconciliation.
Q: What is the correct way to handle unit of measure (UOM) variations?
Standardize UOMs by maintaining a mapping table (e.g., EA -> Each, CT -> Carton). Translate the UOM in the PO1 UOM element to your canonical UOM in the CSV. Validate conversions against quantity multipliers before accepting line quantities for shipping.
Q: When should I regenerate and resend an 855?
Resend a corrected 855 whenever the original 855 is rejected by a 997 or when you discover a data error affecting the PO match (PO number, line quantity, or status). Correct the data, validate segment counts, and resend. Log the original and corrected transmissions for audit purposes.
Q: Can I automatically generate ASNs after sending an 855?
Only generate ASNs (856) for lines acknowledged as accepted in the 855 (ACK indicating accepted quantities). Implement a validation step: convert 855 to CSV, flag accepted lines, and trigger ASN generation only for those lines. This prevents generating ASNs for backordered or rejected lines.
Q: How does PlainEDI help prevent Costco EDI 855 errors?
PlainEDI provides automated pre-ingest validation that checks ISA/GS control consistency, ST-SE counts, mandatory segment presence (BAK, PO1, ACK), data type checks, and business-rule validation (CTT matches PO1 count). Using PlainEDI reduces 997 rejections and speeds up remediation by surfacing precise validation errors before you send or import files.
Final Notes and Next Steps
Implement the validation steps in this guide as part of your standard EDI pipeline. Use the CSV template to integrate 855 data into your ERP, and automate generation of 997s and ASNs based on acknowledged lines. For compliance, remember that Costco’s program updates and penalty rules were last updated effective 2026-05-31 — verify current requirements in the Costco vendor portal.
When you are ready to validate or convert an 855 file, upload it for automated checks and CSV conversion on PlainEDI. PlainEDI’s validation features will prevent common rejections and produce a CSV matching the template above for rapid ERP ingestion.