This is a pharmacy inventory case study about a problem that sounds simple and absolutely is not: keeping stock accurate across eight branches at the same time. The client, a family-owned pharmacy chain in the greater Tangerang area, had grown from two stores to eight in five years. Each branch ran its own point-of-sale and its own stock records, and the head office got a recap by WhatsApp every evening, sometimes.

Pharmacies carry a double pain that most retailers do not. Run out of a medicine and the customer walks to the competitor across the street, probably for good, because people are loyal to the pharmacy that has their prescription in stock. But over-order to avoid stockouts and the product expires on the shelf, and expired pharmaceutical stock is not markdown inventory, it is a write-off you also have to dispose of properly.

The owner told me the numbers that finally pushed them to act: roughly Rp 34 million in expired stock written off in one quarter, while at the same time two branches were regularly out of the top 20 fast movers. Both problems, simultaneously. That is the signature of stock that exists somewhere in the chain but not where it is needed.

The starting point: eight islands of data

Before we changed anything, we mapped how stock actually flowed. It looked like this:

  • Each branch ordered independently from distributors, based on the branch manager's feel for demand.
  • Head office consolidated purchases only for the biggest supplier, once a month.
  • Stock counts happened per branch, on paper first, then typed into Excel.
  • Nobody could answer "how many boxes of product X do we have across the chain, and where" without eight phone calls.
  • Expiry dates lived on the physical packaging and in the memory of senior staff.

None of this is unusual. It is how almost every multi-branch retail business in Indonesia operates until the pain gets loud enough. The problem is that pharma amplifies the cost of every blind spot.

What we built, in order of impact

We deliberately did not start with a big ERP. The owner had been quoted a nine-figure rupiah implementation by a vendor and rightly walked away. Instead we phased it.

Phase 1: one shared stock ledger

The foundation was a central database that every branch's sales and receiving transactions wrote into, near real time. Each branch kept its familiar cashier flow, but every sale decremented central stock and every goods receipt incremented it, tagged with branch, batch number, and expiry date.

Batch and expiry tracking was non-negotiable. In pharmacy, "120 units in stock" is meaningless if 80 of them expire in six weeks. We enforced first-expired-first-out at the point of sale by having the system tell the cashier which batch to pick.

Phase 2: expiry alerts that reach a human

Reports that nobody opens do not save money. So instead of a dashboard the staff had to remember to check, the system pushed a weekly message to each branch manager: every batch expiring within 90 days, sorted by value. Head office got the consolidated version.

Ninety days matters because it is long enough to still do something: run a small discount, push the product at the counter, or return it to distributors that accept near-expiry returns, which several do if you are inside their window.

Phase 3: the surprise hero, inter-branch transfer suggestions

This was the feature we almost cut from scope, and it ended up being the one the owner talks about most. Once all eight branches shared one ledger, the system could see patterns like: branch Karawaci has 60 units of an antihistamine expiring in 70 days and sells 5 a month, while branch Serpong sells 40 a month and is nearly out.

The system generated weekly transfer suggestions: move this quantity from here to there, with the expiry math shown. A courier already drove between branches twice a week for document runs, so the marginal cost of moving stock was close to zero. In the first three months, transfer suggestions rescued stock that would otherwise have expired and simultaneously cut stockouts on fast movers. The same units solved both problems.

The regulated-product wrinkles

Pharmacies are not free to shuffle everything around like a fashion retailer. A few realities shaped the design:

  • Prescription-only and controlled medicines have documentation requirements for movement between locations. Transfers of those categories generated the proper internal documents automatically, signed off by the pharmacist in charge at both ends, so compliance did not depend on someone remembering the paperwork.
  • The pharmacist-in-charge structure means each branch has a responsible professional whose name is on the line. The system's audit trail, who moved what, when, from which batch, protected them, and they became the strongest internal champions because of it.
  • Recalls happen. With batch numbers in the ledger, a distributor recall notice went from "search every shelf in eight stores" to a single query showing exactly which branches held the affected batch.

If you operate in any regulated category, cosmetics, food supplements, medical devices, expect similar wrinkles. Budget time for them. They are not edge cases, they are the job.

The results after six months

Numbers the owner shared with me, rounded:

Metric Before After 6 months
Quarterly expiry write-off ~Rp 34M ~Rp 9M
Stockout rate, top 50 SKUs 11% of branch-days under 3%
Time to answer "where is product X" hours, phone calls seconds
Monthly stock opname duration 2 full days per branch half a day, cycle counts

The expiry write-off will never reach zero, and it should not. A pharmacy that never writes off anything is under-stocked. But cutting it by roughly Rp 25 million per quarter paid for the entire system in under a year, before counting the sales recovered from fewer stockouts.

There was a softer result too. Branch managers stopped hoarding stock. When every manager could see chain-wide inventory and trusted that a transfer request would actually arrive, the incentive to over-order "just in case" faded. Central purchasing then negotiated better terms because volume was consolidated instead of split across eight small orders. Accurate data changed behavior, and the behavior change was worth as much as the software.

What this means for your multi-branch business

You do not need to be a pharmacy for this pattern to apply. Any business with multiple locations and shared inventory, building materials, auto parts, minimarkets, cosmetics, faces the same core problem: stock trapped in the wrong place looks identical to stock you do not have.

The practical sequence that worked here:

  1. Get every location writing to one shared ledger before building any clever features. Sync first, intelligence second.
  2. Track the attribute that kills your margin. For pharma it is expiry. For fashion it is season. For electronics it is model generation.
  3. Make alerts land in a person's hands, not in a dashboard they must remember to open.
  4. Build transfer suggestions once the data is trustworthy. Moving existing stock is cheaper than buying more and safer than writing it off.

And before spending anything, make sure this fits a broader plan rather than becoming another isolated system. I wrote about that trap in why your business needs a technology strategy, not just a website. If half-finished past systems are part of why you hesitate, technical debt explained for business owners covers how to think about that honestly.

Eight branches, one ledger, and a courier who was already making the trip. Sometimes the highest-return feature is the boring one that just tells you what you already own and where it is sitting.