am looking to track both Primary Sales (Manufacturer to Distributor) and Secondary Sales (Distributor to Retailer/Consumer) within ERPNext.
Could anyone share the best practices or workflows for this? Specifically:
-
How should I structure warehouses for distributor stock?
-
What is the easiest way to capture or import secondary sales data?
-
Are there native reports available to compare primary vs. secondary sales?
Thanks in advance for your help!
Good question — this comes up a lot for FMCG/consumer brands selling through distributors, and ERPNext handles it well once you stop looking for a single “secondary sales” feature and treat it as three pieces: stock model → capture → report.
1. Warehouse structure
Make warehouses a tree, not a flat list. Create a group warehouse per distributor (e.g. Distributor - Mumbai) with child warehouses under it (Saleable, Returns). Your primary Sales Invoice / Delivery Note to the distributor moves stock into that warehouse; every secondary sale issues stock out of it. That one decision keeps distributor stock-on-hand, ageing and days-of-cover visible per distributor in the standard Stock Balance / Stock Ledger — without mixing it with your own plant/depot stock. (Avoid posting secondary sales against your company warehouse — it breaks every stock report later.)
2. Capturing secondary sales — pick by how digitised your channel is:
-
Distributor portal / web form → distributors raise their own retailer invoices (cleanest, real-time).
-
Custom “Secondary Sales” DocType → when you only get summary sell-out data; lighter than a full invoice, still posts a Stock Entry.
-
Data Import → daily/weekly spreadsheet upload, zero dev, good for a pilot.
-
REST API sync → push from the distributor’s Tally/billing app on a schedule so nobody re-keys.
-
POS / van sales → for direct-to-retailer routes.
3. Primary vs secondary report
A Report Builder view (or a Query Report for SQL) grouping primary qty/value and secondary qty/value by item, territory, distributor and month gets you 90% there. Add a Number Card + Dashboard Chart for sell-in vs sell-out and stock cover (days). Schemes/claims on top: drive them with Pricing Rules (qty/value/free-item) and reconcile claims as credit notes or a small custom DocType.
I wrote this up as a full step-by-step (warehouse tree diagram, the 5 capture methods, and the sample report) here if it helps: https://mith.tech/blog/erpnext-distributor-secondary-sales-tracking
Disclosure: I’m with Mith Tech — we do ERPNext implementations — but happy to answer follow-ups right here in the thread.