80% of the success of delivery service depends on the Distance Matrix API. The other 20% of success is based on powerful software that analyzes data returned from the API. After the Distance Matrix API by Google doubled in price in 2018, its users began to look for a cheaper solution that was just as effective as the previous one.
966.ua tasked us with a way to determine the best routes for its couriers and optimize the company's business processes. Every month more than 500 000 requests have to be returned with data geolocation and the fastest routes between points. Thanks to the optimization of queries and a solution that was specifically customized to meet a business model of the suppliers, the Distance Matrix and 966.ua worked together to reduce delivery times by 25%.
Here is how we solved the problem and reached those numbers.
There are four main ways for 966.ua customer to order food: by phone 996, via a chat-bot, the company's website or a mobile version of the site.
Considering a variety of existing communications modes, one of the main functionalities the company required was geocoding.
Geocoding converts addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739) which can be used to place markers on a map. Reverse geocoding is the process of converting geographic coordinates into an address understandable for people.
This feature helps to optimize 966's business processes, especially when taking orders over the phone. the only thing that an operator needs to do is to enter the address once. The geocoding service converts it into coordinates. The system can directly send information to the Distance Matrix, calculate the distance from the kitchen to the client, and determine how long it will take to deliver the food.
Due to the fact that there are several kitchens in the city, 966.ua had to calculate the best routes for its couriers in seconds in order to deliver food to its customers on time.
As the company had used Google API before, therefore it was easy to migrate to the Distance Matrix. Our solution's syntax for requests is similar to Google's. The only thing that needs to be done is to change the domain and access token. It takes less than one day to migrate because there is no need to rewrite any code.
The main customers were mobile users which represented about 70% of all online users. They wanted to know how long it would take for the delivery to reach their address. After implementing the new API, 966.ua decided to show their clients exact information when the courier arrived with their order. On both mobile and desktop versions of the website, every user now enter an address and see the delivery time right away.
The company shows users the time in minutes. This includes time for food preparation, packing, and how long the courier will spend on the way.
The Distance Matrix API helps accurately calculate the delivery time, taking into account traffic jams and the fastest routes for the nearest kitchen and courier.
As a result, we managed to reduce – by 5 times, compared to the Google Distance Matrix API – 966.ua's cost of calculating delivery times.
After 966.ua changed some of its business processes, it managed to reduce its delivery times by 25%. Every request sent by the Distance Matrix API is 5 to 7 times cheaper than sending it via the Google API. This helps the company save costs on delivery time calculation and deliver high-quality services to their clients on time. Overall, 966.ua managed to reduce its delivery costs by 60%. It also became possible to send more requests to the API to refine the algorithms for calculating distance and time.
We carry out continuous work to calculate route durations and constantly supplement the database with new data.