🧰 Assignment Algorithms

Deliverty Hub supports six assignment algorithm types. Choose the one that best fits your fleet size, geography, and operational needs.

Algorithm Overview

Each algorithm type determines how the system selects an agent for a task. The algorithm is configured as part of the assignment configuration and applies to all tasks processed while that configuration is active.

Algorithm Type Summary Best For
manual Dispatcher manually picks the agent Small teams, complex scenarios
nearest Assigns to the closest available agent General use (default)
load-balanced Distributes tasks evenly across agents Fairness, equal workload
predictive ML-based using historical data Optimized ETAs, large fleets
one-by-one Sequential offering with auto-retry Gig-style operations
zone-based Assigns based on geographic zones Regional coverage, territories

Manual

With the manual algorithm, no automatic assignment occurs. Tasks remain in AWAITING_ASSIGNMENT until a dispatcher explicitly selects an agent from the dashboard.

AspectDetails
Algorithm Typemanual
AutomationNone — fully human-driven
Agent SelectionDispatcher picks from a list of all available agents
Retry on RejectionDispatcher must manually reassign
Use CaseSmall teams, tasks requiring special handling, or when algorithmic assignment is not desired
Recommended Starting Point

If you are new to Deliverty Hub or have a small fleet (fewer than 10 agents), start with manual assignment. It gives you full control while you learn the platform.

Nearest

The nearest algorithm assigns the task to the closest available agent based on GPS distance. This is the default algorithm and the simplest automatic option.

AspectDetails
Algorithm Typenearest
Selection CriteriaStraight-line (haversine) distance from agent's current GPS position to the task pickup location
Search RadiusLimited by maxSearchRadiusMeters (configurable, 100 to 100,000 meters)
Tie-BreakingIf multiple agents are equidistant, the agent with fewer active tasks is preferred
RequirementsAgents must have GPS tracking enabled and be sharing their location
Use CaseGeneral-purpose delivery operations where minimizing travel time is the priority

Load-Balanced

The load-balanced algorithm distributes tasks as evenly as possible across all available agents. It prioritizes fairness over proximity.

AspectDetails
Algorithm Typeload-balanced
Selection CriteriaThe agent with the fewest currently active tasks (in ASSIGNED, ACCEPTED, or IN_TRANSIT status)
Search RadiusStill respects maxSearchRadiusMeters — only agents within range are considered
Tie-BreakingWhen agents have equal load, the nearest agent is selected
Use CaseOperations where workload fairness is critical — ensures no single agent is overwhelmed while others are idle
Load Calculation

The "load" is calculated as the count of tasks in ASSIGNED, ACCEPTED, or IN_TRANSIT statuses. Completed and cancelled tasks are not counted.

Predictive

The predictive algorithm uses machine learning models to optimize assignment based on historical performance data, traffic patterns, and estimated time of arrival (ETA).

AspectDetails
Algorithm Typepredictive
Selection CriteriaMulti-factor scoring: historical delivery time, agent performance rating, predicted traffic conditions, and estimated ETA
Data RequirementsRequires sufficient historical data (completed tasks) for the ML model to produce accurate predictions
Search RadiusRespects maxSearchRadiusMeters
Use CaseLarge fleets with extensive delivery history where optimizing delivery time and success rate is the primary goal
Data Requirements

The predictive algorithm requires a meaningful volume of historical task data to produce accurate results. For new organizations with limited history, consider using nearest or load-balanced until sufficient data has accumulated.

One-by-One

The one-by-one algorithm offers the task to agents sequentially, one at a time, with automatic retry if an agent rejects or does not respond within the timeout period.

AspectDetails
Algorithm Typeone-by-one
Selection CriteriaAgents are ranked (typically by distance), then offered the task one at a time in order
Retry BehaviorIf the current agent rejects or times out, the task is automatically offered to the next agent in the queue
Search RadiusRespects maxSearchRadiusMeters
ReferenceUS001 — Sequential Assignment with Auto-Retry
Use CaseGig-economy style operations, ride-hailing patterns, or when you want agents to explicitly opt in to each task
Sequential Flow

Unlike other algorithms that select a single "best" agent, one-by-one builds an ordered queue. Agent #1 gets the first offer. If they decline, Agent #2 gets it automatically — no dispatcher intervention needed. This continues until an agent accepts or the queue is exhausted.

Zone-Based

The zone-based algorithm assigns tasks based on predefined geographic zones (delivery territories). Each agent is assigned to one or more zones, and tasks are routed to agents whose zone covers the task's pickup or delivery location.

AspectDetails
Algorithm Typezone-based
Selection CriteriaThe task's location is matched against geographic zone boundaries; only agents assigned to the matching zone are considered
Within-Zone SelectionAmong agents in the matched zone, the nearest or least-loaded agent is selected (configurable)
PrerequisitesZones must be defined and agents must be assigned to zones (see Tracking & Zones)
Use CaseOperations with defined delivery territories, regional teams, or franchise-style setups where agents should only handle tasks in their area

Algorithm Comparison

Feature manual nearest load-balanced predictive one-by-one zone-based
Automatic
Uses GPS
Considers Load Tie-break ✓ Primary Configurable
ML/Historical Data
Requires Zones
Auto-Retry ✓ Built-in
Complexity Low Low Medium High Medium Medium

Configuration Fields

Every assignment configuration uses the following fields, regardless of the algorithm type. These are configured through the dashboard or API.

Field Type Required Description
name String Yes A human-readable name for this configuration (e.g., "Default Nearest", "Downtown Zone Config")
algorithmType Enum Yes One of: manual, nearest, load-balanced, predictive, one-by-one, zone-based
enabled Boolean Yes Whether automatic assignment is enabled for this configuration
isActive Boolean Yes Whether this is the currently active configuration (only one per organization)
maxSearchRadiusMeters Number No Maximum distance (in meters) to search for eligible agents. Range: 100 to 100,000. Default: 10000
config JSON No Algorithm-specific configuration options as a JSON object. Contents vary by algorithm type.
Search Radius Constraints

The maxSearchRadiusMeters field accepts values between 100 meters (minimum) and 100,000 meters (100 km, maximum). Setting a very large radius may include agents that are impractically far away. For urban operations, 5,000-15,000 meters is typically effective.

Choosing the Right Algorithm

I have a small team (fewer than 10 agents)

Start with manual or nearest. Manual gives you full control; nearest provides simple automation with minimal configuration.

I want fair workload distribution

Use load-balanced. It ensures no single agent gets overwhelmed while others sit idle. Within the search radius, the agent with the fewest active tasks is always picked first.

I have a large fleet and historical data

Consider predictive. It uses ML models trained on your historical task data to predict the best agent based on ETA, traffic, and past performance. Requires sufficient data to be effective.

I want agents to accept/decline individually

Use one-by-one. Tasks are offered sequentially — if an agent declines, the next closest agent gets the offer automatically. This is ideal for gig-economy style operations.

My agents cover specific geographic areas

Use zone-based. Define delivery zones on the map, assign agents to zones, and the system will only consider agents whose zone covers the task location.

Next Steps