Register an EasyPost webhook endpoint via POST /webhooks and enable event types for tracker.updated events; validate HMAC signatures on all incoming payloads
Parse the tracker object in each webhook payload and read the status field; map statuses such as return_to_sender, failure, and unknown to internal exception categories
Inspect the tracking_details array for the most recent event's message field to extract carrier-provided exception reason codes (e.g., address issue, recipient not home, refused)
Route exceptions to the appropriate handling workflow: address issues trigger an address correction request to the customer, recipient unavailable schedules a redelivery, refused initiates an RMA
Send customer notifications via your preferred channel (email, SMS) with the exception reason and resolution options; include a self-service redelivery or redirect link where the carrier supports it
Log all exceptions to your data warehouse with carrier, service, exception type, and resolution outcome for SLA reporting and carrier performance review
Known gotchas
Carrier exception reason codes are not standardized; the same event (undeliverable address) may be described differently across FedEx, UPS, and USPS payloads, requiring carrier-specific mapping tables
Webhook events can arrive out of order; a delivery_confirmed event may arrive before the exception event it supersedes due to carrier batch processing; use event timestamps rather than arrival order for state transitions
EasyPost may retry webhook delivery on your server's 5xx or timeout responses; ensure your handler is idempotent using the event id field to avoid processing the same exception multiple times
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