EDI | X12

EDI 997 Functional Acknowledgment Explained - 2026 Guide

EDI 997 Functional Acknowledgment explained - AK1-AK9 segment structure, 997 vs 824 vs TA1, common error codes, and how EDI Generator automates acknowledgments.

Sampavi Sriparan

Sampavi Sriparan

Published: 15 Jul 2026

Blog image

The EDI 997 Functional Acknowledgment is an X12 transaction that confirms an EDI document was received and passed syntax validation. It reports acceptance, rejection, or errors at the segment and element level via AK1–AK9 segments, but it does not validate business content. Most retailer compliance programs (Walmart, Amazon, and Target) require timely 997s.

You’ve successfully transmitted the EDI document — the system says it went through. But days later, your trading partner claims they never received it, or that it hasn’t been processed.

How do you confirm that your document was received and accepted? That’s where the EDI 997 Functional Acknowledgment comes in.

What an EDI 997 Actually Is

The EDI 997 is a functional acknowledgment — another version of “got it,” plus whether what was sent was valid.

Your system generates an EDI transaction — a purchase order (850), invoice (810), or ASN (856) — and the receiver sends back a 997. It acknowledges receipt and states whether the document is structurally valid.

It’s like a certified mail receipt that also tells you whether the letter was written in the correct format. Without the 997, you don’t know whether your EDI document was received successfully, or whether there’s an error that needs fixing before the process can move forward.

Why Retailers Treat the 997 as a Trust Signal

Large retailers such as Walmart, Target, and Amazon run EDI compliance programs to gauge how reliable their trading partners are at exchanging documents. The exact requirements vary by retailer, but correctly processing the EDI 997 is often crucial to staying compliant.

That’s because it matters commercially:

  • Missing or rejected acknowledgments mean errors can go unnoticed, leading to chargebacks or compliance penalties.
  • Purchase orders, ASNs, or other key documents may miss processing and shipment deadlines if rejections aren’t corrected in time.
  • EDI testing and certification can stretch out, since many retailers won’t certify a new trading partner until 997 processing passes testing.

Consistently sending and receiving 997 acknowledgments shows that your systems are reliable, your EDI documents adhere to agreed standards, and you can quickly identify and resolve issues — building trust with your trading partners over time.

The AK1–AK9 Segment Structure of an EDI 997

The EDI 997 is made up of several segments, each with a specific function — identifying who sent the message and which transaction is being acknowledged, or reporting whether a document was accepted or rejected. Together, these segments give trading partners a standardized way to confirm receipt and communicate the result of syntax validation.

AK1 – Functional Group Response Header

Identifies which functional group (set of related transactions) is being acknowledged. Holds a group control number.

AK2 – Transaction Set Response Header

Identifies the specific transaction set being acknowledged. For example, if acknowledging a purchase order (850), the AK2 segment contains the transaction set ID (850) and the control number. AK2 marks the beginning of the transaction set acknowledgment loop.

AK3 – Data Segment Note

Points to a specific segment inside the transaction where an error was found. Contains the segment ID, its position, and loop ID.

AK4 – Data Element Note

Drills into the actual position of the data elements in the flagged segment. Reports the type of error and, if any, the bad value.

AK5 – Transaction Set Response Trailer

Closes the AK2 loop and contains the transaction acknowledgment code — the most significant field in the 997:

Code Meaning
A Accepted
E Accepted with errors
R Rejected
M Message authentication code (MAC) failed; message was rejected
W Accepted, but some errors were noted
X Rejected: content not processed

The entire acknowledgment is closed by AK9 — Functional Group Response Trailer, which summarizes how many transactions were included, accepted, and rejected in the functional group.

Together, AK1 through AK9 provide a full audit trail down to the individual data element that failed.

997 vs 824 vs TA1: The Three “Did You Get It?” Signals

EDI has three types of acknowledgments. Each works at a different level, and none can substitute for another.

TA1 – Interchange Acknowledgment The lowest level. It validates the outer envelope that contains all your EDI data (ISA/IEA). If the TA1 fails, none of the transactions inside were even examined.

997 – Functional Acknowledgment Acknowledges at the functional group and transaction set level — this is where structural and syntactic validation happens. Most trading partner agreements require a 997.

824 – Application Advice One step further: business logic validation. An 824 might reject an invoice because the PO number wasn’t found in the buyer’s system, while a 997 would reject it for a structural reason. The 824 isn’t as commonly required, but it’s essential for partners with stricter business rules.

The rule of thumb:

  1. TA1: Has the envelope been received?
  2. 997: Was the document structurally valid?
  3. 824: Does this make sense to our business?

Common 997 Error Codes and How to Debug Them

If a 997 comes back R (Rejected) or E (Accepted with Errors), the AK4 segment tells you what went wrong. Here are the most common error codes and what they mean in practice.

