What is a 997 and what does it mean?

  • 0
  • 1
  • Article
  • Updated 4 years ago


A 997 is known as a Functional Acknowledgement document which serves as an electronic receipt of a document transmission. Often times you'll see 997s with the following informational segments and elements from SPS Commerce:

AK1 - Group Acknowledgement (Refers to GS segment)

AK2 - Document Acknowledgement (Refers to ST segment)

AK3 - Reports Errors in a
specific segment

                -01: Segment in Error

                -02: Line in error from ST

AK4 - Reports Errors in specific element

                -01: Lists the Element in error

                -02: Lists the ID in EDI dictionary of the element

                -03: Code giving a general reason for the error

                                                -1: Mandatory data element missing

                                                -2: Conditional data element missing

                                                -3: Too many data elements

                                                -4: Data element too short

                                                -5: Data element too long

                                                -6: Invalid character in data element

                                                -7: Invalid code value

                                                -8: Invalid date

                                                -9: Invalid time

                                                -10: Exclusion condition violated

                -04: Shows the bad data

AK5 - Type of acknowledgement

                -01: Lists the Acknowledgement Status

                                                -A: Accepted

                                                -E: Accepted with Errors noted

                                                -M: Rejected; message authentication

                                                -P: Partially accepted

                                                -R: Rejected

                                                -W: Rejected

                                                -X: Rejected

                -02: Transaction set syntax Error Code

                                                -1: Transaction set not supported

                                                -2: Transaction set trailer missing

                                                -3: Transaction control #'s don't match

                                                -4: Number of segments don't match count

                                                -5: One or more segments in error

                                                -6: Missing transaction set identifier

                                                -7: Missing or invalid transaction set control #

                                                -16: Syntax Error

                                                -23: Transaction set control # not unique

AK9 - Group Response


Please Note: If a 997 does not include the AK3 and AK4, SPS will likely refer you back to the Trading Partner as we will not have enough information.
Photo of FAQ

FAQ, SPS FAQ

  • 9,340 Points 5k badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of Stephanie Conley

Stephanie Conley, Alum

  • 1,602 Points 1k badge 2x thumb
Recently we've seen issues relating to confusion of receiving an accepted 997 but also receiving error notifications pertaining to the same document. The documents that you sent go through a two stage mapping process. 997 documents are generated after a document has passed the first stage. The first stage is EDI syntax validation and the second stage is Retailer Mapping validation. If the error occurs in the second validation, then a automated email is sent to the sender of the document notifying them of the error. 

In the case of these documents, they passed our EDI syntax mapping, a 997 documents was generated, but then did not pass our Retailer mapping validation. Since it did not pass the Retailer mapping, you were notified the sender via email of the errors.

Please post below with any questions!