NextRouteNextRoute

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

FieldDescription
nameAuto-generated (e.g., "North Charleston - 2026-03-24")
dateThe service date
service_zone_idZone this route covers
route_template_idThe master template it was generated from
statusCurrent lifecycle status
driver_idAssigned driver
vehicle_idAssigned vehicle
planned_stops_countTotal stops on the route
completed_stops_countStops marked completed
skipped_stops_countStops marked skipped
optimized_distance_miEstimated distance after optimization
optimized_duration_minEstimated duration after optimization
original_dateIf rescheduled, the original date
reschedule_reasonReason for rescheduling (if applicable)

Route Lifecycle

draft → optimized → dispatched → in_progress → completed

draft

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:

FieldDescription
customer_idThe customer being serviced
property_idThe property address
sequenceOrder within the route
statuspending, en_route, arrived, in_progress, completed, skipped, no_access
skip_categoryIf skipped: no_access, weather, operational, customer_request
skip_reasonFree-text explanation for the skip
photo_urls_jsonBefore/after photos (R2 URLs)
estimated_arrivalCalculated ETA
arrived_atActual arrival timestamp
completed_atCompletion timestamp
travel_time_minTravel time from previous stop

Stop Status Flow

pending → en_route → arrived → in_progress → completed
                                           → skipped
                                           → no_access

How Routes Are Generated

Daily routes are created by the route generation engine, which can run:

  • Automatically via a daily cron job (if auto_generate_routes is enabled)
  • Manually via the dashboard or API

The engine:

  1. Looks at active master route templates
  2. Matches templates to the target date by day of week
  3. Filters template stops by frequency, week parity, and month week
  4. Excludes blackout dates, vacation holds, and service skips
  5. 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_date is preserved
  • The reschedule_reason is recorded (e.g., weather, holiday, no_driver)
  • Stops are moved to the new date's route

See Skip & Reschedule for policies and configuration.