Daily Routes
How daily routes are generated from master templates and progress through the draft-to-completed lifecycle.
Daily Routes
A daily route is a concrete, date-specific route that drivers execute. Daily routes are generated from master route templates and contain the actual stops to be completed on a given day.
Route Fields
| Field | Description |
|---|---|
name | Auto-generated (e.g., "North Charleston - 2026-03-24") |
date | The service date |
service_zone_id | Zone this route covers |
route_template_id | The master template it was generated from |
status | Current lifecycle status |
driver_id | Assigned driver |
vehicle_id | Assigned vehicle |
planned_stops_count | Total stops on the route |
completed_stops_count | Stops marked completed |
skipped_stops_count | Stops marked skipped |
optimized_distance_mi | Estimated distance after optimization |
optimized_duration_min | Estimated duration after optimization |
original_date | If rescheduled, the original date |
reschedule_reason | Reason for rescheduling (if applicable) |
Route Lifecycle
draft → optimized → dispatched → in_progress → completeddraft
The route has been generated but is not yet visible to drivers. You can:
- Add or remove stops
- Change the driver or vehicle assignment
- Optimize stop order
- Delete the route entirely
optimized
The stop sequence has been optimized for shortest travel distance. The route is still editable.
dispatched
The route has been sent to the assigned driver. A push notification is delivered to the driver's mobile app. The route appears in their route list.
in_progress
The driver has tapped Start Route in the mobile app. GPS tracking begins, and stops are completed in sequence.
completed
All stops have been completed or skipped. The route is locked and becomes part of historical records used for billing and analytics.
Stop Fields
Each route contains stops — individual service visits:
| Field | Description |
|---|---|
customer_id | The customer being serviced |
property_id | The property address |
sequence | Order within the route |
status | pending, en_route, arrived, in_progress, completed, skipped, no_access |
skip_category | If skipped: no_access, weather, operational, customer_request |
skip_reason | Free-text explanation for the skip |
photo_urls_json | Before/after photos (R2 URLs) |
estimated_arrival | Calculated ETA |
arrived_at | Actual arrival timestamp |
completed_at | Completion timestamp |
travel_time_min | Travel time from previous stop |
Stop Status Flow
pending → en_route → arrived → in_progress → completed
→ skipped
→ no_accessHow Routes Are Generated
Daily routes are created by the route generation engine, which can run:
- Automatically via a daily cron job (if
auto_generate_routesis enabled) - Manually via the dashboard or API
The engine:
- Looks at active master route templates
- Matches templates to the target date by day of week
- Filters template stops by frequency, week parity, and month week
- Excludes blackout dates, vacation holds, and service skips
- Creates a draft route with the matching stops
See Route Generation for the full details.
Rescheduled Routes
A route can be rescheduled to a different date. When rescheduled:
- The
original_dateis preserved - The
reschedule_reasonis recorded (e.g.,weather,holiday,no_driver) - Stops are moved to the new date's route
See Skip & Reschedule for policies and configuration.
Related
- Master Routes — the templates that generate daily routes
- Dispatching — sending routes to drivers
- Route Generation — the generation engine