Walmart Edi 997
What This Is
The EDI 997 functional acknowledgment is the X12 transaction set used by Walmart and many trading partners to report acceptance or rejection of previously received EDI transaction sets. A correct 997 tells you whether Walmart accepted an incoming document (for example an 850 purchase order or an 856 ASN) or rejected it, and it gives machine-readable codes and segment-level references so you can pinpoint the problem.
This guide focuses on Walmart-specific handling of 997 acknowledgments: how to parse ISA/GS control envelopes, read AK1/AK2/A K5/AK9 results, convert 997s into operational CSV reports, and remediate the most common Walmart-related rejection reasons. It shows real-world 997 examples and exact steps you can follow to convert, validate, and fix issues using both manual inspection and automated tools such as PlainEDI. Walmart enforces OTIF and ASN accuracy compliance penalties. Check your Walmart Retail Link portal for current penalty rates and thresholds (effective 2025-11-30).
Who This Is For
This guide is for EDI analysts, integration engineers, vendor compliance teams, and operations managers who receive Walmart 997 acknowledgments and need to convert them into reports, fix rejected transaction sets, or feed acknowledgment outcomes into ERPs and ticketing systems.
Key Segments Explained
Below are the key 997 segments you will encounter when Walmart returns a functional acknowledgment. Understanding each segment and element is essential to interpret accept/reject status accurately.
- ISA — Interchange Control Header
The ISA is the fixed-length envelope header for X12. For 997s you must validate the
ISA13andISA14control number and the delimiters declared inISA16. Walmart often sends ISA elements with specific qualifiers; confirm the two-character repetition tags and the element/segment terminators before parsing. The interchange control number links the 997 to the specific interchange you previously sent. - GS — Functional Group Header
The GS header groups a set of transaction sets by functional identifier code (for acknowledgments, functional ID code 'FA' is common). Verify
GS02(application sender code) andGS03(application receiver code) match expectations. Walmart will include aGS06group control number; that number helps reconcile group-level acceptance reported inAK9. - ST / SE — Transaction Set Header and Trailer
Each 997 transaction set begins with
ST*997*nnnnand ends withSE*segmentCount*nnnn. The transaction set control number inST02must equalSE02. If these control numbers mismatch, downstream EDI engines will reject or flag the 997 itself. Walmart's EDI gateway enforces correct ST/SE pairs. - AK1, AK2, AK5, AK9 — Acknowledgment Detail
These four segments carry the acknowledgment logic:
- AK1 identifies the group being acknowledged (
AK101functional ID code,AK102group control number). - AK2 identifies the transaction set within the group (
AK201transaction set ID,AK202transaction set control number). - AK5 gives the transaction set acknowledgment code (
AK501values: A = Accepted, E = Accepted with errors, R = Rejected) and optional error codes in following elements to flag segment/element problems. - AK9 summarizes the group-level outcome with counts and a group acknowledgment code (
AK901values: A = Accepted, E = Accepted with errors, R = Rejected).
Interpreting the combination of AK5 and AK9 is critical: an AK5=R for AK2 indicates the transaction set needs remediation; AK5=A means no action is required from your side.
- AK1 identifies the group being acknowledged (
Example EDI Snippet
ISA*00* *00* *ZZ*SENDERID *ZZ*WALMART *251112*1700*^*00501*000000905*0*P*:~
GS*FA*SENDERID*WALMART*20251112*1700*905*X*005010X231A1~
ST*997*0001~
AK1*PO*12345~
AK2*850*000000123~
AK5*R~
AK3*BEG*4*1~
AK4*3*4*IU*PO1~
AK5*R*8~
AK9*R*1*1*0~
SE*10*0001~
GE*1*905~
IEA*1*000000905~
Line-by-line explanation:
ISA*00*...*000000905*0*P*:— ISA interchange header.ISA13=000000905is the interchange control number. Validate element and segment delimiters as declared.GS*FA*...*905*— GS functional group for functional acknowledgment (FA).GS06=905is the group control number.ST*997*0001— Start of the 997 transaction set with control number 0001.AK1*PO*12345— Acknowledging the group with functional ID 'PO' and group control number 12345 (this links to the original PO group you sent).AK2*850*000000123— Acknowledging transaction set 850 with control number 000000123.AK5*R— Transaction set was rejected (AK5=R). This means the receiver (Walmart) found a transaction-level error.AK3*BEG*4*1— Segment-level error reported: segment BEG at position 4, occurrence 1.AK4*3*4*IU*PO1— Element-level error: the third element in segment PO1 failed with error code 4 (invalid code value). The qualifier IU indicates the element error type; PO1 shows the segment name where the element resides.AK5*R*8— Second AK5 provides an additional reject reason with code 8 (loop error). Multiple AK5s can appear to enumerate multiple errors.AK9*R*1*1*0— Group-level summary: group rejected. The counts indicate one transaction set received, one transaction set accepted, zero rejected (interpretation depends on the send/receive orientation; always align with AK9 element definitions when building CSV).SE*10*0001— SE indicates end of transaction set with 10 segments total and control number 0001 matching ST.
CSV Output Example
The table below shows a CSV-ready mapping you can produce for operations teams. Use this mapping to convert each 997 AK2/AK5 result into a single CSV row per transaction set.
| csv_control_number | isa_control_number | gs_control_number | transaction_set_id | transaction_set_control | ack_code | segment_error | element_error | error_description | raw_ak_segments |
|---|---|---|---|---|---|---|---|---|---|
| 0001 | 000000905 | 905 | 850 | 000000123 | R | BEG position 4 | PO1 element 3 invalid | Invalid PO1 element. Replace with valid U.P.C. code per Walmart ASN requirements. | "AK1*PO*12345|AK2*850*000000123|AK5*R|AK3*BEG*4*1|AK4*3*4*IU*PO1" |
Step-by-Step Conversion Process
-
Detect and normalize delimiters
- Read
ISA16to determine segment terminator and the element separator at the byte level. Failing to use the declared delimiters produces parsing errors. - Normalize line endings and remove any transport artifacts before tokenizing segments.
- Read
-
Validate envelope integrity
- Verify
ISA13/ISA14andGS06/GE02control numbers. If numbers mismatch, flag the entire file as invalid and generate an alert to your EDI team. - Confirm
ST02matchesSE02for each transaction set. If they do not match, extract raw segments and send to the EDI mailbox for manual review.
- Verify
-
Extract AK1-AK9 blocks
- For each
AK2entry, build a row with the linkedAK5and anyAK3/AK4error detail that follows until the nextAK2/AK1orSE. - Collect
AK9group summaries and attach them to all rows from the same group control number for context.
- For each
-
Map to CSV fields
- Populate columns shown in the CSV example. Use terse descriptions for error_description and include raw_ak_segments for auditing.
- Include timestamps for ingestion and for the original ISA/GS times so operations can reconcile quickly with order management systems.
-
Automated triage and ticketing
- If
ack_code = Rorack_code = E, create a ticket with the CSV row and attach the original 850/856 causing the rejection. Include action required: 'Resend corrected 850' or 'Fix invalid PO1 element'. - For
ack_code = A, update your tracking system as acknowledged and clear any waiting transmission flags.
- If
-
Use validation tools to prevent recurring issues
- Run pre-send validation against Walmart's expected 850/856 schemas. How to validate EDI files before sending explains schema checks and control number sequencing.
- Integrate PlainEDI to catch delimiter, control number, segment count, and element value issues before Walmart receives the file. PlainEDI provides line-level error pointers and prevents many AK5 rejections.
Common Errors and Fixes
Below are frequent reasons Walmart sends a 997 rejection and precise remediation steps.
- Error: AK5 = R, AK3 shows segment name with position — Fix: Inspect the referenced segment (e.g., BEG). Compare the failing segment’s element count and qualifiers against Walmart’s 850 spec. Correct missing mandatory element and resend. If unsure, use how to read Walmart EDI 850 for segment-level expectations.
- Error: ST/SE control number mismatch — Fix: The ST02 must equal SE02. Regenerate the transaction set with matching ST/SE control numbers. Use your EDI translator’s control number sequencing feature to avoid manual mistakes.
- Error: ISA control number not found (Interchange mismatch) — Fix: Ensure your outbound ISA13 value was unique and that you are acknowledging the correct interchange. If Walmart references a different ISA13, reconcile with VAN/AS2 logs and resend the correct interchange with a new control number.
- Error: Invalid element value noted in AK4 (example: UPC or qualifier) — Fix: Validate element code lists (e.g., unit of measure, ID qualifiers) against Walmart’s vendor requirements. Replace invalid values and resubmit. Use understanding EDI X12 delimiters and structure to ensure element parsing is correct.
- Error: AK9 = R but AK5 = A for some TS — Fix: Review group-level counts (AK902..AK904). If counts mismatch, one or more transaction sets in the group failed schema-level checks; examine other AK2 entries in the same group to find the failing set and correct it.
- Error: Missing required ISA/GS qualifiers or incorrect partner IDs — Fix: Confirm sender/receiver IDs and qualifiers match Walmart's Trading Partner Agreement. Use the exact IDs from Retail Link. Wrong IDs result in immediate rejections or routing to a dead mailbox.
Related Resources
- reading 997 functional acknowledgments — deeper reference on AK segment codes and element definitions.
- resolving edi 997 rejection codes — catalog of AK3/AK4 error codes and remediation steps.
- how to validate edi files before sending — pre-submit checks to prevent Walmart 997 rejects.
- walmart suppliers edi to csv conversion — guidance on converting Walmart EDI into CSV for operations teams.
- understanding edi x12 delimiters and structure — low-level parsing rules and delimiter handling.
- edi conversion for 3pl warehouses — case studies where 997 handling was automated for 3PL workflows.
FAQ Section
Q: What does AK5 = R mean in a Walmart 997?
AK5 = R indicates the transaction set referenced by the AK2 was rejected by the receiver. You must examine subsequent AK3/AK4 segments for segment- and element-level error details and correct the original transaction before resending.
Q: How quickly does Walmart expect a 997 acknowledgment to be processed?
Walmart expects trading partners to monitor 997s promptly and remediate rejections to preserve OTIF and ASN accuracy compliance. Walmart enforces OTIF compliance penalties; check your Walmart Retail Link portal for specific processing windows and penalty thresholds (effective 2025-11-30).
Q: Can a 997 contain multiple AK2/AK5 groups?
Yes. A single 997 can acknowledge multiple transaction sets (multiple AK2 blocks). Parse each AK2+AK5 set separately and generate one CSV row per transaction set for operational tracking.
Q: What’s the difference between AK9 = E and AK5 = E?
AK5 = E on an AK2 indicates the specific transaction set was accepted with errors. AK9 = E indicates the group-level acknowledgment is 'Accepted with errors.' Always use AK2/AK5 to locate the precise errors and AK9 for group-level summary state.
Q: Which control numbers must match between the original file and the 997?
The critical control numbers are ISA13 (interchange control), GS06 (group control), and ST02/SE02 (transaction set control). Ensure your EDI engine tracks and compares these numbers; differences indicate misrouted or mismatched acknowledgments.
Q: How do I turn a 997 into an actionable ticket for warehouse ops?
Extract AK2/AK5 information into a CSV row including order number, transaction set control, ack code, and human-friendly error_description. Attach the original EDI transaction and create a ticket with required action (e.g., 'Correct PO1 UPC and resend'). Automate this with PlainEDI to reduce manual triage.
Q: Are AK3/AK4 error codes standardized?
Yes, AK3 (segment errors) and AK4 (element errors) use standardized X12 codes to indicate the type of failure (invalid ID, missing mandatory element, invalid format, etc.). Use the X12 implementation guide and resources like resolving edi 997 rejection codes to map numeric codes to human-readable fixes.
Q: How does PlainEDI help with Walmart 997 processing?
PlainEDI validates EDI files against X12 schemas and Walmart-specific rules before you send them, preventing many causes of 997 rejections. For inbound 997s, PlainEDI converts acknowledgments to CSV with parsed AK segments, groups by control numbers, and flags rejections for automated ticket creation.
Final Notes and Call to Action
Walmart 997 acknowledgments are the definitive source for acceptance or rejection of your EDI traffic. Implement envelope and transaction validation, parse AK1-AK9 correctly, and map results to CSV so operations and compliance teams can act quickly. Integrate validation tooling to reduce repeat errors: PlainEDI enforces delimiter validation, control number checks, and schema compliance to prevent AK5 rejections and to automate CSV conversion.
Ready to automate your Walmart 997 processing and convert acknowledgments into CSV, tickets, or ERP updates? Upload a 997 to PlainEDI to validate, parse, and convert it in seconds.