Los Pollos Hermanos Logistics

A loaded truck breaks down. What happens next?

The shipment exception desk uses n8n to compare recovery options and bring decisions to dispatch.

  1. Restaurant The order is loaded and scanned.
  2. Breakdown The truck stops mid-route.
  3. Client The promised date still stands.

Demo scope Loaded-truck breakdowns run end to end on simulated records. Delivery discrepancies and customer claims use sample cases.

The business and where n8n helps

Los Pollos Hermanos Logistics distributes food and supplies from its restaurant network to clients.

Who runs a delivery

  • Fleet Manages vehicles and maintenance.
  • Dispatch Assigns trucks, tracks delivery commitments, and handles disruptions.
  • Management Sets spending limits and decides which actions need approval.

Three ways to recover a shipment

  • Wait for the repair

    The same truck finishes the run once it's fixed.

  • Divert an empty truck

    A truck that's already out takes over the load.

  • Send a replacement

    Another truck sets out to collect the load.

Each option comes with a cost and an estimated delivery time. Dispatch weighs the expense against the customer's deadline.

What the desk reads

Order records
Quantities and promised dates
Fleet GPS
Truck locations
Maintenance records
Repair estimates
Loading and delivery scans
Evidence of what moved

A carrier could supply these from its existing dispatch, fleet, warehouse, and proof-of-delivery systems.

The n8n flow chart

Dispatch opens a case and n8n recommends an action. A valid action within the spending limit goes ahead. Anything else goes to a dispatcher.

What happens after a truck breaks down?
  1. Dispatch Opens a case
  2. Webhook 1 sends the case and available actions
  3. n8n Screens the report and reviews a recommendation
  4. Dispatch Rechecks the recommendation Against current availability and cost.
    • Valid and within the limit

      Dispatch Applies the action The first n8n run logs the outcome.
    • Needs a person

      Dispatcher Chooses an action Dispatch saves the decision. Webhook 2 starts a new run if n8n received the case.
  5. n8n Records the outcome it receives If there's a delivery estimate, n8n prepares and screens an email.
    • Pass Send the email
    • Flag or check failure Hold and log

What's a webhook?

An address one system calls when an event happens. Both webhooks are authenticated.

pollos-shipment-case
Dispatch sends the report, case ID, and available actions to n8n.
pollos-case-answered
Dispatch reports the dispatcher's choice.

When a dispatcher takes over

  • The inbound guardrail blocks the report
  • The recommendation fails review
  • The action exceeds the spending limit or is unavailable
  • n8n can't respond

Why use a second webhook?

The dispatcher decides on their own time.

  • Dispatch saves the choice first
  • The same case ID updates the original n8n log
  • Dispatch makes up to ten attempts to notify n8n
  • The saved decision takes effect even if the notification fails

Why the workflow is built this way

A truck can become unavailable while a case is open. So n8n advises, and dispatch decides.

Dispatch owns the decision

n8n
  • Recommends an action
  • Logs the recommendation and the outcome it receives
Dispatch
  • Supplies the priced options
  • Checks availability and spending authority again
  • Applies the action

Each model has a defined job

  • Gemini 4 Hydrogen Coordinates the case and checks the specialist's recommendation against the records.
  • Gemini 3.5 Flash-Lite Handles narrower tasks, such as extracting shipment details and comparing offered actions, at lower token rates.
  • SubQ Snap 1.2 Scores incoming reports and outgoing notices for policy violations. It charges for input only.
  • JavaScript Validates action IDs and fills email templates.

The demo sends screened notices to a test inbox.

Google API pricingSubQ model pricing

A pilot can start with breakdowns

  1. Connect existing records Orders, GPS, maintenance, and scans.
  2. Keep a dispatcher on every case Dispatchers act on every recommendation.
  3. Measure Time to decision, and how often dispatchers choose a different action.
  4. Set a limit for automatic actions Use the results to choose which actions dispatch can apply.

In the demo A Cloudflare Worker and D1 stand in for dispatch and its database.