EDI guide: document 997

EDI 997 Functional Acknowledgment: the receipt every EDI document expects back

Every 850, 856 and 810 expects a 997 in return. It is a technical receipt: the file arrived and could be read. It says nothing about whether the order will ship or the invoice will be paid, and confusing the two is an expensive habit.

  • 997ANSI X12 transaction set
  • A / E / Raccepted, accepted with errors, rejected
  • 24 htypical window to return one
  • Freeno signup
  • Sent byReceiver of any document back to the sender
  • NextNothing; it closes the loop for the document it acknowledges
  • GlossaryFunctional acknowledgement

What it is

What an EDI 997 is and why it matters

An EDI 997 is the functional acknowledgment. When a trading partner receives an EDI functional group (say, an 850 purchase order), its translator checks the envelope, the segment structure and the mandatory elements, then sends back a 997 that reports what it received and whether each transaction set passed. The 997 references the control numbers of the original file so the sender can tie the two together.

The 997 exists so that neither side has to guess. A brand that sends an 856 and gets no 997 within the agreed window knows to resend or to call. A retailer that receives an 850 acknowledgment with an R (rejected) code knows the supplier's translator choked on something before a human ever saw the order. Most trading partner agreements require a 997 for every inbound group within 24 hours and treat its absence as non-receipt.

What the 997 does not do is accept the business content. A 997*A on an 850 means the order file was readable; the 855 is where the brand accepts the order. A 997*A on an 856 means the ASN parsed; the retailer can still fine the shipment when the pallet scan does not match. For a 3PL this matters when a client says 'the ASN was accepted': ask which document said so.

Sample layout

The EDI 997 segment by segment

Illustrative values. Each retailer or carrier publishes an implementation guide with the exact subset of segments and codes it accepts.

SegmentWhat it carriesExample
STStart of the transaction setST*997*0001
AK1Functional group response header: the functional ID of what is being acknowledged (PO for 850, PR for 855, SH for 856, IN for 810, QM for 214) and its group control numberAK1*SH*000012045
AK2Transaction set response header: the set ID (856) and its control number, one AK2 loop per transaction set in the groupAK2*856*0001
AK3Data segment note: which segment had a problem, its position, the loop, and an error code (1 unrecognized segment, 2 unexpected segment, 3 mandatory segment missing, 8 segment has data element errors)AK3*MAN*14**8
AK4Data element note: the element position, the data element reference, and an error code (1 mandatory element missing, 4 too short, 5 too long, 6 invalid character, 7 invalid code value, 8 invalid date)AK4*2*87*7*XX
AK5Transaction set response trailer: A accepted, E accepted with errors, R rejected, plus up to five syntax error codesAK5*E*5
AK9Functional group response trailer: A accepted, E accepted with errors, P partially accepted, R rejected; number of sets included, received and acceptedAK9*E*1*1*1
SEEnd of the transaction setSE*8*0001

How it flows

How an EDI 997 moves from one system to the next

  1. A document arrives at the partner's translatorThe ISA envelope is opened, the functional group identified, and every transaction set is validated against the X12 standard and the partner's own implementation guide.
  2. The translator builds the 997AK1 names the group, one AK2 loop per set reports A, E or R with AK3 and AK4 detail for anything that failed, AK9 summarises the group.
  3. The sender reconcilesThe original file's control numbers are matched to the 997. Missing 997s trigger a resend alert; R codes trigger a mapping fix before the retailer's deadline runs out.

Common rejection reasons

Why an EDI 997 gets rejected or fined

The failures that show up in 997s, exception queues and retailer chargebacks.

  • R with AK3 error 3: mandatory segment missingA required segment such as TD1 or PRF is absent from the 856. The map does not populate it when the WMS field is blank.
  • AK4 error 7: invalid code valueA code the partner does not accept: a unit of measure of PC where they want EA, a status code they never listed. Check the implementation guide's code subset.
  • AK4 error 8: invalid dateDates in DTM or BSN not in CCYYMMDD, or a time without the expected HHMM format.
  • AK5 error 5: segment errors, accepted with errorsE status means the partner kept the file but flagged problems. Some retailers count E as a compliance miss; treat it as a defect to fix.
  • No 997 at allThe document may have failed at the envelope (bad ISA IDs or control numbers) before a 997 could be generated, or the partner's job is queued. Resend only after checking the connection log, or you create duplicates.

Before you sign

What a 3PL needs to run the 997 properly

Questions to settle with the warehouse
  • Ask the 3PL or the EDI provider how missing 997s are monitored and who gets the alert when one is overdue.
  • Agree a resend rule: no 997 after N hours, verify with the partner's connection log, then resend with a new control number.
  • Log every E and R result against the document and the retailer, and trend it; recurring AK3 codes point to a mapping gap.
  • Make sure the 3PL returns 997s for documents it receives (an 850 pushed direct to the warehouse, a 940 warehouse shipping order) within the same 24-hour rule it expects from others.
3PLs that run this documentRetail and EDI 3PLs

Warehouses with monitored EDI connections that return and reconcile 997s.

Questions

EDI 997 FAQ

Does a 997 mean the retailer accepted my order?
No. It means the retailer's system received and could parse the file. Business acceptance of an order is the 855; acceptance of a shipment is the receiving scan against the 856; acceptance of an invoice is payment or an 820.
What is the difference between a 997 and a 999?
The 999 is the implementation acknowledgment, which also reports whether the file met the partner's implementation guide rules (used heavily in healthcare with HIPAA X12). Most retail and logistics partners use the 997.
Does a 997 itself get a 997?
No. Acknowledging acknowledgments would loop forever, so the standard excludes the 997 from acknowledgment requirements.
How fast should a 997 come back?
Most agreements say within 24 hours; many translators return one within minutes. If your partner's 997s regularly take longer, raise it, because your resend logic depends on it.

Retailer asking for EDI?

Get matched with a 3PL that already runs the 997

3PL Hub matches brands with warehouses already exchanging this document with the retailers and carriers you sell through. Free for brands, commission-free, from a directory of 5,400+ providers.

Ready to shortlist 3PLs?

Free for brands. No commissions. Your details go only to the 3PLs you match with.

Get matched to 3PLs
3PL Hub

The commission-free 3PL directory and matchmaking platform. 5,000+ 3PLs, 200+ verified members, and 3PLs never pay us to be recommended.

Taking Inventory

The 3PL newsletter, every two weeks

3PL, fulfillment, M&A, eCommerce and trade, written by a human. Read by 3,000+ operators and the logistics ecosystem.

Subscribe to Taking Inventory Free. Every two weeks. Unsubscribe any time.