Skip to main content

Event Triggers

When auto-dispatch is enabled, the system automatically responds to activity lifecycle events — no manual intervention needed. This page explains what triggers a dispatch cycle and how the system reacts.

What Triggers Dispatch

EventWhat Happens
Ticket created (To Do, no assignee)Ticket is enqueued and a dispatch cycle runs
Ticket completed (status → closed)Shuttle position updated, capacity freed, linked successor enqueued if eligible, dispatch cycle runs
Ticket started (To Do → In-Progress)Ticket removed from dispatch queue (no longer eligible)
Ticket deletedTicket removed from queue, shuttle capacity freed, linked successor enqueued if eligible
Shuttle goes on-dutyDispatch cycle runs (new shuttle available)
Shuttle goes off-dutyUnstarted (To Do) tickets re-queued, in-progress tickets stay, dispatch cycle runs
Manual reassignmentOld shuttle's count decremented, new shuttle's count incremented, ticket removed from queue
Dispatch disabledQueue purged, all queued and unassignable flags cleared, no further auto-dispatch activity
Dispatch re-enabledQueue rebuilt by scanning current activities, urgency scores recomputed, dispatch cycle runs
Dispatch settings savedDispatch cycle runs immediately so new weights/limits apply to queued items (already-assigned tickets unaffected)

Ticket Creation

When a new ticket is created with status To Do and no assignee:

  1. The system checks if the ticket is blocked by a linked predecessor
  2. If not blocked, the ticket is added to the dispatch queue with a computed urgency score
  3. A dispatch cycle runs immediately to try to assign it

Not enqueued:

  • Tickets created with status inprogress, problem, or closed
  • Tickets created with an assignee already set
  • Tickets whose linked predecessor is not yet closed

Ticket Completion

When a ticket is closed:

  1. The assigned shuttle's position is updated to the ticket's destination coordinates
  2. The shuttle's active ticket count is decremented (freeing capacity)
  3. If the ticket has a linked successor that is To Do, unassigned, and not blocked, the successor is automatically enqueued
  4. A dispatch cycle runs — the freed shuttle and any newly enqueued successor are considered

Off-Duty Behavior

When a shuttle goes off-duty:

  • To Do tickets are unassigned, their dispatch status set to "queued", and they are re-enqueued for other shuttles
  • In-progress tickets remain assigned — the shuttle should complete work they've already started or release tickets back to To Do
  • A shuttle_status_change event is published with a summary of re-queued tickets

Linked Move Unblocking

Linked moves are automatically handled by the dispatch system:

  1. Predecessor ticket closes → system checks the successor
  2. If successor is To Do, has no assignee, and has no other unclosed predecessor → successor is enqueued
  3. Dispatch cycle runs to assign the successor

This means a chain like A → B → C will be dispatched incrementally: A is assigned first, then B becomes eligible when A closes, then C when B closes.

Where to See Queue Health

The Dispatch Queue panel on the Dispatch screen is the canonical view for tickets that haven't been assigned yet. Rows are returned sorted by priority (most urgent first) and hovering shows the 0–100 priority score — see Seeing the Priority Score. You don't need to watch for "no match" notifications — anything sitting in the queue is, by definition, waiting for an eligible shuttle.