How to Read an EDI 997: The Fastest Way to Find Where a Document Failed

By
Emily Marshall
July 15, 2026
5 min read
Share this post

Updated July 14, 2026
Quick Answer

An EDI 997 is a technical receipt that tells you whether your EDI document was accepted, accepted with errors or rejected. To read one fast:

  1. Check AK9 for the verdict: A = accepted, E = accepted with errors, R = rejected
  2. If E or R, go to AK3 for the failing segment and its position
  3. Read AK4 for the specific element and error code

That three-segment path resolves most rejections without reading the whole interchange.

Staring at a rejection right now and this page isn't cutting it? Send us the 997 — decoding these is genuinely fun for us. Start a conversation.

If you work with EDI, you've probably spent a late night or two chasing down where a document went sideways. The 997 Functional Acknowledgment exists for exactly this moment — and teams that know which segments to read first can pinpoint the failure and the fix in minutes instead of hours, before a rejection compounds into chargebacks, shipping delays or invoice mismatches.

What Is an EDI 997 Functional Acknowledgment?

The 997 is a standard X12 message sent by your trading partner or VAN to confirm receipt of an EDI document. It checks the technical structure of your file — segments, loops, delimiters, element formats — not the business content. A clean 997 means the document parsed; it says nothing about whether the partner will accept the pricing on line 3.

That distinction gives the 997 two jobs at once. It's proof of receipt — timestamped evidence for your compliance audit trail that the document arrived and was processed. And it's a technical validation report — when something failed, it identifies exactly which segment and element broke, and why. The verdict comes in three flavors: accepted (AK9*A), accepted with errors (AK9*E) or rejected outright (AK9*R).

The Key Segments and What They Tell You

You don't need to analyze every line of a 997. Five segments carry all the diagnostic weight:

Segment Name What It Tells You When to Check It
AK1 Functional Group Response Header Links to the group in your original document via the GS06 control number When you need to match the 997 to a specific interchange
AK2 Transaction Set Response Header Isolates the individual transaction (810 invoice, 850 PO) tied to your outbound ST segment number To identify which transaction set failed
AK3 Data Segment Note Pinpoints the failing segment and its position — a malformed N1 shows up here After AK9 shows E or R — the primary diagnostic
AK4 Data Element Note Drills to the specific faulty element and error code — too long, invalid characters, missing entirely Alongside AK3 — the exact element and error type
AK9 Transaction Set Response Trailer The overall verdict: A (accepted), E (accepted with errors), R (rejected) Always first — tells you whether action is required at all

Experienced teams read these out of order on purpose: AK9 first for the verdict, then straight to AK3 and AK4 for the failure point. AK1 and AK2 only matter when you need to trace the 997 back to a specific interchange or transaction.

How to Read a 997 in Five Steps

1. Open the 997 in your viewer or portal

Look for ST*997 signaling the start of the acknowledgment. If your EDI portal supports search by transaction, partner or date, use it — digging through mailbox log dumps is the slow way.

2. Check AK9 for overall status

You'll see something like AK9*R*1*1*0 — "R" is the rejection, and the numbers that follow are the counts of transactions sent, received and accepted. A full rejection means action before the next shipping or billing cycle, not after.

3. Identify the transaction with AK2

Find the transaction set code (810, 850) and control number. That matches your outbound document, so you can trace the exact file that needs correction through your ERP or system logs.

4. Locate the exact error with AK3 and AK4

AK3 tells you which segment and where — AK3*IT1*5 flags the fifth line item. AK4 gives the error code — code 5, for example, means invalid data in that element. With those two, you can open the outbound file, correct the specific field and resend.

5. Double-check the ISA/GS envelope headers

Confirm sender and receiver IDs align and timestamps are correct. Out-of-sync envelopes trip up even experienced integrators and cause rejections that have nothing to do with the document's content.

Sample 997 walkthrough

Here's a real rejection read in under two minutes:

ST*997*0001~
AK1*HS*000001~ ← Functional group reference
AK2*810*0001~ ← Invoice transaction set, control number 0001
AK3*IT1*5*007~ ← IT1 segment, position 5, loop 007 failed
AK4*1*4*5~ ← Element 1, position 4, error code 5 = invalid data
AK9*E*1*1*1~ ← Accepted with errors; 1 sent, 1 received, 1 accepted
SE*7*0001~

Translation: your 810 invoice had a failed IT1 segment on line 5 — element 4 contains invalid data. Find the outbound invoice, correct that field, resend. No email threads, no waiting on a support callback.

Got an AK3/AK4 combination that doesn't match anything in this guide? Paste it into a message and send it our way — we read these all day and we're happy to translate, no strings attached.

AK9 Status Codes: A, E and R

AK9 Code Status What It Means Required Action
A Accepted No technical errors; the document structure passed all validation checks None technically — but confirm business acceptance separately, since the 997 doesn't validate business logic
E Accepted with Errors The interchange was accepted but some transactions had structural issues; AK3/AK4 identify which Prompt — isolate the affected transactions and correct them before the next cycle
R Rejected The entire transaction set was rejected; nothing was processed Urgent — correct the identified errors and resend immediately to avoid supply chain or cash flow delays

