Receive the EDI 214 (Transportation Carrier Shipment Status Message) from the carrier via AS2, SFTP, or VAT/EDI network; parse the ISA/GS envelope to identify the sender and interchange control number.
Extract the B10 segment for the shipment identifier (PRO/BOL number, shipment ID), then iterate over AT7 segments which carry the status code, date, time, and reason code.
Map the AT7 status and reason codes to your internal unified tracking state machine — carrier-specific code lists vary, so maintain a carrier-keyed lookup table rather than hardcoding values.
Upsert the status event into your tracking store keyed on (shipment_id, event_timestamp, status_code) to ensure idempotency; the same 214 may be retransmitted.
Emit downstream events (order management update, customer notification trigger) only after deduplication and sequence validation — compare incoming event timestamp to the latest stored event to prevent out-of-order status regression.
Send an EDI 997 functional acknowledgment back to the carrier within the agreed interchange SLA to confirm receipt and prevent retransmission storms.
Known gotchas
AT7 status codes are not standardized across carriers — the same physical event (e.g., out for delivery) has different codes on different carriers; maintain per-carrier mapping tables and test with real interchange samples.
Carriers sometimes retransmit a full batch of 214s (including previously received events) after a system outage; an idempotent upsert strategy is essential to avoid duplicate notifications to customers.
Time zones in AT7 are expressed as a qualifier (e.g., ET, LT, UT) that must be normalized to UTC before storage — failing to do so causes phantom out-of-order events at timezone boundaries.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp