EDI 997, 824 & 864: Why a Green 997 Does Not Mean Your Invoice Passed
One of the costliest misconceptions in wholesale nursery EDI is believing that an inbound EDI 997 Functional Acknowledgment (GS*FA) with an "Accepted" status (AK9*A) means your 856 Advance Ship Notice or 810 Invoice was approved for payment by the retailer’s business system. In reality, retail EDI uses a two-stage validation gate spanning three control transactions: the 997 Functional Acknowledgment, the 824 Application Advice (GS*AG), and the 864 Text Message (GS*TX).
Quick Scorecard: EDI 997, 824 & 864 at a Glance
The control loop governing every EDI exchange: X12 envelope syntax receipts (997), structured application rejections or approvals tied to a specific document (824), and free-text advisories or scorecards (864).
997 is universal across all 14 partners; 824 partners include Lowe’s, Kroger, Costco, Walmart, Fred Meyer, Albertsons, and True Value; 864 partners include Home Depot, Walmart, Tractor Supply, Ace, Do It Best, Stater Bros., and Albertsons.
The #1 silent failure in grower EDI is assuming a 997 Functional Acknowledgment means an 856 or 810 was approved. The 997 only confirms syntax; an 824 or 864 arriving later can still reject your invoice.
If nobody monitors inbound 824 OTI*TR rejections or 864 MSG compliance notices daily, rejected invoices remain unpaid and age past the retailer’s billing window without entering the AP ledger.
Side-by-Side: Plain-English Operations vs. ANSI X12 Technical Spec
Why a 997 receipt is only the mailroom stamp, and the 824 or 864 is the actual buyer audit.
Every time your nursery sends an 856 ASN or 810 Invoice, two separate gates inspect it. Within minutes, the retailer’s gateway returns a 997 Functional Acknowledgment (AK9*A), which only means ‘the file arrived and the X12 envelopes parsed cleanly.’ Later, the retailer’s business and Accounts Payable systems check whether the PO is open, the REF*IA vendor ID matches, unit prices align, and the 856 rack receipt is on file. When a rule fails, the retailer sends back either a structured 824 Application Advice tied to that invoice/ASN or a free-text 864 Text Message.
X12 997 (AK1/AK2/AK5/AK9 syntax), 824 (BGN/OTI*TR/TED business rejections), and 864 (BMG/MIT/MSG).
In the 997 (GS*FA), AK1 identifies the acknowledged functional group (IN for 810, SH for 856) and AK901 ('A' Accepted, 'E' Accepted with Errors, 'R' Rejected) reports X12 syntax status. In the 824 (GS*AG), OTI01 ('TR' Transaction Rejected or 'TA' Transaction Accepted), OTI02 ('IV' or 'SI'), and OTI03 identify the target invoice or ASN, while TED01/TED02/TED03 report the error code, message, and offending segment (REF). In the 864 (GS*TX), BMG and MIT introduce human-readable MSG text lines.
Verified De-Identified X12 Specimen Lines
997: AK1*IN*501480~ / AK9*A*1*1*1~
824: BGN*00*ADV-88210*20260416*1450~ / OTI*TR*IV*INV-904812***20260416*1420*501480*000209114*810~
824: TED*007*MISSING OR INVALID INTERNAL VENDOR NUMBER*REF~
864: BMG*00*VENDOR COMPLIANCE SCORECARD~ / MSG*GS1-128 RACK LABEL SCAN RATE WEEK 16 99.4 PCT~
| X12 Segment Specimen | Operational & Technical Role |
|---|---|
AK1*IN*501480~ / AK9*A*1*1*1~ | 997 (GS*FA): Gate 1 Syntax Passed: 1 of 1 810 Invoice Envelopes Accepted |
OTI*TR*IV*INV-904812***20260416*1420*501480*000209114*810~ | 824 (GS*AG): Gate 2 Business Audit Rejected Invoice #INV-904812 (OTI*TR) |
TED*007*MISSING OR INVALID INTERNAL VENDOR NUMBER*REF~ | 824 TED: Missing/Invalid Data (007) in REF Segment (REF*IA Vendor ID) |
BMG*00*VENDOR COMPLIANCE SCORECARD~ / MSG*...~ | 864 (GS*TX): Free-Form Retail Vendor Compliance Scorecard or Rejection Notice |
Complete De-Identified X12 997, 824 & 864 Specimens
Below are the three control documents triggered in sequence when a nursery transmits an 810 Invoice that passes X12 envelope syntax (997) and then hits a downstream Accounts Payable vendor-number check (824 and 864):
Gate 1: Inbound EDI 997 Functional Acknowledgment (GS*FA, Syntax Passed)
ST*997*0001~
AK1*IN*501480~
AK2*810*000209114~
AK5*A~
AK9*A*1*1*1~
SE*6*0001~
Gate 2A: Inbound EDI 824 Application Advice (GS*AG, Business Rule Rejected)
ST*824*0001~
BGN*00*ADV-88210*20260416*1450~
N1*FR*RETAIL ACCOUNTS PAYABLE ENGINE*92*0722717~
N1*TO*SAMPLE GROWER NURSERY*92*4409821~
OTI*TR*IV*INV-904812***20260416*1420*501480*000209114*810~
REF*PO*08096470~
TED*007*MISSING OR INVALID INTERNAL VENDOR NUMBER*REF~
NTE*ADD*POPULATE ASSIGNED VENDOR ID IN REF IA AND RESEND 810~
SE*9*0001~
Gate 2B: Inbound EDI 864 Text Message (GS*TX, Free-Text Compliance Notice)
ST*864*0001~
BMG*00*VENDOR COMPLIANCE SCORECARD~
DTM*097*20260416~
MIT*COMP-2026-W16*SPRING RACK BARCODE & ASN COMPLIANCE SCORECARD~
MSG*GS1-128 RACK LABEL SCAN RATE WEEK 16 99.4 PCT~
MSG*ACTION: REVIEW ANY OPEN AP EXCEPTIONS WITHIN 7 DAYS~
SE*7*0001~
How the Two-Stage Gate Works Across Our 14 Retail & Distribution Partners
| Control Set | Functional Group | What It Checks | Key Status Codes | Partners Include |
|---|---|---|---|---|
| EDI 997 | GS*FA | Gate 1 (Envelope & X12 Syntax): Verifies that your ISA/GS/ST envelopes, delimiters, and segment counts (SE01) conform to the ANSI X12 standard. Returned within minutes by the VAN or AS2 gateway. | AK901 = 'A' (Accepted), 'E' (Accepted with Errors), 'R' (Rejected). | All 14 Retail & Distribution Partners (bidirectional syntax receipt). |
| EDI 824 | GS*AG | Gate 2A (Structured Application Advice): Tied directly to a specific invoice or ASN (OTI03) when the retailer’s ERP checks PO status, REF*IA vendor ID, unit price, and 856 rack receipt. | OTI01 = 'TA' (Accepted), 'TR' (Transaction Rejected), 'TE' (Accepted with Errors); TED names the segment error. | Lowe’s, Kroger, Costco, Walmart, Fred Meyer, Albertsons, True Value. |
| EDI 864 | GS*TX | Gate 2B (Free-Text Advisories & Scorecards): Includes human-readable MSG text lines containing compliance notices, rejection summaries, or weekly vendor scorecards. | BMG (Beginning Segment for Text), MIT (Message Identification), MSG (Message Text). | Home Depot, Walmart, Tractor Supply, Ace, Do It Best, Stater Bros., Albertsons. |
Catching Rejected Invoices Before They Age Out
In legacy portal or file-folder EDI setups where 997, 824, and 864 messages remain unread in an IT directory, accounting often assumes an invoice is scheduled for payment because it shipped two weeks ago, only to learn 45 days later that an 824 (OTI*TR) or 864 rejected it on Day 1.
At Silver Fern, our EDI team manages live EDI across 14 retail and distribution partners alongside Work Suite FULFILL™, validating outbound 856 and 810 files against each partner’s map and monitoring inbound 997, 824, and 864 queues so rejected documents get corrected and resent right away.
Related Guides in the Grower EDI Library
- Flagship Interactive Reference: The Ultimate EDI Guide for Growers (All 18 X12 Sets & 12 VMI Data Files)
- Order & Change Cycle: EDI 850 Purchase Order · EDI 855 PO Acknowledgment · EDI 860 PO Change
- Dock, Routing & Rack ASN: EDI 753 & 754 Routing Instructions · EDI 856 Advance Ship Notice & Rack Manifest · EDI 204 Load Tender & 816 Store Directory
- Invoicing, Pay-by-Scan & Settlement: EDI 810 Invoice · EDI 812 Credit/Debit Adjustment · EDI 820 Payment Order & Remittance Advice
- Inventory, POS & Grocery UCS/DEX: EDI 846 Inventory Inquiry/Advice · EDI 852 Product Activity Data (POS) · Grocery UCS 875, 876 & 880 · DSD DEX 894 & 895 · 997, 824 & 864 Control Gates
Silver Fern's EDI team manages live retail EDI for growers today. Open the guide, see how Work Suite fits, or book a demo.