1. Pull marketplace orders. From Amazon Seller Central. Order number, ship-to, carrier, promised delivery window, actual ship date.
2. Pull carrier scan events. From FedEx and UPS APIs. Tracking number, scan events, delivery timestamp, exception codes.
3. Match by tracking number. Tie each marketplace order to its carrier record. Surface orders with no scan event for review.
4. Compare promised against actual. Calculate the gap in hours. Flag anything past the promised window as a missed commitment.
5. Categorize the miss. Carrier delay, weather exception, address issue, missing scan, on-time. The flow assigns the category from the scan event codes.
6. Calculate the on-time rate. Per carrier, per service level, per order cohort, per region. Trend versus prior periods.
7. Send the report. Daily exception list for the carrier-management team, weekly scorecard for the operations lead, and a Slack alert when a carrier crosses a threshold.