The Most Common 997 Errors and How to Fix Them

  • Segment structure errors. Mismatched segment counts, missing required fields or bad delimiters. Double-check your export mapping rules and confirm segment terminator characters match partner requirements.
  • Invalid data codes. AK4 returns an invalid element code. Update the field lists in your ERP or mapping tool to match the valid code set in the partner's X12 implementation guide.
  • Length violations. "Character length exceeded" errors mean field data isn't being trimmed to spec — AN fields often cap at 30 characters. Confirm outbound mapping respects the X12 limits.
  • Bad qualifiers. Wrong qualifier codes in ISA05/ISA07 or GS fields cause immediate rejection. Centralizing qualifier configuration per partner eliminates the manual-update failure mode.
  • Envelope mismatches. ISA control numbers out of sequence or sender/receiver ID mismatches. Verify ISA13 increments correctly and that ISA05/ISA07 match what the partner expects.

If qualifier errors are your recurring headache, our guide to choosing the right ISA qualifier goes segment-deep on that specific failure mode.

Best Practices to Prevent 997 Rejections

  • Validate before sending. Pre-transmission validation against X12 standards and each partner's spec is the single most effective way to cut rejection rates in high-volume environments.
  • Alert on AK9 E and R in real time. Immediate notifications mean rejections get fixed before the next shipping or billing cycle — not after a partner calls about missing documents.
  • Maintain mapping profiles actively. Partner requirements change, and misaligned maps are the leading cause of rejections that "appear randomly" after months of clean transmissions.
  • Wire EDI alerts into your ERP. Connect rejection alerts to NetSuite, Dynamics or SAP so corrections start without manual log review.
  • Archive 997s for at least seven years. That's the benchmark for audit and compliance readiness — and keep the last 90 days instantly accessible, because that's the window dispute resolution actually uses.

Tired of finding out about rejections from your trading partners instead of your tooling? Let's talk — no demo, no obligation. We've spent more than 25 years reading 997s, and helping teams stop chasing them is the part of the job we like best.

Let's talk 997s

Frequently Asked Questions

What is an EDI 997 Functional Acknowledgment?

An EDI 997 is a standard ANSI X12 transaction set sent by a trading partner or VAN to confirm receipt and structural validity of an EDI document. It checks the technical structure — segments, loops, delimiters and element formats — not business logic or business approval, and it serves as the primary audit trail for EDI transaction integrity.

What is the most important segment to check in a 997?

Start with AK9 for the overall status. If it shows errors (E) or rejection (R), go to AK3 for the specific failing segment and AK4 for the element and error code. That three-segment path resolves most rejections without reading the entire interchange file.

What is the difference between AK9 status A, E, and R?

AK9*A means the document was accepted with no technical errors. AK9*E means it was accepted with errors — some transactions have structural issues to correct. AK9*R means the entire transaction set was rejected, nothing was processed, and the document must be corrected and resent immediately.

Is a 997 the same as business acceptance of an EDI document?

No. The 997 is purely technical validation. A trading partner can still reject a document at the business level — incorrect pricing, unavailable items, policy violations — even after a clean 997. Confirm business acceptance separately through the appropriate business acknowledgment.

What causes the most common 997 rejections?

Improper segment hierarchy, missing required fields, length violations in element data, invalid qualifier codes in ISA or GS segments, and mismatched envelope IDs. Most are preventable with pre-transmission validation and up-to-date partner mapping profiles.

Can you automate 997 rejection handling?

Yes. Modern EDI platforms support rule-based alerts, automated validation and error extraction, so rejections surface in real time and corrections start immediately instead of after a partner reports missing documents. BOLD VAN's portal, for example, monitors 997s across all trading partners from one interface.

How long should you keep EDI 997 acknowledgments?

At least seven years — the benchmark required by most audit teams, regulatory frameworks and industry compliance programs. Make sure recent acknowledgments stay instantly accessible too, since dispute resolution usually needs documents from the last 90 days.


Emily Marshall
Content Manager

Latest articles

Compliance
July 13, 2026

Automotive EDI for SMB Manufacturers: Documents, Compliance, and ERP Handoff Points

Automotive EDI for SMB Manufacturers boosts document accuracy, ensures compliance, and integrates with ERP systems to cut costs and prevent shipment delays.

Compliance
July 13, 2026

EDI 856 ASN Timing Rules: How Late Ship Notices Create Chargeback Risk

EDI 856 ASN Timing Rules cut chargebacks by ensuring automated, real-time shipment notifications, lowering penalties and boosting operational efficiency.

Technology
June 19, 2026

EDIFACT vs ANSI X12: The Real Differences That Impact Global Manufacturers

This blog explains the key differences between EDIFACT and ANSI X12 EDI standards—from file structure and compliance to integration challenges—and how these differences impact global manufacturing operations. It also highlights practical solutions, including dual-standard management with BOLD VAN, to streamline supply chains and control costs.

Achieve more from your EDI VAN provider.