Error Code 1 – Unrecognized segment ID: A segment was found that the receiver’s EDI standard doesn’t recognize. Usually this means a segment you sent isn’t supported by your partner’s implementation guide.

Error Code 2 – Unexpected segment: The segment exists in the standard but appeared in the wrong location or out of sequence.

Error Code 3 – Mandatory segment missing: A required segment wasn’t provided at all. Check your implementation guide for what’s missing.

Error Code 8 – Segment has data element errors: An error was found in a specific data element. The AK4 segment narrows it down to the exact location.

Error Code 13 – Too many repetitions: A segment repeated more times than the implementation guide allows.

Debugging workflow:

  1. Read AK5 first — get the result code at the transaction level.
  2. Check AK3, which tells you which segment failed and its context in the loop.
  3. Read AK4 to identify the element position and error code.
  4. Cross-reference not just the base X12 standard, but your trading partner’s implementation guide.
  5. Revalidate outbound transactions before re-sending.

Most 997 rejections come down to one root cause: the data you’re producing doesn’t match what your partner’s implementation guide expects.

How to Automate EDI 997s with EDI Generator

Manually handling 997s is slow, error-prone, and doesn’t scale. EDI Generator generates and consumes 997s on both ends, without you having to build any custom parsing logic.

Automatic 997 generation: If you receive EDI transactions from your trading partners, EDI Generator validates them and sends the appropriate 997 automatically. You don’t write the acknowledgment logic yourself — the platform handles AK segment construction, control number tracking, and delivery back to the sender.

Automatic 997 consumption: If your outbound transactions come back with a 997, EDI Generator consumes it, maps the AK codes, and surfaces them in your dashboard. Rejections show up immediately with the relevant segment and element information — no manual searching through raw EDI files.

This will give you:

  • Real-time visibility into transaction acceptance status.
  • Automatic retries for detected rejections.
  • An audit trail of every 997 sent and received.
  • No acknowledgment gaps, and less chargeback risk.

EDI Generator

Frequently Asked Questions

Is an EDI 997 mandatory?

The X12 standard doesn’t mandate it, but nearly all trading partner agreements do. Walmart, for example, requires functional acknowledgments within 24 hours of receiving a purchase order. Missing 997s can trigger chargebacks or block certification during EDI testing.

What does a 997 rejection mean?

An AK5 code of R means the transaction failed syntax validation — a mandatory segment is missing, the segment order is wrong, or an invalid data element is present. The AK3 and AK4 segments pinpoint the exact segment and element that failed so you can correct and resend.

What’s the difference between a 997 and an MDN?

An MDN is an AS2 protocol-level receipt confirming the transmission arrived and decrypted correctly. The 997 operates at the EDI document level, confirming the X12 content passed syntax validation. Reliable exchanges use both.

Does a 997 confirm my invoice was approved?

No. The 997 only validates structure and syntax. Business-level acceptance — whether a PO number matches or pricing is correct — is communicated via an EDI 824 Application Advice or a document-specific response like the 855.

Conclusion

The 997 is a small acknowledgment transaction, yet it can account for a disproportionate share of EDI message volume in many trading partner relationships. It’s what your trading partners use to judge the reliability of your systems. Neglect it, and chargebacks follow. Get it right, and you build the kind of compliance history that makes onboarding new retail partners progressively easier.

Ready to stop chasing 997s manually? Get a free trial on EDI Generator and let it handle the acknowledgment logic end-to-end, so you can focus on your business instead of the underlying infrastructure.

Sampavi Sriparan

Sampavi Sriparan

Sampavi is a Senior Software Engineer at Aayu Technologies with over 2 years of experience in B2B communication software and cloud technologies. She has played a crucial role in developing and implementing advanced systems, driven by her passion for leveraging technology to solve complex business challenges. In her free time, she enjoys listening to music and watching movies.
Talk to an EDI Expert
Stay Compliant. Stay Connected. Powered by AS2.

Join hundreds of organizations already taking full control of their B2B AS2 communications with our trusted solutions. Contact us today to tailor a solution that fits your specific AS2 EDI needs.

Request a demo and take a live look at all the features of our AS2 EDI solutions.
Get answers to your questions and explore customizations that we can offer tailored specifically for you.
Get to know the dedicated deployment option available for your specific use cases.
Loading...
Please wait...

We're processing your request

Related Articles

View All Blogs
EDI Generator
Cloud-Based EDI Solution with AS2 Integration
Explore our product stack

Try before you commit. 30 days, no credit card needed

Get full access to whichever product fits your needs. Configure real trading partner connections, run end-to-end transactions, and see the platform perform before making any commitment. All three products include a free 30-day trial with no restrictions.

Aayu logomark
Driving Innovation, Simplifying Connections.
EDI via AS2
30-day Free Trial
Secure and Compliant