Skip to content

Designing an offline-first pharmacy POS

· Software Engineering · · 3 min read

A pharmacy checkout should keep moving during a connection outage. The online store also needs to know how much stock it can promise. Vevilo was built around that tension. The counter and store share a stock record, while the desktop till can sell from its allocated stock when it goes offline.

Draw the boundary between reserved and sellable

Imagine three packs left on a shelf. An online customer adds one to a cart. The counter can sell another pack while that customer is still shopping. The decision point is checkout, where Vevilo reserves stock for the online order. Once reserved, those units are no longer available to promise on a second order. A till that cannot see live reservations can still sell from the stock already allocated to it.

Before building this kind of workflow, document when stock is reserved, when an allocation becomes usable, and when units go back into general stock. Include cancellations and refunds in the same exercise. Those rules matter on a normal day and become especially visible when several people are selling at once.

Track the batch all the way through the sale

Two packs with the same product name can have different expiry dates. Vevilo tracks stock by batch and makes expiry part of the order in which stock is used. Allocation needs to preserve that distinction. Keep the batch identifier with the sale record so that when a till reconnects, the movement can be reconciled against the right stock.

Test the outage and the recovery

An offline checkout test should cover the moment the network drops and the moment it comes back. Start from a known stock count, capture a real movement on the till, and compare the till, store and stock ledger after reconnecting.

  • Disconnect a till with an existing allocation. Sell one unit and check the remaining allocation shown on the till.
  • While the till is offline, place an online order and check that checkout reserves only stock it can still promise.
  • Reconnect, interrupt the first sync, and retry it. Verify that the movement is recorded once against the right batch.
  • Repeat with multiple batches, a cancellation and an allocation that runs out before reconnection.

The practical measure is whether staff can explain why a unit is available, reserved or allocated to the counter. Use those states in the UI and make stock differences visible after sync so the team can investigate them.

Explore the Vevilo pharmacy POS case study

Need an offline pharmacy POS scoped for your tills? Pharmacy POS and inventory software development