CASE STUDY

Month-end close fell from 6 days to 6 hours. Stockouts fell 38 percent.

How a consumer goods distributor moved from 14 disconnected spreadsheets to one data platform, live dashboards, SKU-level forecasts and two audited AI agents in 16 weeks.

Engagement at a glance

Client

Multi-location consumer goods distributor, India (name withheld)

Scale

2,400 SKUs, 3 warehouses, 40 sub-distributors, 3,000+ supplier invoices per month

Engagement

Full chain: data engineering, business intelligence, predictive analytics, AI agents

Duration

16 weeks, delivered in five phases

Team

AlphaData: 1 engagement lead, 2 data engineers, 1 BI developer, 1 data scientist, 1 AI engineer

Stack

Microsoft Azure, Databricks, Apache Spark, Apache Kafka, Python, Power BI, Docker

1. The problem: data existed, answers did not

The client ran sales, inventory and finance on separate systems. An ERP held invoices. A warehouse system held stock. Sales teams tracked distributor orders in spreadsheets. Leadership received a different revenue figure from each department every month.

The cost showed up in four places:

  • Slow close. Five finance analysts spent 6 working days each month reconciling 14 spreadsheets before any report went out.
  • Conflicting numbers. Sales and finance reported revenue figures 4 to 7 percent apart. Meetings started with a debate over whose number was right.
  • Stockouts and excess stock. Planners ordered stock from last year’s sales. Fast movers ran out, slow movers piled up. Stockouts hit 210 incidents per quarter.
  • Manual invoice entry. Two staff members typed 3,000+ supplier invoices into the ERP each month, with a 3.5 percent error rate.

Leadership wanted AI. The data underneath was not ready for AI. Most AI projects stall at this exact point, so the engagement started with the data.

2. The approach: foundation first, agents last

AlphaData ran one team across the full chain. The engineers who built the pipelines also built the agents. Each phase delivered a working output before the next phase started.

Phase

Weeks

Output

0. Readiness sprint

1 to 2

Mapped 22 workflows and measured hours per workflow. Ranked agent use cases by value, risk and data readiness. Data audit found 11 percent duplicate customer records.

1. Data engineering

3 to 7

Azure and Databricks lakehouse. Spark pipelines from ERP, warehouse system and sales sheets. Kafka stream for live distributor orders. 42 automated data quality rules.

2. Business intelligence

6 to 10

Power BI star schema model. Executive view capped at five KPIs with drill-through. Self-service access for 60 users.

3. Advanced analytics

9 to 13

Weekly demand forecast per SKU per warehouse. Distributor segmentation by margin, growth and payment behaviour.

4. AI agents

12 to 16

Conversational analytics agent on Power BI and Databricks. Invoice processing agent with human approval above Rs 50,000.

Phase 0. Readiness sprint

The team interviewed 18 staff across finance, sales and operations and timed each recurring task. Month-end reporting consumed 240 analyst hours per month. Invoice entry consumed 160. These two workflows topped the ranking and became the agent shortlist. The data audit flagged duplicate customers, missing SKU codes and three conflicting product hierarchies. The team fixed all three before any build.

Phase 1. Data engineering

Engineers replaced manual exports with automated Spark pipelines into a Databricks lakehouse on Azure. A Kafka stream fed distributor orders in near real time. Master data rules merged 1,840 duplicate customer records into one golden record each. 42 quality checks now run on every load and block bad data before reports see the data.

Phase 2. Business intelligence

The BI developer built one Power BI model on the lakehouse, with one definition per measure. The executive dashboard shows five KPIs: net revenue, gross margin, inventory days, fill rate and receivables days. Each title states the finding, for example “West region drives 41 percent of revenue on 26 percent of distributors”. Sales and finance now read the same number.

Phase 3. Advanced analytics

The data scientist trained a gradient boosting model on three years of sales, promotions, festival calendars and price changes. The model forecasts weekly demand for each SKU at each warehouse. Forecast error fell from 31 percent under the old spreadsheet method to 14 percent. Planners receive reorder suggestions inside Power BI every Monday.

Phase 4. AI agents

Conversational analytics agent. A sales head types “Why did West region revenue drop last month?” The agent queries the lakehouse, checks the drivers and replies with a chart and a three-line explanation. The agent now answers 70 percent of routine data requests, which used to wait in the analyst queue for two days.

Invoice processing agent. The agent reads supplier invoices in PDF and image formats, extracts 18 fields, matches each invoice to the purchase order and goods receipt, and posts the entry to the ERP. Mismatches and invoices above Rs 50,000 go to a finance approver. 82 percent of invoices now post with no manual entry.

3. Governance: agents the client audits

Every agent shipped with an evaluation set, an audit log and a named owner. The controls below ran from day one.

Control

How the control runs

Pre-release testing

The AI engineer tests each agent against 300 real historical cases. Release requires 95 percent field accuracy on invoices.

Human approval

A finance approver signs off on payments above Rs 50,000, PO mismatches and any supplier record change.

Audit log

Every action logs the input, the output, the approver and the timestamp.

Access limits

Each agent reads and writes only the tables its job requires.

Rollback trigger

An accuracy drop above 5 points in the weekly scorecard triggers automatic rollback to manual processing.

Ownership

The client owns the code, the prompts and the data. AlphaData hands over full documentation.

4. Results after 16 weeks

Metric

Before

After

Change

Month-end reporting cycle

6 days

6 hours

-96%

Analyst hours on reporting per month

240

35

-205 hrs

Forecast error (MAPE)

31%

14%

-17 pts

Stockout incidents per quarter

210

130

-38%

Inventory days

58

46

-12 days

Invoices with no manual entry

0%

82%

+82 pts

Invoice entry error rate

3.5%

0.6%

-2.9 pts

Time to answer a data request

2 days

4 minutes

Same day

Revenue gap between sales and finance

4 to 7%

0%

One number

Business value in rupees

  • Working capital. Twelve fewer inventory days released an estimated Rs 2.1 crore in working capital.
  • Capacity. 205 analyst hours and 130 data-entry hours per month moved to margin analysis and supplier negotiation.
  • Revenue protected. 80 fewer stockouts per quarter protected an estimated Rs 45 lakh in quarterly sales.
  • Payback. Fixed-scope pilot pricing recovered the full engagement cost inside 7 months.

5. Five lessons for your data and AI programme

Fix the data first

Duplicate and stale records make an agent give wrong answers fast. Clean the data before the build.

Measure the baseline

Record hours and error rates before the build. Without a baseline, nobody proves the result.

Start with one workflow

Pick the process with the most hours and the cleanest data. Prove the result, then expand.

Cap the dashboard

Pick the process with the most hours and the cleanest data. Prove the result, then expand.

Write the controls before the agent

Set approval thresholds, logs and rollback triggers on day one, not after the first incident.

6. What comes next

The client has approved phase two. AlphaData now builds a collections agent to chase overdue receivables and a distributor recommendation engine to suggest the next best SKU for each outlet. Both agents run on the same monitored platform, with no new data infrastructure required.
arrow_down_2.png

Start with a two-week readiness sprint and one pilot agent.

About AlphaData Intelligence

AlphaData Intelligence (OPC) Pvt. Ltd. is a team of data and AI professionals with 8+ years of experience across startups and Fortune 500 organisations. The firm builds the full chain: data engineering, business intelligence, predictive analytics and AI agents on top of all three. AlphaData serves 100+ clients across six countries.

Your data becomes a dashboard. The dashboard becomes a decision. An agent carries the decision out.