EDI documents

EDI 997: the functional acknowledgment, explained for apparel brands

An EDI 997 confirms that an EDI document arrived and could be read. It says nothing about whether the order, ship notice or invoice inside it was right, and that gap is where a lot of trading partner confusion starts.

What is an EDI 997?

The EDI 997 is the X12 functional acknowledgment. The receiving system sends it back, usually automatically, to say a group of EDI documents arrived and passed syntax checks, or to report which ones had errors.

Both sides send them. When you receive an 850, your system sends a 997. When you send an 856 or an 810, the retailer's system sends one back to you. A missing or rejected 997 is the earliest warning that a document didn't land.

What a 997 does and doesn't confirm

An 856 with the wrong cartons in it still gets an accepted 997 if it's formatted correctly. Business errors come back later, as an 824 application advice, a portal message or a chargeback.

How a 997 is structured

A 997 answers one functional group, the GS to GE envelope that bundles documents of the same type. It reports on the group as a whole and, when something's wrong, on each transaction set inside it.

SegmentNameWhat it tells you
AK1Functional group response headerWhich group is being acknowledged: its functional ID (PO for 850s, SH for 856s, IN for 810s) and group control number
AK2Transaction set response headerWhich document: the transaction set ID, such as 856, and its control number
AK3Data segment noteWhich segment had an error, and where it sits in the document
AK4Data element noteWhich element in that segment had an error, and what kind
AK5Transaction set response trailerAccept or reject code for that one document
AK9Functional group response trailerAccept or reject code for the whole group, with counts of documents received and accepted

Nobody sends a 997 for a 997. Functional acknowledgments aren't acknowledged, or the two systems would answer each other forever.

AK5 and AK9 acknowledgment codes

AK5 gives the verdict for each document, and AK9 gives it for the group. They share most codes.

CodeX12 meaningUsed in
AAcceptedAK5 and AK9
EAccepted, but errors were notedAK5 and AK9
PPartially accepted, at least one transaction set was rejectedAK9 only
RRejectedAK5 and AK9
M, W, XRejected for security reasons: message authentication failed, assurance failed, or content couldn't be decryptedAK5 and AK9

What to do when a 997 comes back rejected

Step 1

Find the document

AK2 gives the transaction set ID and control number, so you know exactly which 856 or 810 failed.

Step 2

Read AK3 and AK4

They point to the segment and element, and the error code says whether a value was missing, too long, an invalid code or a bad date.

Step 3

Fix the data or the map

A bad element is usually a blank in your system, like a missing UPC or store number, or a map built for a different version than the retailer uses.

Step 4

Resend and check the new 997

The retailer treats a rejected document as never received. Resend it with new control numbers and make sure the next 997 comes back accepted.

Watch the clock while you do it. A rejected 856 that gets fixed and resent after the goods arrive is still a late ASN.

When the 997 never comes back

No 997 at all is its own problem. It usually means the file never reached the retailer: a VAN or AS2 connection issue, a wrong receiver ID, or a file the retailer's system couldn't open. Most EDI software can flag documents that haven't been acknowledged within a set time. Turn that alert on and check it every day during ship season.

Frequently asked questions

Does an accepted 997 mean the retailer accepted my order or invoice?

No. It means the document arrived and was formatted correctly. Business problems show up later, through an 824, the vendor portal or a deduction.

Who sends the 997?

The receiver. You send 997s for the 850s and 860s you get, and retailers send 997s for your 855s, 856s and 810s.

How fast should a 997 come back?

Most systems generate them automatically within minutes. Retailer guides set a deadline for the 997s you send, and 24 hours is a common one.

What's the difference between a 997 and a 999?

The 999 implementation acknowledgment also checks a document against its implementation guide, not just X12 syntax. It's standard in US healthcare EDI. Retail trading partners almost always use the 997.

Related guides

EDI 856 advance ship notice

The document where a rejected 997 hurts most, because timing is scored.

Read the guide
EDI 810 invoice

How the invoice reconciles against the order and the ship notice, and why it short-pays when it doesn't.

Read the guide
EDI transaction codes list

Every X12 document an apparel brand is likely to see, what it does and who sends it.

See the list
How to choose an EDI provider

Built-in EDI or a third-party provider, what retailers require, and what it really costs.

Read the guide

Rejected 997s piling up?

We trace rejections back to the map or the missing data behind them and set up alerts so a failed 856 gets fixed before the goods arrive.

Book a call