The EDI 997 Functional Acknowledgment is a technical receipt confirming that an EDI interchange was received and whether it passed structural validation. Every trading partner relationship requires 997 tracking.
AK1
Functional Group Response Header — transaction set identifier, group control number
AK2
Transaction Set Response Header — transaction set ID, control number
AK3
Data Segment Note — segment ID and position where error occurred
AK4
Data Element Note — specific element position and error code
AK5
Transaction Set Response Trailer — acceptance/rejection code (A, E, R)
997 must be sent within the SLA agreed in your trading partner agreement (commonly 24 hours). AK5 code "A" = accepted, "E" = accepted with errors, "R" = rejected.
The most important part of a 997 is AK5A01. Code R (rejected) with AK3/AK4 detail tells you exactly which segment and element failed — use x12port's validator to decode these automatically.