ERPNext for Pharma and Wellness Retail: Prescription Gate, Batch Expiry, FEFO Picking and Compliance in India
Selling medicines online in India is not ordinary e-commerce with stricter paperwork. It is a licensed activity where the software has to prevent things rather than merely record them, and where a single mishandled unit is a patient safety event before it is a business problem.
This page covers what pharma and wellness commerce demands operationally: the compliance frame you have to design around, how batch and expiry tracking actually works, what a recall requires, and where wellness and nutraceutical lines differ from prescription medicines. It is written for a pharmacy or e-pharmacy operator rather than a compliance officer, and it describes operational tooling rather than legal advice.
This page describes operational tooling, not legal or medical advice. Your compliance officer and the operative rules govern.
The compliance frame you have to design around
India regulates online medicine sale through existing drug law rather than a finalised e-pharmacy statute, so those rules are the operative frame. A valid state drug licence is mandatory before any retail sale, online or offline, and prescription items additionally require registered-pharmacist oversight (eStartIndia, Apr 2026; K&G Techlaw, 2025).
Licensing is step zero. It happens before any system is built, which is why Zuneko treats licence posture as a discovery input rather than a detail to resolve later.
The demand side is growing quickly. Pharma has been reported as the fastest-growing D2C category in India at 48% growth (Unicommerce), which means the operational discipline described below is being adopted by businesses that were recently offline-only.
No. A valid state drug licence is mandatory before any retail sale, online or offline, and prescription items additionally require registered-pharmacist oversight. E-pharmacies operate under the existing Drugs and Cosmetics framework while dedicated online rules remain in draft (eStartIndia, Apr 2026). the build treats licence posture as a discovery input rather than a later detail.
Yes, for prescription medicines, where dispensing requires oversight by a registered pharmacist. Practically this means the system needs a verification step that records who approved a prescription order and when, so the oversight is evidenced rather than assumed. Zuneko builds pharmacist sign-off into the order flow as a required state.
Batch and expiry, which is the whole operation
Every inbound unit joins a batch carrying its manufacture date, expiry date and supplier licence reference. Everything downstream depends on that capture being correct at intake.
Worked example of why FEFO matters more than FIFO. You hold 300 units of a medicine across three batches: 120 expiring in March, 100 expiring in July, and 80 expiring in November. A first-in-first-out system picks by arrival order. If the July batch arrived first, FIFO sends it out while 120 units expire on the shelf in March.
First-expiry-first-out picks the March batch regardless of when it arrived. At a ₹180 unit cost, the difference between the two policies on this single SKU is roughly ₹21,600 of avoidable write-off, and a pharmacy carries hundreds of SKUs.
Figure 1. Batch identity captured at intake is what makes both FEFO and recall tracing possible. Zuneko builds FEFO as enforcement at picking rather than as a report reviewed afterwards.
Near-expiry handling is the other half. Stock crossing a threshold needs flagging while it can still be moved, not after it becomes a write-off.
Every inbound unit joins a batch carrying manufacture date, expiry and supplier licence reference. The system then enforces first-expiry-first-out at picking, flags near-expiry stock before it becomes a write-off, and can trace a batch's complete sales path. Zuneko builds this on ERPNext's native batch handling, extended to the audit grade a licensed pharmacy needs.
First-expiry-first-out picks the batch closest to expiry rather than the one that arrived first. In a category where stock expires, FIFO systematically strands nearest-expiry units on the shelf while later batches ship, turning avoidable write-offs into a recurring cost. Zuneko enforces FEFO at the picking step so the policy is applied rather than intended.
Two mechanisms working together: FEFO enforcement so nearest-expiry stock always ships first, and near-expiry thresholds that flag units while they can still be moved through discounting or supplier return. The version that works in production builds both, because enforcement alone still leaves slow-moving stock ageing quietly.
What a recall actually requires
A recall is the test of whether your batch data was captured properly, and it is a poor moment to discover it was not.
With correct capture, tracing takes minutes. The system holds every batch’s forward path: which warehouse it moved through, which orders it filled, which customers received it. Without it, the same question requires a manual search through paper invoices under a timeline that does not accommodate one.
Worked example. A manufacturer issues a recall on batch number B-2291. You need, within hours, the list of customers who received units from that batch, the quantity still in your stock, and evidence of what you did about both. If batch identity was captured at intake and carried onto every invoice, that is three queries. If batches were recorded loosely, or captured only at goods-in and not carried to the invoice, it is an audit.
Returns handling follows the same principle. Pharma returns never auto-restock. A controlled disposition step decides re-sale eligibility, destruction or supplier return, and keeps the paper trail an inspection expects.
With correct batch capture at intake and batch references carried onto every invoice, tracing takes minutes rather than days, because the system holds each batch's forward path through warehouses, orders and customers. A build that earns its keep carries that recall tracer so a notice can go out immediately rather than after a manual search through paper records.
They quarantine. Pharma returns never auto-restock, and a controlled disposition step decides re-sale eligibility, destruction or supplier return while keeping the paper trail an inspection expects. A serious ERPNext build builds that quarantine gate deliberately, because the most dangerous shortcut in medical retail is a returned unit silently re-entering sellable stock.
Yes, and most pharmacy businesses need it to. FSSAI-governed wellness and nutraceutical lines use the same batch, shelf-life and expiry machinery, while prescription items additionally pass through pharmacist verification. An implementation that respects the process builds the prescription gate as a category-level rule so the two motions share one stock and one set of books.
The audit posture
Compliance in this category is continuous rather than periodic, which changes what the system has to produce.
| Record | What it must show | Why it matters |
|---|---|---|
| Batch register | Every batch, its dates, supplier and licence reference | The foundation of both FEFO and recall |
| Dispensing log | Who approved each prescription order and when | Evidences pharmacist oversight rather than asserting it |
| Cold chain log | Temperature-controlled stock handling records | Required for specific product classes |
| Returns disposition | Grade, decision and destination for each returned unit | Proves nothing re-entered stock without review |
| Sales-to-batch trace | Which customer received which batch | The recall path |
| Licence validity | Your own and your suppliers’ current licences | Purchasing from a lapsed licence is your exposure |
The practical difference between a pharmacy that passes an inspection comfortably and one that does not is usually not diligence. It is whether these records are produced automatically by the system in the course of ordinary work, or assembled afterwards from several places.
At minimum a batch register with dates and supplier licence references, a dispensing log evidencing pharmacist approval on prescription orders, returns disposition records, and a sales-to-batch trace supporting recalls. Cold chain logs apply to specific product classes. An implementation worth paying for carries these as by-products of ordinary work rather than as reports assembled at inspection time.
Through a required verification step in the order flow where a registered pharmacist reviews and approves before dispatch, with the approval, the approver and the timestamp recorded. A disciplined ERPNext deployment builds this as a blocking state, so a prescription order cannot progress to picking without it.
Cold chain, where the record is the product
For temperature-sensitive stock, insulin, vaccines, certain biologics, the storage and transport conditions are part of the product’s integrity. A unit that spent four hours outside its range is not a discounted unit, it is an unsellable one.
That makes cold chain a records problem as much as a refrigeration problem. The system needs to hold temperature logs against consignments, flag excursions when they happen rather than at the next audit, and prevent an excursion-affected batch from being picked while its status is unresolved.
| Control | What it does | What happens without it |
|---|---|---|
| Consignment temperature log | Records conditions from despatch to receipt | An excursion is undetectable after the fact |
| Excursion flag on receipt | Blocks the batch pending review | Affected stock enters sellable inventory silently |
| Storage zone assignment | Ties each batch to a validated storage location | Cold-chain stock stored ambient by mistake |
| Disposition record | Documents the decision on excursion-affected stock | No evidence of the judgement at inspection |
Worked example. A consignment arrives with a logged excursion of six hours above range. With a system, the batch enters a blocked state, a pharmacist reviews against the manufacturer’s stability data, and the disposition is recorded whichever way it goes. Without one, the stock is put away, sold, and the excursion is discovered only if someone reads the logger afterwards.
By holding temperature logs against each consignment, flagging excursions on receipt rather than at audit, and blocking affected batches from picking until a documented disposition is made. A build made for this operation builds the excursion flag as a blocking state so affected stock cannot enter sellable inventory while its status is unresolved.
What the pharma build actually includes
| Module | Scope | What it does |
|---|---|---|
| Prescription gate and FEFO enforcement | Unique to pharma | Blocks prescription orders from dispatch without recorded pharmacist approval, and enforces first-expiry-first-out at picking rather than reporting on it afterwards |
| Batch and expiry tracking | Tuned | Batch identity from intake through invoice, near-expiry thresholds, write-off discipline |
| Recall tracer | Tuned | Forward path from any batch to warehouses, orders and customers |
| Quarantine returns | Tuned | Controlled disposition with no automatic restock |
| Audit binder | Tuned | Continuous compliance records produced as a by-product of ordinary work |
| Inventory & multi-warehouse stock | Core | One stock truth across locations and channels |
| Order management | Core | Capture to fulfilment across web, marketplaces and counter |
| Accounting, GST & e-invoicing | Core | GST-clean books in the same database |
| Connector layer | Core | REST and webhook integration to channels |
| AI layer | Custom | Demand forecasting, document parsing for prescriptions, anomaly detection |
The platform core is Frappe and ERPNext, which handles batch and expiry natively, with Zuneko building the prescription gating, recall tracing and audit records on top. Delivery runs Discover, Design, Build, Deploy, Evolve, and this is the one family sibling where Zuneko will push back on a compressed timeline, because compliance workflows are designed and tested rather than configured.
Where manual dispensing records stop coping
A single pharmacy counter runs batch discipline on paper competently, and many do for years.
Channel count and volume together set the limit. FEFO by hand requires the picker to read expiry dates on every unit and choose correctly under time pressure, which works at ten orders a day and degrades at a hundred. Recall readiness fails differently: it is invisible until tested, so a business can operate for years believing its records are adequate and discover otherwise during the one event where the answer is needed within hours.
Running pharmacy or wellness commerce and want the compliance to be automatic rather than heroic? Let Zuneko scope it.
ERPNext natively handles batch and expiry tracking, GST-compliant accounting and multi-location stock in one database, and its open framework is what lets a partner add prescription gates, FEFO enforcement and audit binders. A system designed around the operation carries those layers, and self-hosting keeps sensitive patient and dispensing data on infrastructure you control rather than a vendor's.
Plan 10 to 16 weeks, longer than a general commerce build because compliance workflows, prescription gates and audit record structures are designed and tested in the design phase rather than bolted on. Core inventory and billing go live first, then FEFO, recall and audit layers land in verified increments.
Zuneko builds custom e-commerce ERP systems on Frappe and ERPNext for Indian pharmacy, e-pharmacy and wellness businesses. The work covers batch-and-expiry stock with FEFO enforcement, prescription gating with pharmacist sign-off logged, recall tracing, cold-chain logs, continuous audit binders and GST-clean books, delivered as an owned, self-hostable system with the source code handed over.
