Skip to main content
Delivery exceptions — delays, failed attempts, damaged goods, customs holds — are inevitable in logistics. The problem is not that they happen; it is that they go undetected until a customer calls to complain. By then, the window for mitigation has closed. Wayak connects your TMS and carrier APIs, scans for exceptions on a schedule, and alerts your operations team and customers before problems escalate. The agent classifies each exception, estimates the impact, and recommends a specific action — escalate, reroute, notify, or hold.

What you need

Data sources

  • TMS database — Shipment records with origin, destination, carrier, service level, planned delivery date, and current status
  • Carrier tracking APIs — Real-time tracking events with timestamps, location, status codes, and exception codes

Knowledge spaces

  • SLA documents — Service-level agreements by carrier and service type with penalty thresholds and escalation procedures
  • Exception handling procedures — Internal runbooks for each exception type: who to contact, what to do, and how to communicate to customers
Semantic layer: Define these in your ontology before setting up the agent.
ComponentNameDefinition
ObjectShipmentMaps to the TMS shipments table. Represents a package or freight movement from origin to destination
ObjectCarrierMaps to the carrier master table. Represents a logistics provider with their SLAs and performance history
MetricOnTimeRatePercentage of shipments delivered on or before the planned delivery date
MetricExceptionRateNumber of shipments with at least one exception divided by total shipments, expressed as a percentage
DimensionExceptionTypeCategorization: carrier delay, address issue, customs hold, weather disruption, capacity shortage, damaged in transit
See building a semantic layer for a step-by-step guide.

Agent setup

1

Create the agent

Go to Agent SpaceNew agent.
FieldValue
NameShipment Tracker
RoleShipment visibility and exception specialist
GoalKeep stakeholders informed and catch delays before they impact customers
2

Set the description

You track shipments across carriers and flag exceptions. When reporting status, lead with the headline: on-time, delayed, or at-risk. For delays, always include the cause, the revised ETA, and the impact on downstream commitments. Use a factual, calm tone — even when reporting problems. Proactively suggest mitigation options: reroute, expedite, notify customer, or escalate to carrier. Never minimize the severity of a delay.
3

Scope data access

Grant access to:
  • TMS database (shipments, delivery status, carrier assignments)
  • Carrier tracking APIs (real-time tracking events)
  • SLA documents knowledge space
  • Exception handling procedures knowledge space
  • Shipment, Carrier objects and OnTimeRate, ExceptionRate metrics
4

Add skills

Trigger: Scheduled scan or user request
  1. Pull all active shipments from the TMS with a planned delivery date within the next 48 hours or a status of delayed/failed.
  2. Query carrier tracking APIs for the latest tracking event on each shipment.
  3. Classify each exception by type: carrier delay, address issue, customs hold, weather disruption, capacity shortage, or damaged in transit.
  4. For each exception, calculate: hours past due (or hours at risk), estimated revenue impact, and SLA penalty exposure.
  5. Group exceptions by type and carrier.
  6. Recommend an action for each group: escalate to carrier, notify customer, reroute to alternate carrier, or hold for resolution.
  7. Output a summary table with shipment ID, origin, destination, carrier, original ETA, revised ETA, exception type, and recommended action.
Trigger: User asks about a specific tracking number or shipment ID
  1. Retrieve the shipment record from the TMS including origin, destination, carrier, service level, and planned delivery date.
  2. Query the carrier tracking API for the full event history.
  3. Determine the current status: in transit (on-time), in transit (at-risk), delayed, delivered, or exception.
  4. If delayed or at-risk, identify the cause from the latest exception code and estimate the revised ETA.
  5. Present the full timeline of tracking events with a status summary and next steps.

Automation

Playbook: Daily exception scan

1

Set the trigger

Schedule: Three times daily at 7:00 AM, 12:00 PM, and 5:00 PM to catch exceptions during each phase of the delivery day.
2

Build the workflow

  1. Query the TMS for all in-transit shipments and shipments due for delivery within the next 24 hours.
  2. Loop through each shipment:
    • Query the carrier tracking API for the latest event.
    • Compare the current location and timestamp against the expected delivery timeline.
    • If the shipment is behind schedule by more than 2 hours, flag it as at-risk.
    • If the shipment has an exception code, classify it and look up the SLA penalty threshold.
  3. Condition: If at-risk shipments exceed 5% of today’s deliveries, escalate the report to the logistics director in addition to the standard recipients.
  4. Aggregate results into two groups: exceptions requiring immediate action and at-risk shipments to monitor.
3

Configure delivery

Send a Slack message to #shipment-exceptions with the exception count and top-priority items. Send an email to the operations team with the full report. For critical exceptions (SLA breach imminent), send a direct Slack message to the account manager for the affected customer.
4

Test and activate

Click Run now to test with live data, then toggle to Active.

What’s next

Carrier benchmarking

Use exception data to benchmark carrier performance and make smarter allocation decisions.

All logistics use cases

See the full list.