Reference·X12 999·AK9
X12 999 Reference

X12 999 AK9 Segment Guide: Fields, Format, and Testing Gotchas

Jul 27, 2026 · 6 min read

A 999 that comes back with AK901 equal to A tells you almost nothing on its own — the real verdict on whether every transaction set inside the functional group actually made it through is sitting in the three counts right next to it, and most parsers only read the first field.

Quick answer

AK9 is the Functional Group Response Trailer in an X12 999 — it closes out the acknowledgment for an entire functional group with an overall accept/reject code plus counts of how many transaction sets were included, received, and accepted.

The elements that actually matter in practice

AK901 →
Functional Group Acknowledge Code — the single-letter verdict for the whole group — A, E, R, or P
AK902
Number of Transaction Sets Included — how many ST/SE transaction sets the sender says were in the group
AK903
Number of Received Transaction Sets — how many the receiver actually counted on their end
AK904
Number of Accepted Transaction Sets — how many of those received sets passed validation individually

Example

Synthetic example Generated by Synthibase
AK9*A*1*1*1

A synthetic single-transaction functional group that was fully accepted — one set included, one received, one accepted. Synthetic test data.

Where this trips people up

Teams frequently write reconciliation logic that keys off AK901 alone and treats an E or A code as "we're done, move on." That misses the case where AK902 and AK903 disagree — the sender claims three transaction sets went out, the receiver only counted two — which points to a truncated file or a transmission problem the acknowledge code itself will never surface, because AK901 is scored against what arrived, not against what was supposed to arrive.

EDI 999 vs 997: What's the Difference and Why It Matters
X12 GS and ST Segments Explained: Functional Group and Transaction Headers
Test 999 reconciliation, not just the happy path
Synthibase generates synthetic 999 acknowledgments with matched and deliberately mismatched AK902/AK903/AK904 counts, so functional-group reconciliation logic gets exercised against transmission gaps before a real file goes missing in production.
Start free trial →
This page is written independently by Synthibase for testing and informational purposes. It is not an official publication of HL7 International or X12/Washington Publishing Company, and is not a substitute for reviewing the official standard or your trading partner's companion guide. See our Terms of Service for full legal terms.