Validation & Control Gates · FA / AG / TX

EDI 997, 824 & 864: Syntax & AP Validation. A 997 says your file arrived and parsed. An 824 (Application Advice) or 864 (Text Message) is a later message from the retailer, usually about a problem with a document you sent.

01 · At a glance

Plain English vs. X12 specification.

Next: EDI 850 Purchase Order
Direction & GroupInbound · GS*FA (997), GS*AG (824), GS*TX (864)
Partners include824: Lowe's, Kroger, Costco, Walmart, Fred Meyer, Albertsons, True Value; 864: Home Depot, Walmart, Tractor Supply, Ace, Do It Best, Stater Bros., Albertsons
Grower RoleConfirms syntax receipt (997); retailer messages follow as 824 or 864
Common issueMistaking a green 997 for final 810 invoice approval
Plain English Grower Operations
Gate 1: 997 Syntax AckProves only that your file arrived and passed X12 grammar checks.
824 Application AdviceA retailer message tied to a specific document, such as an 810 invoice or 856 advance ship notice (ASN), usually reporting a problem with it.
864 Text MessageFree-text message from the retailer for a person to read, sometimes about a problem with a document you sent, or about compliance, chargeback, or program news.
Daily 824 CheckCheck for 824 OTI*TR rejections every day so you can send a corrected invoice the same day.
Common IssueWhen 824 or 864 messages remain unread in a value-added network (VAN) mailbox, rejected invoices go uncorrected and can pass the retailer's invoice deadline unpaid.
ANSI X12 / UCS Technical Specification
Functional GroupsGS01='FA' (997 Ack), GS01='AG' (824 App Advice), GS01='TX' (864 Text).
997 Status CodesAK1 (Group), AK2 (Set), AK5/AK9 ('A' Accepted, 'E' Accepted With Errors Noted, 'R' Rejected), plus AK9 'P' (Partially Accepted: at least one set rejected). A TA1 acknowledges only the ISA envelope and is requested with ISA14=1. The 999 (Implementation Acknowledgment) is a 5010 set used mostly in healthcare.
824 Error LoopBGN + OTI*TR (Rejected) + OTI03 (Doc#) + TED (Error Code & Message).
864 Message LoopBMG (Text Header) + MIT (Subject ID) + MSG (Free-form message text).
Control & ValidationEach sample line is labeled 997, 824, or 864. The 864 closes with its MSG text.
02 · Line-by-line X12 specification

X12 segment breakdown & raw sample.

Segment Plain-English Meaning Key X12 Elements
997 AK1Acknowledging Your Outbound 810 Invoice Group #501480Tells your system which batch of outbound documents this 997 receipt is acknowledging (Invoice batch #501480).
AK101IN (810 Invoice Group)
AK102501480 (Outbound GS06)
StageGate 1 · X12 Syntax Check
997 AK9*ASyntax Gate Passed (1 of 1 Invoices Accepted)Confirms that 1 of 1 invoice transaction sets in the group passed X12 syntax checks at the gateway (accounts-payable review still pending).
AK901A (Syntax Accepted)
AK902-041 Included / 1 Received / 1 Accepted
WarningDoes NOT prove AP approval
824 BGNRetailer ERP Audit Result (After the 997)Arrives after the 997, often hours or days later, when the retailer's Accounts Payable system audits your 810 Invoice.
ST01 / GS01824 / AG (Application Advice)
BGN02ADV-88210
StageGate 2 · ERP Business Rules
824 OTI*TRInvoice #INV-904812 Rejected by Accounts PayableFlags that Invoice #INV-904812 was rejected (TR = Transaction Rejected) by the retailer's AP engine and will NOT be paid unless corrected.
OTI01TR (Transaction Rejected)
OTI03INV-904812 (Rejected Invoice)
OTI10810 (Source Transaction)
824 TEDExact Reason AP Rejected the InvoicePinpoints the exact fix required: REF*IA (Retailer Vendor Number) was missing or invalid on the invoice header.
TED01007 (Missing Data)
TED02Missing/Invalid Vendor Number (REF IA)
ActionFix Vendor ID & Resend 810
864 MIT & MSGExample 864 Notice: Weekly Compliance ScorecardAn example of message content: free-form text lines reporting a weekly GS1-128 rack scan rate (99.4%). Each retailer decides what its 864 messages say.
ST01 / GS01864 / TX (Text Message)
MIT01COMP-2026-W16
MSG PayloadHuman-Readable Compliance Text
01  997: AK1*IN*501480~02  997: AK9*A*1*1*1~03  824: BGN*00*ADV-88210*20260416*1450~04  824: OTI*TR*IV*INV-904812***20260416*1420*501480*000209114*810~05  824: TED*007*MISSING OR INVALID INTERNAL VENDOR NUMBER*REF~06  864: BMG*00*VENDOR COMPLIANCE SCORECARD~07  864: MIT*COMP-2026-W16*SPRING RACK BARCODE & ASN COMPLIANCE SCORECARD~08  864: MSG*GS1-128 RACK LABEL SCAN RATE WEEK 16 99.4 PCT~
Walk through your trading-partner map

Bring your retail EDI requirements to a Thursday.

Book a Grower Thursdays session with John Beauford, our Chief Technology Officer, or Stephen van Wingerden, our Chief Innovation Officer, and bring your retailer's EDI requirements.