Commerce
Wholesale & Distribution
B2B trade, distributor management, and general trade technology — the systems powering India's ₹40L Cr FMCG distribution network, kiranas, and the B2B commerce revolution led by Udaan, Juspay, and Metro.
14M+
Kirana Stores
₹40L Cr
FMCG Distribution
$3.5B
Udaan Valuation
3-Tier
Distribution Depth
Understanding Wholesale & Distribution— A Developer's Domain Guide
Wholesale & Distribution technology powers the B2B supply chain connecting manufacturers to retailers — the invisible backbone of India's consumer economy. Every FMCG brand (HUL, ITC, Nestlé) relies on a network of super-stockists, distributors, and sub-distributors to reach 14 million kirana stores. Distributor Management Systems (DMS), Sales Force Automation (SFA), and Route-to-Market (RTM) platforms digitise this traditionally paper-based trade. B2B e-commerce platforms like Udaan (India's largest B2B marketplace), Jiomart Partners, and Metro Cash & Carry are transforming how kiranas source goods — enabling price discovery, credit, and next-day delivery at scale.
Why Wholesale & Distribution Domain Knowledge Matters for Engineers
- 1India's FMCG distribution network is the world's most complex — 14M kiranas, 3-tier distribution
- 2Udaan is India's largest B2B e-commerce unicorn — massive engineering team building logistics and fintech
- 3Every FMCG major (HUL, ITC, Nestlé, P&G) is digitising distribution — thousands of tech roles
- 4B2B embedded finance (distributor credit, kirana BNPL) is a $50B+ opportunity
- 5SFA and DMS are high-demand enterprise products — companies like Bizom, Distributor Central hiring
- 6General trade digitisation (ONDC, GeM) is a government-backed transformation creating tech demand
How Wholesale & Distribution Organisations Actually Operate
Systems & Architecture — An Overview
Enterprise Wholesale & Distribution platforms are composed of a set of core systems, data platforms, and external integrations. For a detailed, interactive breakdown of the core systems and the step-by-step business flows, see the Core Systems and Business Flows sections below.
The remainder of this section presents a high-level architecture diagram to visualise how channels, API gateway, backend services, data layers and external partners fit together. Use the detailed sections below for concrete system names, API examples, and the full end-to-end walkthroughs.
Technology Architecture — How Wholesale & Distribution Platforms Are Built
Modern Wholesale & Distributionplatforms follow a layered microservices architecture. The diagram below shows how a typical enterprise system in this domain is structured — from the client layer through the API gateway, backend services, data stores, and external integrations. This is the kind of architecture you'll encounter on real projects, whether you're building greenfield systems or modernising legacy platforms.
End-to-End Workflows
Detailed, step-by-step business flow walkthroughs are available in the Business Flows section below. Use those interactive flow breakouts for exact API calls, system responsibilities, and failure handling patterns.
Industry Players & Real Applications
🇮🇳 Indian Companies
Udaan
B2B E-commerce
Java, Go, AWS
India's largest B2B marketplace — FMCG, pharma, fashion for kiranas
JioMart Partners
B2B Distribution
Java, AWS
Reliance's kirana digitisation — credit + inventory + ordering
Metro Cash & Carry
Wholesale Retailer
SAP, Java
Self-service wholesale for HoReCa and kiranas
Bizom (Mobisy)
DMS / SFA Platform
Java, Python, AWS
DMS + SFA used by HUL, ITC, Nestlé distributors
Salesken / FieldAssist
SFA Platform
React Native, Python
Field force automation for FMCG salespeople
ElasticRun
Rural Distribution
Java, Go, ML
Rural last-mile distribution — SoftBank-backed
Juspay (B2B)
B2B Payments
Haskell, Java
B2B payment orchestration for distributors
OkCredit / Khatabook
Kirana FinTech
React Native, Go
Digital ledger + credit for kirana owners
🌍 Global Companies
Alibaba (1688.com)
ChinaB2B Marketplace
Java, cloud
World's largest B2B wholesale marketplace
Amazon Business
USAB2B E-commerce
AWS, Java
B2B purchasing for businesses — $35B+ GMV
Sysco
USAFood Distribution
SAP, Java, ML
World's largest food distributor — 700,000 customers
McKesson
USAPharma Distribution
Java, Oracle
World's largest pharmaceutical distributor
Grainger
USAIndustrial Distribution
Java, AWS
B2B industrial and MRO supply — strong digital commerce
🛠️ Enterprise Platform Vendors
SAP S/4HANA (SD/MM)
ERP
Enterprise wholesale and distribution — sales, procurement, inventory, billing
Oracle NetSuite
ERP / OMS
Cloud ERP for mid-market distributors — order management, WMS, financials
Salesforce B2B Commerce
B2B Commerce
Digital storefront and order management for B2B wholesale
Epicor / Infor
Distribution ERP
Distribution-focused ERP — strong in industrial and pharma distribution
Core Systems
These are the foundational systems that power Wholesale & Distribution operations. Understanding these systems — what they do, how they integrate, and their APIs — is essential for anyone working in this domain.
Business Flows
Key Business Flows Every Developer Should Know.Business flows are where domain knowledge directly impacts code quality. Each flow represents a real business process that your code must correctly implement — including all the edge cases, failure modes, and regulatory requirements that aren't obvious from the happy path.
The detailed step-by-step breakdown of each flow — including the exact API calls, data entities, system handoffs, and failure handling — is covered below. Study these carefully. The difference between a developer who “knows the code” and one who “knows the domain” is exactly this: the domain-knowledgeable developer reads a flow and immediately spots the missing error handling, the missing audit log, the missing regulatory check.
Technology Stack
Real Industry Technology Stack — What Wholesale & Distribution Teams Actually Use. Every technology choice in Wholesale & Distributionis driven by specific requirements — reliability, compliance, performance, or integration capabilities. Here's what you'll encounter on real projects and, more importantly, why these technologies were chosen.
The pattern across Wholesale & Distribution is consistent: battle-tested backend frameworks for business logic, relational databases for transactional correctness, message brokers for event-driven workflows, and cloud platforms for infrastructure. Modern Wholesale & Distributionplatforms increasingly adopt containerisation (Docker, Kubernetes), CI/CD pipelines, and observability tools — the same DevOps practices you'd find at any modern tech company, just with stricter compliance requirements.
⚙️ backend
Java / Spring Boot
Enterprise DMS, ERP integrations, O2C systems — Bizom, SAP integrations
Go (Golang)
High-throughput B2B marketplace APIs — Udaan's catalog and order services
Python
Demand forecasting, credit scoring ML models, trade promotion analytics
Node.js
API gateways, webhook delivery, real-time notifications to SFA apps
🖥️ frontend
React Native / Flutter
SFA apps for field salespeople, kirana ordering apps (Udaan, JioMart Partner)
React / Next.js
Distributor dashboards, brand analytics portals, B2B web storefronts
Angular
Enterprise back-office portals for large FMCG companies (SAP Fiori, custom)
🗄️ database
PostgreSQL / MySQL
Transactional core — orders, invoices, inventory, distributor accounts
MongoDB
Product catalog (B2B marketplace), flexible retailer master data
Redis
Scheme eligibility cache, session management, real-time stock availability
Apache Kafka
Order events, scheme redemption streaming, DMS ↔ brand ERP sync
Elasticsearch
B2B catalog search, distributor analytics, sales performance dashboards
☁️ cloud
AWS
Udaan, Bizom, ElasticRun — EC2, RDS, SQS, Lambda for event processing
Azure / SAP on Cloud
Large FMCG brands running SAP S/4HANA on Azure or SAP BTP
Google Cloud
ML model training for demand forecasting, BigQuery for analytics
On-premise / Hybrid
Large distributors with Tally, legacy ERP — hybrid integration via APIs
Interview Questions
Q1.What is the difference between primary, secondary, and tertiary sales in FMCG distribution?
Primary sales: Brand sells to its direct customers — super stockists or CNF (Carry & Forward) agents. This is the brand's recognized revenue. Tracked in brand ERP (SAP). Secondary sales: Super stockist / CNF sells to distributors. This is the closest proxy to market demand. Tracked in DMS. Tertiary sales: Distributor sells to retailers (kiranas). This is actual sell-out — what reaches the trade. Hardest to measure accurately; estimated via DMS secondary data or direct retailer surveys. Why it matters: Brands want to align primary with secondary+tertiary — over-filling the channel (stuffing) is a red flag in audits. Real challenge: India has 1M+ distributors, many on paper-based systems — DMS adoption is still < 40% making accurate secondary data a major data engineering problem.
Q2.How does credit scoring work for kirana BNPL on a B2B platform like Udaan?
Kirana credit scoring for B2B BNPL uses a mix of traditional and alternative data: 1) Traditional signals: CIBIL/Equifax score (available for ~40% of kiranas), GST return filing history (GSTIN), bank statement analysis via Account Aggregator. 2) Platform signals: Order history on the platform — order frequency, GMV, return rate, payment history for past invoices. 3) Behavioural signals: App usage patterns, response time to delivery confirmations, referral network. 4) Bureau + alternative model: Udaan and similar platforms build proprietary ML credit models combining all signals. Since many kirana owners lack formal credit history, OkCredit/Khatabook ledger data is valuable — showing cash flow, payment behaviour with local suppliers. Credit limit is dynamic — increases as payment history builds. Collections: UPI autopay mandate on due date; field collection agent for large defaults.
Q3.Explain the e-invoicing (IRP) and e-Way bill requirement in B2B trade.
E-invoicing (IRN): Mandatory under GST for businesses above ₹5 Cr turnover. Every B2B invoice must be reported to the Invoice Registration Portal (IRP — run by NIC/GSTN). IRP validates invoice, generates IRN (Invoice Reference Number) and QR code. Invoice is only legally valid after IRN generation. In DMS/ERP: Invoice raised in system → API call to IRP → IRN returned → printed on invoice PDF. Failure to have IRN means buyer cannot claim GST Input Tax Credit (ITC). e-Way Bill: Required for goods movement above ₹50,000 in value across states (or within state >10 km in some states). Generated on the GST e-Way Bill portal. Contains: supplier, recipient, goods, vehicle number, transporter. Driver must carry or show it during transit; intercepted by tax authorities otherwise. In TMS/DMS: Automatically generated when dispatch is created for qualifying orders via the NIC API.
Q4.How would you design a DMS that gives a brand real-time secondary sales visibility?
Design for real-time secondary sell-out visibility: 1) Data collection layer: Distributor DMS (Bizom, custom) captures every secondary invoice in real-time. SFA app captures van sales and retailer orders at POS. Challenge: many distributors use Tally — build a Tally plugin or daily file export integration. 2) Event streaming: Each secondary invoice is an event pushed to Kafka. Brand's analytics platform consumes the stream — sub-minute latency. 3) Data normalisation: Distributor SKU codes ≠ brand SKU codes. A master data layer maps distributor's local codes to brand's EAN/SKU codes. 4) Brand analytics platform: Aggregated dashboard — sell-out by SKU, region, distributor, outlet type. Compare against primary sales (shipments) to calculate pipeline inventory (primary - secondary). 5) Alerting: Detect fast-moving SKUs going out-of-stock (secondary > primary replenishment). Trigger auto-replenishment order to distributor. Scale: 3,000 distributors × 500 invoices/day = 1.5M events/day. Kafka + Flink stream processing, Redshift for analytics.
Q5.What is Route-to-Market (RTM) strategy and how does technology enable it?
Route-to-Market (RTM) is the strategy that defines how a brand gets its products from factory to consumer — which channels, which distribution tier, direct vs indirect. Types: 1) Traditional General Trade: Brand → Stockist → Distributor → Kirana. 2) Modern Trade: Brand → Key Account Manager → Supermarket (BigBazaar, Reliance Smart). 3) D2C: Brand direct to consumer via own website. 4) B2B marketplace: Via Udaan/JioMart. Technology enables RTM via: Beat optimisation — algorithm determines optimal number of outlets per beat, visit frequency by outlet category (A/B/C outlets). Geographic whitespace identification — GIS mapping of covered vs uncovered outlets. Outlet classification — ML clustering of outlets by revenue potential, channel type, urban/rural. Productivity analytics — calls made, orders hit rate, strike rate per salesman. Ideal call calculation — which outlets deserve weekly vs fortnightly visits. Companies like Nielsen, IRI sell RTM analytics services; tech platforms like Bizom, FieldAssist embed this into SFA.
Glossary & Key Terms
DMS
Distributor Management System — software for distributors to manage stock, orders, billing, and beat plans
SFA
Sales Force Automation — mobile app for field salespeople to manage beats, visits, and order booking
Primary Sales
Brand's sale to its direct channel (super stockist / CNF) — recognised as brand revenue
Secondary Sales
Stockist's sale to distributor — closest proxy to true market demand
Tertiary Sales
Distributor's sell-out to retailers (kiranas) — actual sell-in to trade
Beat Plan
Predefined route and schedule for a field salesman — which outlets to visit on which days
CNF / Super Stockist
Carry & Forward Agent — first level of distribution; holds brand stock, supplies distributors in a region
RTM
Route-to-Market — strategy defining which channels and tiers to use to reach consumers
O2C
Order-to-Cash — end-to-end process from receiving an order to collecting payment
TPM
Trade Promotion Management — planning and tracking of trade schemes and discounts
IRN
Invoice Reference Number — GST e-invoice identifier generated by Invoice Registration Portal
e-Way Bill
GST-mandated document for goods movement above ₹50,000 in value
BNPL
Buy Now Pay Later — short-term trade credit for kirana stores on B2B platforms
FOC
Free of Cost — free goods given as part of a trade scheme (e.g., 1 free on purchase of 10)
ATP
Available-to-Promise — real-time check of stock available to confirm against a customer order
HoReCa
Hotel, Restaurant, and Catering — distinct B2B channel served by wholesale distributors