214 rejected: AT7 status code without a reason code
The AT7 segment has strict pairing rules. A shipment status code must come with a reason code, an appointment code must come with its own reason code, and the two can't be in the same AT7.
What you see
AK3*AT7*6**8~
AK4*2*1651*2~
AK5*R*5~
Variations: AK4*3*1652*10 (exclusion condition violated: status and appointment in the same AT7), or AK4*1*1650*7*XX (a status code your partner doesn't accept).
What it means
| Rule (AT7, 004010) | In plain English | Typical AK4 code |
|---|---|---|
| P0102 | If AT7-01 (status) is present, AT7-02 (reason) is required, and vice versa | 2, Conditional required data element missing |
| P0304 | If AT7-03 (appointment status) is present, AT7-04 (reason) is required, and vice versa | 2 |
| E0103 | Only one of AT7-01 or AT7-03 may be present | 10, Exclusion condition violated |
| Code lists | AT7-01 must be from element 1650, AT7-02/AT7-04 from 1651, and AT7-03 from 1652. Partners often accept only a subset. | 7, Invalid code value |
Why it happens
- The map sends the reason code only when there's a delay, and leaves it empty for on-time events. On-time events still need one, usually
NS(Normal Status). - An appointment and an arrival are sent in a single AT7.
- A status code is sent that the partner's guide doesn't list (for example, a terminal event code for a truckload partner).
The exact fix
- Always pair AT7-01 with AT7-02. For a normal event, use
NSunless your partner specifies another code. - Send appointments in their own AT7 loop, using AT7-03 and AT7-04 only and leaving AT7-01 and AT7-02 empty.
- Check the partner's 214 guide for the status and reason codes they accept, and map your TMS events to those.
Before and after
AT7*X3****20261021*0815*CT~ AT7*X3*NS*AA*NS*20261021*0815*CT~
AT7*X3*NS***20261021*0815*CT~ AT7***AA*NS*20261022*0900*CT~
X3 = Arrived at Pick-up Location. AA = Pick-up Appointment Date and/or Time. Each AT7 goes in its own AT7 loop. When AT7-03 is used, AT7-05/06 are the appointment's date and time.
Not sure this is your error?
Paste your 997, TA1, rejected file, or the broker's error email into the free EDI Reject Checker. It decodes every AK3/AK4/AK5/AK9 and TA1 code and checks counts, control numbers, and dates in seconds. It runs in your browser, so nothing is uploaded.
Fix reports are paid up front; if we can't find the cause, the refund is automatic.
References
- AT7 Shipment Status Details, 004010 (syntax notes P0102, P0304, E0103)
- Element 1650, Shipment Status Code · 1651, Shipment Status or Appointment Reason Code · 1652, Shipment Appointment Status Code
- Element 723, Data Element Syntax Error Code (2, 7, 10)
- X12, Transaction Sets