Assign orders to Nearby drivers
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.
HyperTrack's 'Nearby Search' enables you to find nearby drivers based on live location to assign orders. The figure below provides an overview of how the feature works and the guide walks you through how you can implement it:
To learn how to setup your account use the feature, please refer to the guide below.
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.
Use this POST Nearby API request to find available app users near work location.
The POST request contains the following parameters:
orderrepresents 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_typethis indicates the type of Nearby search to be conducted and can be either "region" or "eta";
search_filterfilters 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.
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.