The 997 Functional Acknowledgement Explained

The 997 Functional Acknowledgement Explained


The 997 - Revealed and Simplified - by Christopher E. Cancilla

First off, what is a 997? A 997 is a document returned by a trading partner to your company that allows you to know if the Purchase Order (for example) that you transmitted a moment ago was good, and accepted by their translator. It does not tell you if the PO will be fulfilled, there are other documents that can tell you that, but if there was an error, say the PO number is missing, the 997 will tell you this information

 What makes up the 997?

As you can see above, there are essentially 6 segments; the AK1 AK2 AK3 AK4 AK5 – and the AK9. I consider the most important segment to be the AK9, more on this later.

If your trading partner returns a 997, you need to retain these documents somewhere, like in a folder near where the original document is being stored. Yes, you do need to store all these documents for a time period, check with your legal department for more on this.

Let’s discuss each segment starting at the AK1 (since the ST in this example has nothing to do with the document you sent).

THE AK1:

This is the Functional Group Response Header, and tells you not only the document that you sent, but also the GS control number of the original document.

               AK1*PO*000002234~


THE AK2:

This is the Transaction Set Response Header and it is the exact same information as the AK1, but for the ST segment of the document that you transmitted.

               AK2*850*2234~


THE AK3:

This is the Segment Data Note and contains data on the actual segment in question or in error actually. 

In the example below it is saying the error is located in the PO1 segment which is the 11th segment in the document (not including the ISA and GS) and is contained in the PO1 loop. This tells you the error code of the actual error (see codes below).

               AK3*PO1*11*PO1*8~

  1. Unrecognized segment ID
  2. Unexpected segment
  3. Mandatory segment missing
  4. Loop Occurs Over Maximum Times
  5. Segment Exceeds Maximum Use
  6. Segment Not in Defined Transaction Set
  7. Segment Not in Proper Sequence
  8. Segment Has Data Element Errors


THE AK4:

This is the Data Element Note and contains data on the actual element in error. 

Let’s break this one down:

AK4*3*355*2*0050946930114~

AK401 = 3, this is the element number position in segment

AK402 = 355, every element has an ID; identifies type of element in error.

AK403 = 2, Data Element Syntax Error Code

AK404 = 8675309, this element contains a copy of the bad data


      AK403 Error Codes

  1. Mandatory data element missing
  2. Conditional required 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
  11. Too Many Repetitions
  12. Too Many Components


THE AK5:

This is the Transaction Set Response Trailer and will tell you if it was accepted.

               AK5*A~   or     AK5*E*5~

1      Transaction Set Not Supported

2      Transaction Set Trailer Missing

3      Transaction Set Control Number in Header and Trailer Do Not Match

4      Number of Included Segments Does Not Match Actual Count

5      One or More Segments in Error

6      Missing or Invalid Transaction Set Identifier

7      Missing or Invalid Transaction Set Control Number

8      Authentication Key Name Unknown

9      Encryption Key Name Unknown

10    Requested Service (Authentication or Encrypted) Not Available

11    Unknown Security Recipient

12    Incorrect Message Length (Encryption Only)

13    Message Authentication Code Failed

15    Unknown Security Originator

16    Syntax Error in Decrypted Text

17    Security Not Supported

18    Transaction Set not in Functional Group

19    Invalid Transaction Set Implementation Convention Reference

23    Transaction Set Control Number Not Unique in the Functional Group

24    S3E Security End Segment Missing for S3S Security Start Segment

25    S3S Security Start Segment Missing for S3E Security End Segment

26    S4E Security End Segment Missing for S4S Security Start Segment

27    S4S Security Start

A         Accepted

E         Accepted But Errors Were Noted

M        Rejected, Message Authentication Code (MAC) Failed

R         Rejected

W        Rejected, Assurance Failed Validity Tests

X         Rejected, Content After Decryption Could Not Be Analyzed

               AK501 Codes                                                                                      AK502 Codes













THE AK9:


This is the Functional Group Response Trailer and tells you what happened at the trading partner’s translator.


AK9*A*1*1*1~      or      AK5*R*1*1*0~


AK901 = Acknowledgment Status for Group Received (same codes as the AK501 above)

AK902 = 1, Number of Transactions (ST loops) Included within Group being Acknowledged

AK903 = 1, Number of Received Transactions (ST loops) in Group being Acknowledged

AK904 = 1, Number of Accepted Transactions (ST loops) in Group being Acknowledged


All-In-All, the 997 gives you a lot of information. Sadly, some trading partners do not return the AK3 and AK4 segments and others simply do not return a 997 at all. If you are the customer, you can demand a 997 from your supplier, and you should. This way if you place an order and you never receive it because they do not return a 997, it would be your fault for not verifying the shipment is good, is being processed, and will be shipped. If they sent a 997 with errors, you can correct and resend the same day and lose no time in the order.

A great of explanation and it's more visible and crystal clear

Theresa Doris

Agile Coach | SAFe? SPC6 | Digital Transformation Lead | Jira Align | Jira restructuring | APO | Atlassian Consultant

7 年

This is so true, in healthcare X12n this is mandated, and I believe it should be for all X12 transactions. Great information!

Pankaj Tiwari

Data Engineer || Snowflake Certified || Python || Oracle Argus Safety Certified Specialist || Axway B2Bi || Pharmacovigilance || SQL/PLSQL || AWS Cloud Certified || Teradata || Microsoft Power BI || Tableau

7 年

Thanks Christopher ..its really helpful..

Chris Cancilla

Published Author || EDI B2B Support || Former USAF E-5 (SSgt) <461x0 AMMO & 324x0 PMEL> || Licensed Amateur Radio Operator (W4CEC) / Volunteer Examiner Team Lead - LaurelVEC - W4CECVET

7 年

I added a PDF that encompasses the ISA... GS... ST..... and he 997. let me know what you all think of it.

回复

要查看或添加评论,请登录

Chris Cancilla的更多文章

社区洞察

其他会员也浏览了