Skip to main content

Assign orders to Nearby drivers

Introduction

Live location is an important input to any on-demand dispatch, assignment and routing system.

On-demand work may be assigned to drivers that are out and about fulfilling other work, or are physically distributed in a region. Assignment systems use a number of factors to allocate work to a driver. Knowing the live location of available drivers, and ranking them as nearest first from the first point of fulfillment (pickup, visit, delivery or gig location), becomes a critical input to dispatch systems.

In the world of scheduled deliveries with fixed route plans, it is usual to have exceptions on the field (urgent orders, priority work, unexpected mishaps) where routes need to be dynamically modified and new work added to routes on the fly.

Driver availability

To ensure your drivers are included in Nearby Search results they need to be made available as described here. If you have already completed this step proceed to the next step.

To help with on-demand assignment use cases, HyperTrack provides Nearby API. Nearby search locates drivers, figures out which ones are nearest to the order destination, and returns them as a sorted list with nearest first. The API supports two types of searches:

a) Region-based nearby searches: which returns nearest drivers sorted by Haversine distance from the order destination. This is generally used to find potential candidate drivers closest to an order destination.

b) ETA-based nearby searches: which returns the nearest drivers to an order destination by drive-time using live traffic data. This is generally used to find a highly targeted list of drivers sorted on actual drive times in order to assign an order and know when the driver is likely to actually arrive at the destination.

Nearby Dashboard

Use this POST Nearby API request to find available app users near work location.

POST   https://v3.api.hypertrack.com/nearby

The POST request contains the following parameters:

  • order represents the order for which the search is being conducted. The order object includes the order destination and optional parameters like the order_id & any metadata;
  • search_type this indicates the type of Nearby search to be conducted and can be either "region" or "eta";
  • search_filter filters nearby search results by app users with matching. You can use this parameter to provide different types of filters such as a maximum search radius, driver profile based filters, specific driver lists, etc;

Sample Nearby payloads for the different types of searches are provided in the documentation.

Please review working code examples written in different languages to copy and re-use to make requests via Nearby API.

As always, please reach out to us if you would like support in any other programming language you would like to use.

Questions?

If you would like help with on dispatch work use cases using live location, questions or comments on any of the topics above, please do not hesitate to contact us.