The official website of VarenyaZ
Logo

WhenaGroceryChainStoppedLosingCustomerstoLateDeliveries

A fast-growing grocery network had the demand, but their operations were buckling. Deliveries were late, inventory was out of sync, and customers were quietly churning. We rebuilt their logistics layer with AI, slashing delivery times by 35% and saving the business from its own growth.

Grocery TechRoute OptimisationAI LogisticsRetail OperationsLast-Mile Delivery
Core_Architecture
Grocery Tech
Route Optimisation
AI Logistics
Retail Operations
35%
Faster delivery times
42%
Higher customer retention
28%
Lower operational costs
Client Dossier

Business Context & Telemetry

Our client was a grocery delivery startup that had exploded from 3 to 50 stores in two years. Their operations, however, were still run on a chaotic patchwork of spreadsheets and WhatsApp groups. Late deliveries and 'out of stock' notifications were becoming the norm. The growth was real, but it was outpacing their systems, and customers were silently churning.

[Company Size]

Mid-scale, high-growth operation

[Team Size]

180 people across operations, delivery, and store staff

[Geography]

Tier-1 and Tier-2 cities across South India

[Core Platforms]

Web, iOS, Android, Internal Operations Dashboard

[Founded]

2021

Executive Perspective

We were growing fast, but it felt like we were running to stand still. Every time we added a store, the coordination problems got worse, not better. We needed systems that scaled with us, not against us.

HO

Head of Operations

The Challenge

Growing fast. Delivering slow. Losing customers quietly.

Grocery delivery is unforgiving. A customer will forgive a late t-shirt, but a late bag of groceries for dinner is a betrayal. The client was missing deliveries, substitutions were rampant, and customers weren't complaining—they were just disappearing.

01

Blind routing

Dispatchers manually assigned routes based on gut feel. This worked on a quiet Tuesday but collapsed during Friday evening rain. Riders took inefficient paths, burning fuel and time, not because they were slow, but because the system had set them up to fail.

02

The 'Phantom Stock' problem

Inventory was updated manually at the end of each shift. By 7 PM, the data was hours old. The app would confirm an order for milk that wasn't there. This 'phantom stock' issue was the single biggest trust-killer.

03

Surprised by Saturday

Every weekend, holiday, or big cricket match was treated like a surprise. With no demand forecasting, stores would run out of essentials by Saturday afternoon, then over-order on Monday and throw away wilted produce.

04

Dispatcher burnout

At scale, the manual dispatch workflow was genuinely unsustainable. Exhausted humans were making high-stakes decisions—which rider goes where, which orders get batched—under immense pressure with incomplete data.

05

Invisible 'Silent Churn'

Order volumes looked healthy, but cohort analysis revealed a crisis: a single late delivery or out-of-stock item on a customer's third order was the biggest predictor that they would never order again.

Previous Attempts

They hired more dispatchers, which just added cost without fixing the broken system. They also piloted a generic routing tool, but it had no connection to inventory or demand. It would optimize a route for a driver, unaware that two of the orders on that route had out-of-stock items.

"The founders had built the business believing they could do grocery delivery better. Every late delivery wasn't just a lost order; it was a failure of that core promise. The gap between their ambition and the daily reality was becoming unbearable."

The Real Cost
The Approach

We didn't start with algorithms. We started with a Saturday afternoon rush.

We embedded ourselves in the operation, shadowing dispatchers managing 40 concurrent orders on WhatsApp and riding along with drivers getting four route changes mid-trip. The chaos of a single Saturday told us everything we needed to know.

Discovery & Methods

We mapped six months of late deliveries against weather, time of day, and store location. The patterns weren't subtle; they were structural. Every team was working harder to solve symptoms, but the root cause was universal: every decision was being made on stale, siloed data.

On-ground operational shadowing during peak hours
Accompaniment research with 4 delivery riders on live shifts
Analysis of dispatcher workflows and time-motion studies
6-month data analysis to attribute causes of late deliveries
Customer churn cohort modeling to identify churn triggers

The routing problem was actually a data freshness problem.

Routes didn't know about inventory. Inventory didn't know about incoming demand. Demand forecasts didn't exist. Once we understood that, the solution became clear: build a shared, real-time data layer that every part of the system could trust.

Design Philosophy

AI must assist, not replace. Dispatchers and riders had deep local knowledge—the shortcut that isn't on Google Maps, the apartment building with the tricky entrance. Our job was to give them better information and smarter tools, not to automate them out of the loop.

Constraints Respected

  • No 'big-bang' replacement: We had to build the AI layer incrementally, integrating with their existing systems.
  • Low-end hardware: The rider app had to be flawless on cheap Android phones with spotty 4G.
  • Maintainability: The solution had to be manageable by a small, stretched in-house tech team.
  • Minimize waste: Forecasting models had to be tuned to slightly under-order perishables rather than risk overstock.
The Solution

A unified intelligence layer that made 50 stores feel like one well-run operation.

We built five interconnected systems on a shared real-time data layer. Each component made the others smarter, turning a chaotic network into a synchronized logistics machine.

Architecture Spec

AI Route Optimisation Engine

Function

Dynamically generates and continuously updates delivery routes in real time, factoring in live traffic, weather, order weight, and delivery windows.

Impact

Riders stop wasting fuel on bad routes. Dispatchers stop manually juggling what a machine can do better. Customers get their orders on time—the single biggest driver of repeat business.

Implementation Note
Constraint-based optimization using OR-Tools with live Google Maps traffic data. Routes automatically recalculate when conditions change.
Tech Stack
React Native & Next.js

Unified codebase for customer/rider apps and the internal ops dashboard

Python (FastAPI)

Modular, independently scalable microservices for AI and optimization logic

OR-Tools & Google Maps

