How HealthPotli Fulfilled 500K Orders Without a Warehouse
For: COO or product lead at a mid-size pharmacy chain or healthcare distributor who has been handed a mandate to go digital and is trying to understand what a real fulfillment architecture looks like before they sign a contract with a vendor
HealthPotli fulfilled roughly 500,000 pharmacy orders without owning a single warehouse by treating partner pharmacies as distributed inventory nodes and building the routing, prescription-gating, and expiry logic in software — not by scaling operations. The non-obvious part: the storefront was the easy 20% of the build. The hard 80% was making sure a naive e-commerce fulfillment model didn't quietly dispatch expired stock, controlled substances without a valid prescription, or a drug from a pharmacy that couldn't legally ship to the patient's state. This post walks through how that pipeline was actually architected, what broke first, and what a mid-size chain going digital should copy versus avoid.
If you're a COO or product lead at a pharmacy chain or distributor with a mandate to go online, this is the concrete example most vendor decks won't give you.
The original problem: pharmacy fulfillment is not e-commerce
HealthPotli's goal looked simple from the outside: a patient opens an app, uploads a prescription or picks OTC items, pays, and a courier arrives. Amazon has trained everyone to expect this. The founders had partner-pharmacy relationships across multiple cities and no interest in taking on warehouse leases, cold-chain infrastructure, or dispensing licenses of their own.
The naive path — the one every generic e-commerce agency proposes — is: build a Shopify-style catalog, stock levels sync via CSV, orders route to the nearest pharmacy by pincode, done. This approach breaks in about four different ways at once when pharmaceutical inventory is involved:
- Inventory is expiry-sensitive. A pharmacy's stock of amoxicillin 500mg is not one number. It's N batches, each with a manufacture date, expiry date, and batch number that must appear on the invoice. Selling from the wrong batch is a regulatory problem.
- Inventory is prescription-gated. Schedule H, H1, and X drugs cannot dispatch without a validated prescription — and "validated" means a human pharmacist has looked at it, not that a file was uploaded.
- Inventory is location-bound. A pharmacy in one state may not be licensed to dispatch to a patient in another. Some drugs are further restricted by narcotics rules that vary by jurisdiction.
- Inventory is dynamic in a way retail isn't. A partner pharmacy is still selling over the counter to walk-in customers while your app is quoting stock. A 30-second-stale inventory number becomes an order the pharmacy can't fulfill.
Miss any one of these and you get an order that dispatches. Miss all four at scale and you're not running an online pharmacy fulfillment system — you're running an unlicensed drug distribution operation with a nice UI.
What the team tried first (and why it didn't hold)
The first iteration was closer to a marketplace pattern: catalog centrally maintained, partner pharmacies mark items in/out of stock via a merchant app, orders route by proximity, prescription uploads reviewed by an in-house pharmacist team before dispatch.
It worked at low volume. It started leaking as soon as order volume climbed:
- Stock-outs at pickup. The pharmacy marked 20 units of a paracetamol brand available in the morning. By evening they'd sold 15 to walk-ins. Order came in for 10, courier arrived, pharmacy had 5. Order got partially fulfilled, partially refunded, patient churned.
- Prescription review became the bottleneck. Every Rx order queued behind a human pharmacist. During peak hours the queue grew faster than it drained. Median time-to-dispatch stretched from minutes to hours.
- Substitution logic was manual. If Pharmacy A didn't have the exact SKU but had a therapeutic equivalent, the workflow to re-quote the patient, get consent, and re-route was a chain of WhatsApp messages.
- Expiry visibility was zero. Central catalog knew a pharmacy had "amoxicillin 500mg," not which batch or how close it was to expiry. Short-dated stock rotated poorly, and there was no way for the platform to preferentially route those units before waste.
None of these were individually fatal. Together, they created the classic mid-scale collapse: enough volume to reveal every weakness, not enough operational muscle to paper over them.
The architectural call: treat each pharmacy as a real-time fulfillment node, not a stock row
The rebuild pushed three ideas hard.
1. Inventory as a stream, not a snapshot
Partner pharmacies run their own point-of-sale software — a mix of local vendors, most of them legacy Windows apps with a SQL backend. Rather than asking partners to key stock into a merchant portal (which they wouldn't do reliably), the team built lightweight connectors and, where connectors weren't possible, a polling agent that read POS state directly. Stock changes flowed as events, not as periodic snapshots.
The platform maintained its own inventory projection per pharmacy per SKU per batch, updated on every POS event. When a walk-in customer bought 5 units, the platform knew within seconds. When an order was placed on the app, the units were soft-locked immediately and the pharmacy's projection dropped before any other user could see them as available.
This is the piece most pharmacy inventory management software vendors get wrong. They model inventory as a number to be updated. It's actually a ledger of batches, each with attributes, being mutated by two independent sales channels simultaneously.
2. Order routing as a constraint solver, not a proximity lookup
Routing an order to "the nearest pharmacy" is what you do for pizza. For a pharmacy order, the router had to satisfy a stack of constraints in order:
- Is every SKU in the cart available at this pharmacy right now, in a quantity sufficient, from a batch that isn't expired and isn't so close to expiry that shipping it is inappropriate?
- Is this pharmacy licensed to dispatch every SKU in the cart to the patient's delivery address?
- For Rx items, does the pharmacy have a licensed pharmacist on shift to validate and dispense?
- Can the pharmacy commit to a pickup window that meets the patient's promised delivery slot?
- Only now — of the pharmacies that pass 1–4 — which is nearest / cheapest / has best fulfillment history?
When no single pharmacy could satisfy the full cart, the router split the order across multiple pharmacies with independent dispatches, and the patient-facing UI reconciled that into a single order experience. Split fulfillment sounds obvious. Building it so the patient sees one order, one invoice per pharmacy for compliance, one delivery ETA, and one refund flow if something fails — that's where most builds cut corners and pay for it later.
3. Prescription verification as a pipeline, not a queue
The human pharmacist bottleneck got broken by staging the workflow:
- Ingestion: OCR + structured extraction pulled drug names, dosages, patient details, prescribing doctor, and date off the uploaded prescription. Bad-quality uploads got kicked back to the patient before ever hitting a pharmacist queue.
- Automated checks: Drug name matched against the cart. Dosage sanity checks. Duplicate-prescription detection. Interaction checks against other active prescriptions on the patient's record. Anything clean and low-risk moved forward with a lighter review; anything flagged got prioritized human attention.
- Pharmacist review: Only the flagged and Rx-required items reached a human, and they saw a pre-annotated view — not a raw image and a cart.
- Audit trail: Every decision — automated or human — was logged with reviewer, timestamp, and reasoning, because in pharmacy the question isn't "did you dispatch correctly" but "can you prove you dispatched correctly."
The drug interaction check is one of the pieces where AI genuinely earned its place. Rules-based interaction engines exist and are used, but layering a model that can reason about the patient's active prescription history — not just the current cart — caught edge cases the pure rules engine missed. You can see more of that pattern in the HealthPotli case study.
What actually moved the metrics
A few outcomes to be concrete about, without inventing numbers that weren't measured:
- Order accuracy climbed sharply once inventory became event-driven. The category of failure where a pharmacy accepted an order and then couldn't fulfill it collapsed to a small residual driven by physical damage or misplacement, not by stale stock counts.
- Time-to-dispatch dropped meaningfully after the prescription pipeline started auto-clearing low-risk orders. Pharmacists went from being a bottleneck on every order to being a reviewer on the subset that actually needed judgment.
- Pharmacy waste dropped because the router preferentially assigned short-dated batches to same-day orders, rotating stock through the platform before it expired on shelves.
- Compliance posture strengthened — every dispatch had a batch number, a pharmacist sign-off (or an auditable auto-approval with the rules that applied), and a licensed pharmacy of record.
- Roughly 500,000 orders fulfilled through the partner network without HealthPotli operating a warehouse.
What this architecture is bad at
Being honest about tradeoffs matters more than the wins.
- Partner onboarding is heavy. Every new pharmacy needs a POS integration or a polling agent installed. This is not a self-serve merchant sign-up. Growth is gated by integration engineering, not marketing.
- Partner data quality varies wildly. Some pharmacies keep meticulous batch records in their POS. Others enter everything as generic SKUs. The platform has to degrade gracefully when batch data is missing, which means some of the expiry-aware routing benefits don't apply to every node.
- Split fulfillment is expensive. Delivering one order from two pharmacies costs more in courier fees than delivering from one. The router has to weigh split cost against the alternative of not fulfilling at all.
- Commercial complexity. Reconciling payouts to multiple pharmacies per order, handling returns and refunds where the physical stock is at a partner site, and settling disputes over damaged deliveries — all of this becomes ops load the platform owner absorbs.
- You don't own the customer experience end-to-end. A rude counter interaction at a partner pharmacy on a walk-in pickup order is your brand problem, and you have limited control over it.
If you're a pharmacy chain that already owns stores, this last point flips in your favor — you do control the counter experience. The distributed-node model becomes even stronger when the nodes are yours.
What generalizes to a pharmacy chain going digital
If you're at a mid-size chain evaluating vendors, here's what to press on before signing anything:
Ask how they model inventory
If the answer is "we sync stock counts from your POS every N minutes," walk away. Ask specifically: does the system track batch and expiry per SKU per location? What happens if a walk-in sale reduces stock between the time an order is placed and the time it's picked?
Ask how the router handles multi-store fulfillment
A chain has an inherent advantage over a marketplace — inventory pooling across your stores. But most off-the-shelf e-commerce platforms cannot route a single order across multiple store locations. Ask for a concrete walkthrough of what happens when the nearest store has 8 of 10 items and the next store has the other 2.
Ask how prescription workflow is staged
If every Rx order sits in one queue for one team to review, that's your future scaling wall. Ask what auto-clears, what escalates, and how the audit trail is stored.
Ask about the compliance surface
Batch numbers on invoices. Pharmacist-of-record on dispatch. State-level dispatch restrictions. Schedule H1 register maintenance. If the vendor's answer is "we'll add that in a later phase," the platform is not actually a pharmacy platform. It's a storefront.
Ask what the system does when it doesn't know
The right answer to "a pharmacy hasn't reported stock in 30 minutes" is not "we assume it's still what we last saw." It's "we degrade that pharmacy's routing priority or take it offline until we hear back." How the system fails matters more than how it succeeds.
How CodeNicely can help
HealthPotli is the reference build for pharmacy operators who need this pattern. The team that built it worked through the specific failure modes above — the batch-level inventory ledger, the constraint-based router, the staged prescription pipeline with AI-assisted drug interaction checks, and the operational tooling for pharmacists and dispatch coordinators. If you're a chain or distributor and your problem shape looks like "we have physical stores, partner relationships, or both, and we need a fulfillment platform that respects pharmaceutical constraints instead of pretending they're the same as retail," that's the engagement pattern that fits.
The relevant reading is the HealthPotli case study for the pharmacy-specific work, and the broader digital transformation and AI studio pages if you want to see how the AI components (OCR, interaction checks, routing) get built and owned by you rather than rented. Engagements include full IP transfer — the platform is yours, not licensed back to you.
The takeaway
The reason HealthPotli fulfilled 500,000 orders without a warehouse isn't clever logistics. It's that the team refused to build pharmacy fulfillment as if it were book fulfillment. Every architectural decision — event-driven inventory, constraint-based routing, staged prescription verification, batch-level tracking — was a direct response to the fact that pharmaceutical inventory is simultaneously location-bound, expiry-sensitive, and prescription-gated. Skip any one of those and the system dispatches wrong at scale.
If you're evaluating an e-pharmacy platform architecture for your chain or distribution business, the vendor questions above are worth more than any feature comparison sheet. The features are easy to demo. The failure modes are what determine whether the platform survives its 100,000th order.
Frequently Asked Questions
Do we need to own warehouses to run an online pharmacy?
No. The HealthPotli model shows partner-pharmacy fulfillment can scale into the hundreds of thousands of orders without operating a warehouse — provided the platform treats each pharmacy as a real-time fulfillment node with batch-level inventory visibility, not as a stock row updated occasionally. Owning stores gives you more control over the counter experience but doesn't change the core architectural requirements.
How is a pharmacy fulfillment system different from a normal e-commerce platform?
Three things: inventory is tracked at the batch level with expiry attributes, dispatch is gated by prescription validation for scheduled drugs, and routing has to enforce state-level dispensing licenses. A standard e-commerce fulfillment engine handles none of these natively, which is why bolting a pharmacy onto Shopify or WooCommerce breaks at moderate scale.
Can AI actually help with prescription verification, or is it hype?
It helps in specific places: OCR and structured extraction from prescription images, automated drug-interaction checks against the patient's active prescription history, and triage of which orders need human pharmacist review versus which can auto-clear. It does not replace the licensed pharmacist for scheduled drugs, and it shouldn't. The value is in cutting the queue that reaches the pharmacist, not in removing the pharmacist.
What's the biggest hidden cost of the distributed partner-pharmacy model?
Onboarding integration. Every partner pharmacy needs its POS connected to the platform, and pharmacy POS software in most markets is a fragmented mix of legacy vendors. Growth is gated by integration engineering capacity. Chains that already own their stores and can standardize the POS avoid most of this cost.
How long does a build like this take and what does it cost?
That depends heavily on your existing systems, partner network, regulatory geography, and how much of the workflow already runs in software versus paper. For a realistic scope and estimate, contact CodeNicely for a personalized assessment against your specific operation.
Building something in Healthcare?
CodeNicely partners with founders and tech teams to ship AI-native products that move metrics. Tell us about the problem you're solving.
Talk to our team_1751731246795-BygAaJJK.png)