Techletter #52 | December 25, 2023
No matter what people say about Swiggy and Zomato I like both of them as they are our homegrown companies and they are solving great engineering problems that no one has solved for us in the food delivery space before.
The most important thing to know before understanding the food delivery complexity is:
The role of delivery doesn’t begin when someone places the order, but as soon as they open the app.
Food delivery apps like Swiggy and Zomato are some of the most complex software consumers use to order food online and get delivered to their doorstep. But what happens under the hood is important to know.
There is no easy formulate to calculate the estimated delivery time from the restaurant to your doorstep because once the customer places an order it involves:
- Restaurant accepting the order.
- Stress at the Restaurant (Online orders + offline orders + Staff availability)
- Food preparation time (Cook + Pack)
- Finding delivery executive
- Delivery executive arriving at the restaurant.
- Pickup of ordered food. (Involves OTP to authorize the right order for the delivery executive)
- Traveling to the destination. (Involves traffic estimation + Weather condition)
- Coming to your doorstep.
I have generalized the above steps. But there may be some more steps which need to be taken care of.
When a customer opens the app, the app must list the restaurants based on the locality. Because, if an order is placed you must have the capability to deliver at the right time.
So finding serviceable restaurants is itself a challenging problem.
- You need to have the precise location of the user.
- Status of the Restaraunt
- Ability to find the delivery executive near the restaurant
These all must be calculated quickly (less than a half second) because the customer must not leave the app.
Why finding a Goldilocks value is important?
Showing the list of restaurants matters because, if you show too few the customer may not order since his/her favorite restaurants are not listed / serviceable. If the delivery time of the restaurant is too low, then you may not fulfill the promise of delivery within the specified time and customers will lose trust in you.
Everything in Delivery is about finding the Goldilocks value. It’s about finding just the right time to ensure delivery, but not too high to discourage the customer from placing an order. It’s also about providing ample choice of restaurants to the customer, but just enough so we can calculate their delivery times as quickly as possible.
Finding a delivery executive & assigning the order is itself a new kind of problem. Why? Because, how and to whom will you assign the order if more than 1 executive is available, what if no executive is available?
After the order is picked up the the delivery executive/partner some of problems faced are:
- Inaccuracies in maps
- Complex road networks (Indian roads are truly complex, so we need a solution that is Indian)
- Delivery executive/partner will make their own judgements based on conditions.
From Swiggy’s blog on why they don’t use Google Maps
Google Maps doesn’t predict how long it will take for the Delivery Executive to go from outside the society gates to actually reaching your door and handing over the package (AKA the last last mile). While this might not make a big difference for other kinds of deliveries, an additional 5 to 10 minutes in food delivery can significantly hamper customer experience.
ML is at the heart of making food delivery easier and estimating food delivery time to be more accurate.
The food delivery is one of the interesting problems that I have come across this week. So thought to understood it a little bit. The solution to this problem is ML-heavy. I find ML to be one of the interesting fields for solving tough problems like this. I can’t comment more about the problem because I have personally not yet built such systems. My knowledge is from the articles & solutions that I have access to. I have linked all the articles that may help you understand the problem & how the solution is built.
Sources:
- The Swiggy delivery challenge - Part One
- The Swiggy delivery challenge - Part Two
- The accurate ETA to customer satisfaction - Part One
- The accurate ETA to customer satisfaction - Part Two