All guides

EDI 997 functional acknowledgment: how to read AK segments

An EDI 997 is a receipt. Your trading partner’s system sends it back to say your file arrived, was checked against syntax rules, and was accepted, accepted with errors or rejected. It does not say the order, invoice or ship notice is right. It is transaction set 997 in the X12 standard, and reading it comes down to a handful of AK segments and three status letters.

What is an EDI 997 functional acknowledgment?

Celigo describes it as an X12 transaction that shows a document reached the receiving EDI process and was checked against EDI syntax rules. It says the 997 does not confirm business acceptance. It also differs from an AS2 MDN, which works at the transport level.

SPS Commerce calls it a “digital receipt for delivery information.” It lists causes of errors such as invalid codes, missing mandatory data and mismatched control counters.

Microsoft’s BizTalk documentation adds that, like any X12 transaction set, the 997 travels inside its own GS/GE envelope.

How is a 997 different from an 855?

They answer different questions.

Document Question it answers Who reads it
997 Did the file arrive and is it well formed? Your EDI team or translator
855 Will the supplier fill the order, and with what changes? Customer service

Our EDI 855 guide covers the second one. A purchase order can get an accepted 997 and still be changed or refused later, because the 997 does not check business content.

What do the AK segments mean?

Per Microsoft’s reference, the 997 is built from these segments:

  • AK1 identifies the functional group being acknowledged. AK101 is the group ID (GS01) and AK102 is the group control number.
  • AK2 identifies one transaction set in that group, by its ID (ST01) and control number (ST02).
  • AK3 names a segment with an error and its position in the set.
  • AK4 names the data element with an error inside that segment.
  • AK5 gives the status of one transaction set.
  • AK9 gives the status of the whole group, with counts of sets included, received and accepted.

An AK2 loop holds AK3, AK4 and AK5 when a transaction set has an error. AK1 and AK9 are mandatory. AK2, AK3 and AK4 are optional, and AK5 is required whenever an AK2 loop is present.

Celigo lists the codes that appear in AK501 for a transaction set and AK901 for the group:

  • A: accepted.
  • E: accepted with errors.
  • R: rejected. Celigo says this “typically needs correction and resubmission.”

Microsoft’s documentation notes a system can be set to send AK2 loops for every transaction set or only for rejected ones. That is a setting in one product, so ask your partner how theirs behaves.

What does a rejected 997 look like?

The X12 organization publishes a rejected-transaction example for purchase orders. In it, a sender’s group of three 850s is rejected. Here are three of its segments, with X12’s own explanation:

Segment What X12 says it means
AK3*BZA*35**1 Segment ID BZA at position 35 is unrecognized (syntax error code 1)
AK4*5**5*... The 5th data element of another segment (in the second 850) is too long (data element error code 5)
AK9*R*3*3*0 Group rejected: 3 transactions in the group, 3 received, 0 accepted

The example says the sender is expected to correct the transactions and retransmit. Notice that the AK9 counts tell you how bad it is in one line.

What should you do when a 997 is rejected or missing?

  1. Match it to the original. Use the AK1 group control number and the AK2 transaction control number to find the exact document.
  2. Read AK3 and AK4 first. They tell you which segment and element failed. Check the error code against the X12 code list or your partner’s guide.
  3. Fix the data, then resend. A rejected set usually has to be corrected and sent again.
  4. Do not assume silence means success. Celigo notes that without a 997 “you may not know whether the trading partner’s EDI process received or validated your document.” Causes it lists include transmission failure, partner processing delay, configuration problems and routing issues. It advises integration teams to monitor for missing acknowledgments and follow up per the partner’s SLA.
  5. Watch the clock. SPS Commerce says acknowledging EDI transactions “in a timely manner” helps all trading partners improve order processing efficiency. Ask each partner for their exact window.

A simple weekly count helps: documents sent, 997s received, and rejections by cause.

Frequently asked questions

Does a 997 mean my order was accepted?

No. It means the file arrived and was checked against syntax rules. Business acceptance comes later, for example in an 855.

Who sends the 997?

The receiver of the document. Ask each partner which documents they expect one for.

What if I get an E?

An E means accepted with errors. Read the AK3 and AK4 detail and ask your partner whether it needs a fix.

Is a 997 the same as a 999?

No. The Talend documentation from Qlik says the 997 reports problems at the functional group or transaction set level. The 999 is used for additional implementation specification validation reporting. A TA1 covers problems with the ISA/GS envelope. Ask your partner which one they want.

Where Dockmend fits

Dockmend is being built to help operations teams watch for exceptions and flag them for a person to review, such as an order or shipment notice with no acknowledgment. It is still being built, and we have not announced support for any EDI network or ERP. Join the waitlist

This guide is general information, not legal or compliance advice. EDI details vary by trading partner, version and implementation guide, so check your partner’s before you build or change anything.