Industry-standard constraint-based routing with live traffic data

Apache Kafka

The real-time nervous system for inventory updates across 50 stores

PostgreSQL + TimescaleDB

High-performance storage for operational and time-series forecasting data

AWS (EKS, RDS, ElastiCache)

Auto-scaling infrastructure to handle 10x demand spikes during festivals

Design Decision

The rider app is fully 'Offline-First'.

Many delivery zones had spotty mobile data. A routing app that dies mid-delivery is worse than useless. We cached all routes and instructions locally so the app was 100% reliable, even in a basement.

Design Decision

The dispatcher dashboard is 'Exception-First'.

Showing 40 active deliveries at once is just noise. We redesigned the UI to highlight only the 3 deliveries that were actually in trouble. This shifted dispatcher focus from monitoring to problem-solving.

Execution

Fourteen weeks to launch. We delivered a working system at every phase.

A grocery operation can't afford a 'big-bang' launch. We phased the rollout so that each new AI module ran in parallel with the old manual system until we had hard data proving it was better.

Delivery Timeline

Operational Log

1

Discovery & Data Audit

Weeks 1–2

Shadowed operations, analyzed 6 months of delivery data, and assessed the (often poor) quality of historical records before committing to any models.

2

Real-Time Data Layer

Weeks 3–5

Built the foundational Kafka pipeline for inventory sync. This ran in parallel with the old system for two weeks to prove data parity before the full cutover.

3

Routing Pilot

Weeks 6–9

Launched the AI routing engine and new rider app in 5 stores. We compared delivery times against a control group of 5 other stores, proving a 25% improvement by week 8.

4

Forecasting & Dispatch

Weeks 10–12

Deployed the demand forecasting models as daily replenishment nudges. Launched the new 'Exception-First' dispatcher dashboard across all locations.

5

Full Rollout & Handoff

Weeks 13–14

Activated customer-facing personalization. Finalized performance testing, documentation, and a full knowledge transfer to the client's internal team.

Team Topology

Deployed Roster

1 × Engagement Lead
2 × ML Engineers (Routing, Forecasting, Personalization)
2 × Backend Engineers (Real-time Data, API)
1 × Mobile Developer (React Native)
1 × Frontend Developer
1 × Product Designer

Collaboration

Working Rhythm

The client's Head of Operations was our lead architect. We held weekly demos with real delivery data, not slides. His on-ground knowledge of 'the building with the tricky parking' or 'the neighborhood that floods in the rain' shaped the routing model in ways no algorithm could.

Course Corrections

Diagnostic Log

Friction Point

Gaps in historical data. Some stores had inconsistent timestamps, missing locations, and less than 3 months of order history, making forecasting impossible.

Resolution

We built a tiered modeling approach: sophisticated models for data-rich stores, simpler baseline models for new ones. We were transparent about the confidence levels per store and built a data-quality dashboard so they could see (and fix) the inputs.

Friction Point

Resistance from dispatchers who were fast and confident with their chaotic WhatsApp workflow.

Resolution

We didn't force adoption. We ran a two-week 'bake-off,' letting them use both systems. We shared the hard data with them directly: their WhatsApp routes vs. the AI routes. Once they saw the numbers in their own deliveries, adoption followed instantly.

Friction Point

Inventory sync latency. During Friday evening rushes, the system struggled to handle 400+ simultaneous orders, creating small delays.

Resolution

We redesigned the write path to use an 'eventual consistency' model during burst periods. It ensured the system remained lightning fast and correct, with a tiny, sub-second delay that was invisible to the end customer.

Measured Impact

Three months in, a busy Friday night no longer felt like a crisis.

The delivery metrics moved fast. The retention metrics moved more slowly, then dramatically. But the biggest win was cultural: the system was finally working *with* the team, not against them.

Primary KPIVerified Metric

35%

Faster delivery times

average reduction across all stores and time windows

Higher customer retention

42%

increase in repeat orders, measured via 6-month cohorts

Lower operational costs

28%

from fuel savings, reduced overtime, and less food waste

Qualitative Objectives Reached

  • The dispatchers, who were the most skeptical at the start, became the biggest internal champions. Three of them now lead the training for new hires on the system.
  • Perishable waste dropped so significantly in the first two months that the savings funded a meaningful portion of the platform's ongoing cloud costs.
  • The client successfully used the platform's new operational metrics as a core part of the pitch in their next fundraising round, which closed three months after launch.

"I've been in grocery ops for 11 years. I've seen a lot of tech promises. What was different here was that the team spent a Saturday riding with our delivery guys before they wrote a single line of code. That told me everything I needed to know."

Head of Operations
Head of Operations

Grocery Delivery Client

Key Learnings

Insights Gained

Valuable lessons and strategic insights uncovered through this project that inform our future work and architectural decisions.

01

Trust is built in parallel.

An AI routing system can be 100% accurate and still fail if riders don't trust it. By running the old manual system and the new AI side-by-side, we let the data, not a mandate, convince the team.

02

Data quality is an operational habit, not just a technical problem.

The gaps in the historical data weren't an engineering failure; they were a symptom of a team too busy growing to be disciplined. Part of our job was building tools and habits that would keep future data clean.

03

Keep the human in the loop.

The dispatchers knew things no model could—the building with the tricky parking, the customer who always called five minutes late. We built a system that made those experts more effective, not redundant.

Exploration

Capabilities & Archive

Running a delivery operation where things are holding together—but you know they shouldn't have to be this hard? That's usually where we come in.

Let's Work Together

When your operations can't keep up with your growth, something will break.

We've been inside enough delivery operations to know the warning signs. Tell us what's working and what's creaking at the seams—we'll give you an honest view of what needs to change.

"No pitch decks. Just an honest conversation about your operation."