Skip to content

Route Optimizer

Menu Location: Delivery > Route Optimizer

Last Updated: 2026-08-28


Overview

The Route Optimizer works out a better stop order for your delivery routes. Pick a week and a route, click Optimize, and the routing engine sequences the stops to reduce driving time, then writes the new stop numbers and estimated arrival times back to the route. You can fine-tune the result by hand: drag stops in the sidebar list, click a pin to change an order's route or stop number, or draw around a group of pins to move them to another route in bulk.

The optimizer uses a pluggable routing engine. OpenRouteService and Mapbox Optimization v2 are the engines wired up today, each needing a free key from its provider; GraphHopper and Routific are listed as coming soon. This feature is completely separate from the legacy Routific integration. It does not change your routing method and does not touch the older Routific pages.

Primary Features

Pick a week, day, and route

Three dropdowns control what you see. The Week selector lists recent weeks. The Day selector filters to one delivery day or "All days". The Route selector lists the routes that have orders in the chosen week; pick one to optimize it, or leave it on "-- all routes / whole day --" to see the day as a color-coded overview.

Optimize a route

With a route selected, click Optimize (N stops). The engine builds the stop sequence starting from the route's start address (or the default depot), using the route's vehicle capacity, shift start/end, and per-stop service time, then saves the new order and estimated arrivals. The map shows the route with the depot marked "S" and each stop numbered.

Whole-day color map

Pick a day without choosing a route and the map shows every route for that day at once, one color per route, so you can see how the day spreads across routes and spot imbalances.

Depot and timing settings

Each route has a "Depot & timing settings" panel:

  • Start (depot) address: where the driver leaves from.
  • End address (optional): blank means end at the last stop.
  • Vehicle capacity (boxes): each order counts as 1 box. 0 means no limit, which defaults to 100. Orders over capacity come back as "not served".
  • Shift start: when the driver leaves the depot; drives the arrival times (for example, 7:00am).
  • Shift end (optional): latest the driver can be out; blank means start plus 12 hours.
  • Service time per stop (minutes): how long each delivery takes, added to travel time (default 1).

Default depot address

Set once in Settings; any route without its own start address starts from here. It is geocoded as soon as you save. A checkbox in the same panel resets all routes' start/end addresses to blank so every route uses this default depot.

Manual adjustments

  • Drag and drop: drag stops up or down in a route's sidebar list to reorder them, then click Save new order. Reordering also brings up a "Save & reload map" overlay.
  • Click a pin: the map popup shows the order, its address, a Change Route dropdown, a Change Stop number box, and a link to open the order.
  • Lasso bulk-move: click Select area to bulk-move, drag on the map to draw around pins, choose a target route, and click Move orders. The moved orders are renumbered onto the target route and each customer's subscription route is updated too.
  • Click a sidebar stop to center the map on it.

Unserved orders

If the optimizer cannot serve an order (missing coordinates, over capacity, or unreachable), it lists the order and highlights it red on the map.

Reset (Kiva admins only)

Reset clears all stop numbers and estimated arrivals for the route so it can be optimized again from scratch. The button only shows for Kiva admin users.

Engine and settings modal

  • Routing Engine: OpenRouteService and Mapbox Optimization v2 are live; GraphHopper and Routific are stubs for later.
  • OpenRouteService API key: free key from openrouteservice.org. The free tier caps optimization jobs at about 3 vehicles.
  • Mapbox Access Token: your token from account.mapbox.com. No special scope is needed, but your account must first be granted Optimization v2 beta access (see the Mapbox setup guide). Billed per request, free up to 100,000/month.
  • Mapbox max vehicles per job: default 12. v2 takes a whole day's fleet in one request, so no pre-clustering is needed.
  • GraphHopper API key: not wired up yet.
  • OpenRoute routing profile: driving-car, driving-hgv, or cycling-regular.
  • Speed factor: scales the profile's road speeds. 1.0 is normal; below 1 is slower (for heavy traffic), above 1 is faster. It affects travel time and estimated arrivals, not distance.
  • Default vehicles (day mode) and OpenRoute max vehicles per job: day-mode fleet sizing; larger fleets are grouped into sub-jobs of the max size (free tier = 3).

Common Use Cases

  • Optimize a route's stop order before printing labels.
  • View a whole delivery day by route to spot overlap, gaps, or unbalanced loads.
  • Move a customer's order to a different route from the map.
  • Reorder stops by hand to use the driver's local knowledge.
  • Point every route at one default depot so they all start from the same warehouse.

Troubleshooting

  • A warning says "No OpenRouteService API key set": get a free key at openrouteservice.org and add it under Settings.
  • A warning says "No Mapbox access token set": your account needs Optimization v2 beta access and a token. Follow the Mapbox setup guide, then paste the token under Settings.
  • "Could not geocode the start address": the route's start address (or the default depot address) could not be located; check it and save again.
  • "No depot to start from": set the route's start address, or set a Default depot address in Settings.
  • Orders come back as "not served": the order is missing usable coordinates, or the route is over vehicle capacity. Fix the address or move orders to another route.
  • The Reset button is not visible: it is Kiva-admin-only.

Recent Updates

  • 2026-08-27: New page. Added the pluggable Route Optimizer with OpenRouteService as the first live engine: per-route stop-order optimization, whole-day color-coded map, click-pin route/stop edits, drag-and-drop and lasso bulk-move, default-depot geocoding, and per-call logging of every routing-engine request.
  • 2026-08-28: Mapbox Optimization v2 added as a second live routing engine, with its own access token and max-vehicles settings and a step-by-step setup guide.