Your organization must enable route optimization to use this feature.
Note: Your organization can also opt to auto-create Route Plans using Route Optimization.
First, click here to confirm all necessary setup has been completed before choosing to optimize tasks.
Watch this quick video to get you started with the basics of our powerful route optimization tool.
Select Tasks to Optimize
To begin, multi-select tasks you would like to optimize from the Unassigned section of the sidebar. You can use standard selection behavior including ⇧ Shift and Ctrl (⌘ Cmd or ⌘ Cmd + A in Apple) to select your tasks.
Currently, a maximum of 2000 tasks can be considered in a single optimization request. Note: To avoid delayed task flags and ensure accurate ETAs, ensure that all tasks selected for optimization are scheduled for the same day. Mixing tasks across multiple dates can lead to discrepancies in the system.
Note: If you use Linked Tasks, the paired pickup/dropoff tasks must be included in the same optimization run. A single optimization run can include a mix of paired and non-paired tasks.
Then, right-click and select optimize tasks...
Choose Scheduled or On-Demand Optimization
In the Route Optimization window, first choose how you want to optimize:
Scheduled: Plans a full day of routes from scratch. This is the standard route optimization covered in the sections below.
On demand: Adds new tasks into routes that are already in progress, for example a same-day order that arrives after your drivers have left. See On-Demand Route Optimization below.
Note: The On demand option is available to organizations on the Scale and Enterprise plans that use the V3 route optimization engine. If you don't see it in the Route Optimization window, contact your Customer Success Manager.
Configure Optimization Options
There are 3 Optimization Types:
Service Area: If one or more Route Zones are configured. Routes will be assigned to drivers, but can be reassigned before the route has been started.
Drivers: Select drivers by team or individually. Routes can be reassigned before the route has been started.
Vehicles: Select vehicle type(s) for Route Optimization. Routes are assigned to a team and can be assigned to drivers at the start of driver shifts.
Service Area Optimization
Date: Choose a date to optimize. By default, your current dashboard filter date will be used. If your routes cross a day boundary, the date shown will be the first day in the route.
Service area: Choose the route zone service area to be optimized.
Service Time: A global setting for the expected minutes a driver may spend at each pickup/dropoff destination in the route. This global value will not overwrite any service times set for individual tasks.
Max allowed delay per task: Maximum amount of minutes a task can be delayed based on the Estimated Time of Arrival.
Finally, choose between three optimization modes:
Always arrive on time: Routes are created which strictly adhere to a task's Complete After and Complete Before times. Tasks that cannot be added to a route without violating times will not be included in the returned route solution. You will need to re-optimize or assign these tasks to a driver manually. Note that there may be other solutions with shorter drive time, but this mode strictly adheres to the delivery window limitations.
Balance driving time and arrival times: Routes are created balancing the other two options. This mode doesn't necessarily return the route with the shortest drive time and does not guarantee that every task completes without violations in your delivery window, but both factors were taken into consideration in the optimization.
Minimize drive time: Routes are created which minimize the total number of miles driven by your workers. This will reduce the overall cost to complete the route, however, it allows for violations in your Complete Before and Complete After windows.
Drivers Optimization Type Settings
Date: Choose a date to optimize. By default, your current dashboard filter date will be used. If your routes cross a day boundary, the date shown will be the first day in the route.
Timezone: Timezone defaults to the dispatcher's current timezone. Dispatchers can edit the timezone for the Route Optimization by selecting the drop-down option for the timezone located beside "Date".
Drivers: Select one or more drivers for whom to create routes. If drivers have individual schedules, they will be used in the routing solution. If individual schedules have not been defined, the driver will be considered using the default schedule (when enabled). To avoid inflated route times caused by overly broad default schedules (e.g., 12:00 AM–11:59 PM), set a realistic schedule window for drivers before optimizing routes. Updated schedule settings will be remembered in your browser for future optimizations. If you wish to update a driver's schedule before optimization, click the pencil icon and adjust it in the resulting window (see Update Driver Schedule).
Note: a maximum of 100 drivers can be selected for a single optimization.
Next, specify maximum number of tasks per route (which sets an upper limit to the number of tasks assigned to each driver)
Service Time: A global setting for the expected minutes a driver may spend at each pickup/dropoff destination in the route. This global value will not overwrite any service times set for individual tasks.
Max allowed delay per task: Maximum amount of minutes a task can be delayed based on the Estimated Time of Arrival.
Next, define the start from and end at points of the route. The following options are available:
Driver's Location (formerly "Anywhere")
Team's hub
Specific hub (pending availability to the dispatcher running the optimization)
Note: A route cannot both start 'Anywhere' and end 'Anywhere'. These options will influence the shape of the resulting optimized routes that are generated. To start from 'hub' and end at 'another hub', at least 2 hubs are required for the dispatcher operating the optimization. Additionally, if you do not want the return-to-hub travel time included in the route overview totals, ensure the route end point is set appropriately. For API users, explicitly set the routeEnd parameter to null to end the route at the final task instead of returning to the hub. Setting routeEnd to null ensures the route ends at the last task assigned to the driver, which is the safest and most supported approach for both vehicles and on-demand modes. Alternatively, omitting routeEnd entirely will cause Onfleet to use the driver's current location as the final destination. Avoid using workers://ROUTING_ADDRESS in vehicle contexts, as it is not a supported setting and may cause errors unless all workers have routing addresses configured.
Finally, choose between three optimization modes:
Always arrive on time: Routes are created which strictly adhere to a task's Complete After and Complete Before times. Tasks that cannot be added to a route without violating times will not be included in the returned route solution. You will need to re-optimize or assign these tasks to a driver manually. Note that there may be other solutions with shorter drive time, but this mode strictly adheres to the delivery window limitations.
Balance driving time and arrival times: Routes are created balancing the other two options. This mode doesn't necessarily return the route with the shortest drive time and does not guarantee that every task completes without violations in your delivery window, but both factors were taken into consideration in the optimization.
Minimize drive time: Routes are created which minimize the total number of miles driven by your workers. This will reduce the overall cost to complete the route, however, it allows for violations in your Complete Before and Complete After windows.
When you are finished configuring your optimization options, click Proceed.
Vehicles Optimization Type Settings
Date: Choose a date to optimize. By default, your current dashboard filter date will be used. If your routes cross a day boundary, the date shown will be the first day in the route.
Timezone: Timezone defaults to the dispatcher's current timezone. Dispatchers can edit the timezone for the Route Optimization by selecting the drop-down option for the timezone located beside "Date".
Start time: Required setting to indicate the planned start time of the route. Tasks will be assigned after the starting time.
End time: Optional setting to indicate the planned end time for the route. Tasks will not be assigned after the ending time.
Next, define the start from and end at points of the route. The following options are available:
Driver’s Location (formerly ‘Anywhere’)
Team's hub
Specific Hub Another team's hub (pending availability to the dispatcher running the optimization) Note: For API users, avoid using
workers://ROUTING_ADDRESSin vehicle contexts, as it is not a supported setting and may cause errors unless all workers have routing addresses configured. Instead, explicitly set or omit therouteEndparameter as appropriate for your use case.
Assigned team: Optional, but recommended. Select the team where these routes will be assigned. Routes should be assigned to available drivers from the dashboard.
Next, select the vehicle(s) type to be routed during the optimization.
The supported vehicle type options are: Walking, Bicycle, Morotocycle, Car, and Truck.
Note: Standard routing allows for one vehicle type to be selected per route optimization (e.g. Trucks may be routed in one optimization and Motorcycles routed in a separate optimization). Advanced routing, with the v3 Engine, allows for selecting multiple vehicle types per route optimization (e.g. Trucks and Motorcycles may be routed in the same optimization).
Per vehicle type, following can be specified:
Number of routed vehicles (required)
Maximum number of tasks per route (which sets an upper limit to the number of tasks assigned to each driver)
Capacity (which sets the capacity limit of the vehicle and will be compared to the task quantity field during route optimization)
Service Time: A global setting for the expected minutes a driver may spend at each pickup/dropoff destination in the route. This global value will not overwrite any service times set for individual tasks.
Max allowed delay per task: Maximum amount of minutes a task can be delayed based on the Estimated Time of Arrival.
Finally, choose between three optimization modes:
Always arrive on time: Routes are created which strictly adhere to a task's Complete After and Complete Before times. Tasks that cannot be added to a route without violating times will not be included in the returned route solution. You will need to re-optimize or assign these tasks to a driver manually. Note that there may be other solutions with shorter drive time, but this mode strictly adheres to the delivery window limitations.
Balance driving time and arrival times: Routes are created balancing the other two options. This mode doesn't necessarily return the route with the shortest drive time and does not guarantee that every task completes without violations in your delivery window, but both factors were taken into consideration in the optimization.
Minimize drive time: Routes are created which minimize the total number of miles driven by your workers. This will reduce the overall cost to complete the route, however, it allows for violations in your Complete Before and Complete After windows.
When you are finished configuring your optimization options, click Proceed.
Completing Route Optimization and Assigning Drivers
If there are no errors, the routes will be optimized across your selected area, drivers or vehicles. This might take some time, depending on the number of tasks you are optimizing.
Once the optimization has been completed you will be able to view a summary of the route that includes:
Total tasks assigned.
A total number of tasks.
Total distance of the routes.
Total time on duty for each route Note: The total time on duty may include return-to-hub travel time if the route is configured to end at a hub. For a more precise duration, use the
estimatedCompletionTimeon the final task.
If you would like to retry the optimization, select "Edit Optimization Selection" to return to the Route Optimization modal and make changes.
Once the route optimization is completed, if optimization type was by Service Area or Drivers, tasks are automatically assigned to the Drivers. If the optimization type was by Vehicles, tasks are assigned to routes on the selected team (or in the Global Unassigned container). These tasks should be assigned to drivers report for work.
If your drivers had assigned tasks before the optimization, the newly optimized tasks will be considered against the previously existing route.
The completion date of the route is considered when the tasks are added to a driver. For example, if your team optimizes routes for future dates, the tasks are assigned based on the completion date and not the day of optimization.
Note: Assigning tasks across multiple dates for a single driver can lead to delayed task flags and inaccurate ETAs. To avoid this, ensure tasks are scheduled for the same day.
On-Demand Route Optimization
On-Demand Route Optimization (formerly known as Auto-Dispatch) handles tasks that come in after your routes are already on the road, such as a same-day rush order. Instead of a dispatcher manually deciding which driver has room, Onfleet evaluates every active route and assigns each new task to the route that can complete it with the least disruption, while keeping existing stops within their delivery windows. That route is then re-optimized so the plan stays efficient.
How It Works
For each new task, Onfleet uses AI to evaluate the impact of inserting it into every route in progress. It weighs each driver's location, current route sequence, traffic, delivery windows, and service times before choosing a route.
Tasks already assigned to a driver stay with that driver. The new task is added to the route and the route is resequenced around it.
Requirements
Plan and engine: Available on the Scale and Enterprise plans using the V3 route optimization engine. New Scale and Enterprise organizations are set up on V3 by default. Existing organizations not yet on V3 can request the move through their Customer Success Manager.
Drivers on duty: On-demand optimization assigns tasks into active routes, so the drivers you are optimizing for must be on duty.
Run an On-Demand Optimization
Select the tasks you want to optimize from the Unassigned section of the sidebar, then right-click and select Optimize tasks.
In the Route Optimization window, choose On demand as the optimization type.
Review the available settings and click Proceed. Settings that do not apply to on-demand optimization are hidden.
When the optimization is complete, the dispatcher sees a confirmation of the tasks that were optimized, and drivers see the new tasks added to their task list in the Onfleet driver app.
When Tasks Cannot Be Assigned
If no active route can absorb some or all of the selected tasks, the dispatcher receives a pop-up indicating which tasks were not assigned. These tasks remain unassigned so you can assign them manually or optimize them again.
Task Limits
Each on-demand optimization request can include up to 6,000 tasks. In practice, the limit is usually lower: it is the combined task capacity of the selected on-duty drivers, minus the tasks they are already assigned. If the selected tasks exceed that capacity, the request is rejected.
Example: You have 10 on-duty drivers, each with a Max Tasks Per Route of 50 and 5 tasks already assigned. Together they can take up to 450 more tasks, so an on-demand optimization of 450 tasks or fewer can proceed.
Route Load Tasks
On-demand optimization works with organizations that use Route Load Tasks. Because drivers are already on the road, on-demand optimizations do not create a Route Load task. Scheduled optimizations continue to create Route Load tasks as before.
Route Plans
If your organization has the setting to create a Route Plan after optimization enabled, on-demand optimization does not always create a new Route Plan:
If an on-duty driver already has a Route Plan for today (Pending or In Progress), the new tasks are added to that plan. This applies whether the plan was created manually or by an earlier optimization.
If the driver has no Route Plan for today, a new one is created.
If the driver's active Route Plan is for a different date, a new Route Plan is created for today and the pending tasks from the older plan are moved to it.
On-Demand Route Optimization vs. Auto-Assignment
Auto-Assignment sends a task to the closest driver or the shortest route. It does not use the optimization engine, does not evaluate all active routes to find the best fit, and does not re-optimize the route after the task is added. On-Demand Route Optimization does all three. Auto-Assignment is available to all organizations, while On-Demand Route Optimization is available on the Scale and Enterprise plans using the V3 engine.
API and CSV Support
On-demand optimization is also available through the Onfleet API. See Initialize Route Optimization (On-Demand) in our API documentation. Tasks imported by CSV can be optimized on demand like any other task.
Predictive ETA
Predictive ETA is generated for optimized tasks, even if the driver is off-duty at the time of optimization. The Predictive ETA will use an offline driver's schedule to determine the time to start the route or if routes were optimized by vehicle, the selected start time will be used for the Predictive ETA.
Note: Cross-day task assignments can cause discrepancies in Predictive ETAs, as the system assumes all tasks for a driver are scheduled for the same day. Ensure tasks are assigned for a single day to maintain accurate ETAs.
If you are finding that no Predictive ETA is being generated for your optimized tasks, then it may be due to the following conditions all being met:
The worker's scheduled start time for the day has already passed.
The worker is not on duty at the time of optimization.
The optimized tasks are scheduled to be completed the same day you have run the optimization.
Older, pending tasks from a previous date are still assigned to the driver.
The driver's schedule window is overly broad (e.g., 12:00 AM–11:59 PM), leading to inflated route times. Adjust the schedule to reflect realistic working hours before optimization.
Error and Warning Handling
If there are errors and/or warnings discovered after configuration, you may fix them in-line by clicking on the Fix button to the right of each remark.
Errors must all be corrected before proceeding. Warnings should be reviewed, but will not block you from proceeding.
