Problem
Magnit's delivery service used to send each online order to the store nearest to the customer, measured in a straight line. That kept courier costs low, but stores differ in staff and assortment. Some stores picked orders slowly, and others lacked items, so items were swapped for analogues or the order was cancelled. Cutting these failures was expected to raise loyalty and repeat use.
Example from the article: in a pilot in several cities, the nearest store on a map scored 0.38 on the quality metrics, while a more relevant store scored 0.76 and was preferred.
Solution in brief
For each customer, take the stores of the customer's multi-zone (the zone within which available stores are selected). Rate each store on four quality metrics over the last N days, average them, subtract a distance penalty and assign the order to the top-scored store. Scores are calculated once a day in analytics tools, and the backend only applies them.
Questions this case answers
- How to assign each incoming order to one of several candidate fulfilment locations using a blend of historical quality metrics and distance rather than distance alone
- How to ship a scoring-based assignment rule quickly by precomputing scores in batch outside the serving backend
- How to choose which store should pick an online grocery order when the nearest store often cancels or substitutes items
- How to turn several store quality metrics into one ranking score without building a real-time backend
Tools and methods
- Store quality score — average of four metrics per store over the last N days, minus a distance penalty
- Daily batch scoring in the analytics stack — keeps the backend simple, which cut the launch from a planned five months to one month
- Pilot in several cities — tracks delivery time, cancellations and assortment
Google or a one-time email code. No password.
