Auto Reach: An Application of Real-time Machine Learning at Getir

Ertuğ Odabaşı
Getir
Published in
5 min readFeb 25, 2021

At Getir, couriers knock on thousands of doors every day to deliver happiness in the form of both groceries and hot food, fulfilling our customers’ needs and desires. Each delivery is its own story and contain meaningful moments in this delivery process.

One of these moments is the moment products arrive to the customer, which we call the reach date. Before auto reach, couriers used to update their status as ‘arrived’, manually when they got to your door. When couriers would update their status as arrived, a notification was sent to you. This date was stored as the reach date for further analysis. This manual process was open to human errors which led to both misinformed customers and misguided data. Furthermore, it consumed the couriers’ time. As a result, we wanted to make this process automatic. To make this process fully automated; we decided to create a machine learning model that learns from the location data of couriers and customers, making a prediction of whether a courier has reached the customer or not. In this article, I will describe the steps of this journey.

Steps:

  1. Major stakeholders
  2. Why do we need auto reach?
  3. How did we build it?
  4. What are the results?

Major Stakeholders

One of the most important things while building an AI is understanding who is affected by the predictions and actions made by the AI, and how. There are three major stakeholders: couriers, customers, and the system.

Getir couriers are mostly male and in their 20s, much like me! This persona is naturally likely to forget a manual process like changing status as reached when making dozens of deliveries a day. Why do something manual anyway if it can be avoided, right? Fortunately, our couriers are always eager to adapt to changes in our system.

Our customers have a more standard gender distribution, and represent a greater range in age. They all have a rush in their daily big city life. They want to know when a courier gets to their home because they want to be ready to answer the door.

The system is basically a combination of a great deal of software and data warehouses, which operate Getir’s services and store all the data of the delivery processes. Like all the business units at Getir, our Operations Team also consists of data-oriented people. Everyday they make data-oriented decisions based on past deliveries, optimize subsequent deliveries. It is so crucial to the have correct data-points in the system.

3These awesome notifications, on this rather pink homescreen.

Need for Auto Reach

Because of updating the courier status manually, a lot of problems (used to) emerge. First of all, it was a waste of time. The courier had to stop, take out her/his device, and press a button every time the status needs to be updated. It is a real hustle for the courier. Arguably quite challenging in colder weathers (we’re looking at you London).

Secondly, it is prone to human error. The courier may just decide to press all buttons at once (reached & delivered), or she/he may just forget to press any. We are humans after all, imperfect yet awesome. Since Getir notifies the user when the courier has reached, and when the order is delivered, updating the order status at an inappropriate time creates a bad user experience.

Besides, at Getir, always say that ‘speed is our currency,’ so we should act accordingly. This means that we have to track and monitor how much time it takes to deliver an order. Many metrics go into this greater metric, and lots of decisions are made based on time spent on an order.

How did we build it?

The simplest and the most intuitive solution to understand whether the courier has reached the delivery address would be to measure the distance between the courier and the delivery address. If it is less than a predefined threshold, we could decide that the courier has reached.

However, analyzing the data showed us that this was not a feasible solution. There are two main reasons for this. The first reason is that the courier may not know the exact location of the address, therefore he/she may be around the address, searching for it. Secondly, GPS technology is not extremely accurate all the time, so it can make mistakes. Thanks satellites! Hence, we cannot be sure that as soon as the distance between the courier and the delivery address is less than a value, the courier has reached. Because of these reasons, a rule-based static model was not feasible. That is where machine learning comes into play.

Machine learning models do not need to be given predefined rules but are trained with data that contains the correct answers. For the given problem, we know when the courier changed the status to reached, so we have the correct answers. The machine learning model will now find patterns, in other words, a set of rules, in the data, that coincide with the event of reaching the location. These patterns may represent extraordinary effective rules, which take data into consideration that is available, but a human would not be able to comprehend entirely. That is why machine learning models represent a powerful tool, in our case, to determine whether or not the courier has reached the customer.

3Mansur and I, live testing auto reach at one of our warehouses

And the results!

Accuracy matters to us. By removing human error, customers started to get their two precious notifications (reached & delivered) on time, so that they can start getting ready to open the door as they see our “we are almost there” notification on their phone. We love being accurate.

Secondly, our delivery durations decreased significantly in an amount that can be calculated in minutes. Now we can call our service even more “speedy”. Our motto “speed is our currency” is written in gigantic font in our office. Now we feel closer to that motto.

Last but not least, we have a fantastic Field Operations team that monitors and takes action on whatever is wrong in the field. Now they can take action with even more confidence. We saved them a lot of minutes. Everybody saves minutes.

Special thanks to Data Scientist Tuğberk Ayar and our amazing Data Engineering, DevOps, Backend, Operations and Customer Experience teams who contributed to this real-time machine learning project!

--

--