Physical hierarchy and ownership

How to Read an EDI 997 Functional Acknowledgment

Follow acknowledgment evidence from ST through SE while keeping group and transaction status separate.

Start at ST and require exact ST01=997. Detection does not infer 997 from AK segments, filenames, or acknowledgment wording. Resolve the release, then follow source order and physical ownership.

Read the physical hierarchy

  1. ST opens the 997 transaction set and carries its control number.
  2. AK1 identifies the functional group being acknowledged.
  3. AK2 begins transaction-set acknowledgment context.
  4. AK3 records a segment error under that AK2; child AK4 occurrences record element error detail.
  5. AK5 closes the AK2 context with transaction-set acknowledgment status and optional syntax codes.
  6. AK9 reports functional-group acknowledgment status, lexical counts, and optional group syntax codes.
  7. SE closes the transaction set.

Understand the two canonical row types

Every physical AK2 creates one TRANSACTION_ACK row. When a bounded 997 has no AK2, it creates exactly one GROUP_SUMMARY fallback row so AK1 and AK9 evidence remains visible. AK3 and AK4 do not become independent rows: SegmentError occurrences contain nested ElementError occurrences as compact JSON strings.

Keep AK5 and AK9 meanings separate

AK5 describes transaction-set acknowledgment status. AK9 describes functional-group acknowledgment status and preserves included, received, and accepted counts exactly as source-reported lexical strings. Those AK9 counts are not arithmetically reconciled to physical AK2 occurrences.

A synthetic transaction-set example

ST*997*0001*005010~
AK1*PO*000000001*005010~
AK2*850*0001*005010~
AK5*A~
AK9*A*1*1*1~
SE*6*0001~

This example is synthetic and non-sensitive. It illustrates structure only; the A codes remain X12 acknowledgment evidence and do not establish a separate business outcome.

Trace an acknowledgment in the parser

Use the EDI 997 field reference, 997 validation guide, conversion guide, or browser-local EDI Parser. Compare the separate 999 grammar only when the release and implementation context call for it.