
You sent the invoice on time. The 997 came back accepted. Then, a day or two later, an 824 shows up with a TR code, or an 864 arrives with three lines of text that start with "INVOICE REJECTED." Until you fix and resend, that invoice isn't in the retailer's payment queue, and the clock on your payment terms may not be running.
The 824 and 864 are how trading partners tell you something in a document didn't pass their business rules. They're easy to ignore because they often land in a mailbox nobody checks. This guide explains what each one means, how to read them, the errors behind most rejections, and a simple workflow for clearing them before they turn into aged deductions.
997 vs 824 vs 864: which response means what
There are three layers of response, and each one checks something different. A document can pass the first and fail the second.
Response | What it checks | Structured? | What "rejected" means |
|---|---|---|---|
Syntax: is this valid X12 with the right segments and envelope? | Yes | The file couldn't be read. Usually a mapping or envelope problem, such as a wrong ISA ID | |
Business rules: does the data make sense in the partner's system? | Yes, with coded errors | The file was readable, but something in it failed validation, like an unknown PO number or a price mismatch | |
Anything the partner wants to say in plain text | No, free form | Depends on the message. Some partners use it for rejections, others for notices and spec changes |
The common trap is treating an accepted 997 as proof the document went through. It only tells you the partner could parse it. Whether they can use it shows up in the 824 or 864, if they send one. Not every partner sends either, which is why tracking payment status matters too.
For documents that already have a specific response, partners use that instead of an 824. A PO gets an 855 acknowledgment, for example. The 824 covers documents like the 810 invoice, 856 ASN, and 832 catalog that have no dedicated reply.
How to read an EDI 824
An 824 tells you three things: which document it's about, whether that document was accepted, and what was wrong with it. Here's an illustrative 824 rejecting an invoice. Codes and layouts vary by partner, so treat this as a reading guide.
Segment | What to look at |
|---|---|
BGN | The 824's own reference and date. Log it so you can cite it if you call the partner. |
OTI01 | The result. TA means accepted, TE means accepted with errors, TR means rejected. |
OTI02 and OTI03 | What's being reported on. Here IV and INV10045 point to invoice number INV10045. |
OTI08 and OTI09 | The group and transaction set control numbers of your original file, which let you find the exact transmission. |
OTI10 | The document type, here 810. |
REF | Extra references, often the PO number. |
TED | The error. TED01 is a code and TED02 is a description. Many partners publish their own list of codes and meanings in their 824 guide. |
TE deserves attention even though the document went through. Partners use it for warnings that may become rejections later, so a pattern of TE responses is an early sign of a mapping issue.
CVS is a good example of a partner that leans on the 824. Its 824 extended validation guide, updated in February 2026, lays out how it reports validation results. If you sell to CVS, read it alongside your 810 and 856 guides.
How to read an EDI 864
The 864 is a text message that travels through your EDI channel. It has a short header and then lines of free text, so a person has to read it. Here's an illustrative example:
BMG opens the message and states its purpose. MIT starts each message and gives it a subject. MSG carries the text, one line per segment. Some partners also use MTX for longer text.
Retailers send 864s for two broad reasons. Some use them as their rejection report, listing failed invoices or ASNs with a reason in plain words. Others use them for announcements: a new routing guide, a changed vendor number, a spec change taking effect next month. Both kinds need a reader. A spec change notice that sits unread is how your next batch of documents starts failing.
Because the 864 isn't coded, your EDI system can't act on it automatically. The practical fix is routing: send every inbound 864 to a monitored inbox or ticket queue, tagged with the partner name, so someone reads it the same day.
The most common rejection causes and how to fix them
Most 824 and 864 rejections trace back to a short list of causes. The fix usually belongs in your ERP data or your map, so correcting the one document and resending it only clears today's error.
Error you see | Likely cause | Where to fix it |
|---|---|---|
PO number not found | Invoice references a PO that was changed, cancelled, or keyed wrong | Pull the PO number from the inbound 850 automatically; check for 860 changes before invoicing |
Unit price does not match | Invoice cost differs from the PO or the partner's cost file | Align your 832 catalog and ERP price list; send cost changes with effective dates |
Quantity exceeds received | Invoiced more units than the DC received | Invoice from shipped quantities, and make sure the ASN went first and matched the shipment |
Invalid ship-to or DC | Wrong store or DC code, or a missing GLN | Map N1 locations from the PO, never from a default |
Duplicate invoice number | Resent an invoice without changing the number, or a retry ran twice | Follow the partner's rule for corrected invoices; some want a new number, others the same one with a new date |
Invalid allowance or charge | SAC codes the partner doesn't accept, such as an unapproved freight or tariff line | Check the partner guide; our 810 tariff charges guide walks through one case |
ASN rejected for carton data | Missing or wrong SSCC labels, or pack hierarchy that doesn't match what shipped | Build the ASN from scan data; see our guide to better ASNs |
ASN rejections cost more than invoice rejections at many retailers, because a bad or late ASN can trigger a compliance fine on top of the delay. Walmart's SQEP program is the best-known example.
A simple workflow for handling rejections
The goal is to clear each rejection within the partner's resubmission window and to stop seeing the same error twice. This sequence works for most teams.
Route every inbound 824 and 864 to one place. A shared inbox or ticket queue, with the partner and document type in the subject line.
Match it to the original document. Use OTI03 and the control numbers in OTI08 and OTI09 to find the exact invoice or ASN. For an 864, search by the PO or invoice number in the text.
Triage by money and deadline. Rejected invoices delay cash, and rejected ASNs can draw fines. Work those before warnings and notices.
Fix the source, then resend. Correct the ERP record or the map first, then regenerate the document. Editing the outbound file directly fixes one document and leaves the cause in place.
Log the root cause. A running tally by partner and error type shows you which maps or master data need work. Over a quarter, it also tells you whether your chargeback rate is improving.
Confirm acceptance. Watch for the 997 and, where the partner sends one, a TA on the follow-up 824.
If rejections keep coming back from several partners, the problem is usually in how EDI connects to your ERP. Our pieces on EDI and ERP integration and the warning signs it's time for full-service EDI are good next reads. You can also reach our team through support.
EDI 824 and 864 FAQ
What is an EDI 864 used for?
The 864 Text Message sends free-form text between trading partners through the EDI channel. Retailers use it for rejection reports, announcements, and spec changes that have no structured document of their own.
What is an EDI 824 Application Advice?
The 824 reports whether a document passed the receiver's business rules. It identifies the original document, gives a result of accepted, accepted with errors, or rejected, and lists coded errors.
What is the difference between a 997 and an 824?
A 997 confirms the file was valid X12 and could be read. An 824 confirms whether the data inside it was usable. A document can get an accepted 997 and still be rejected on an 824.
What do TA, TE, and TR mean on an 824?
They're the result codes in OTI01. TA is accepted, TE is accepted with errors, and TR is rejected.
Do I have to respond to an 864?
The 864 doesn't need an EDI reply beyond the usual 997. If it reports a rejection, you respond by fixing the data and resending the original document.
Can an 864 be automated?
Only partly. You can route it automatically and pull out PO or invoice numbers by pattern, but the free text is written for a person. Partners that want automated handling usually send an 824 instead.
Does every retailer send 824s?
No. Some send 824s, some send 864s, some send both, and some only report problems through a portal or by email. The partner's EDI requirements will say which ones to expect. Our trading partner directory is a good starting point for checking requirements.
More articles
Our platform is designed to empower businesses of all sizes to work smarter and achieve their goals with confidence.



