Techon Innovations – home

One system, many branches: the data model behind multi-branch software

•6 min read•
#Architecture#Multi-branch#Data modelling
Cover image for One system, many branches: the data model behind multi-branch software
“Running several locations from one application is mostly a data modelling question. Here is how to scope data per branch while keeping central reporting simple.”

A business with one shop and a business with five shops want almost the same software. The difference is that the second one needs to know which branch every record belongs to, and needs to see all branches together when the owner asks for the full picture.

The foundation is a branch identifier on every record that belongs to a location: sales, purchases, stock movements, cash and staff assignments. Once that is in place, a branch manager's screen is simply the same data filtered to one branch, and the owner's screen is the same data with the filter removed.

Stock is where this matters most. Each branch holds its own quantity of an item, and a transfer between branches is two linked movements, one out and one in. Modelling transfers as a single document that creates both movements keeps the books balanced and makes missing stock easy to trace.

Permissions should follow the same boundary. A cashier at one branch should not see another branch's takings, while an accountant may need every branch. Role-based access control with a branch scope, rather than a long list of one-off rules, keeps this understandable as the team grows.

Numbering, dates and tax settings can differ by branch too, especially across countries. Keep invoice series per branch, store timestamps in a single standard time and display them in the branch's local time, and treat tax configuration as data rather than code.

Add an audit trail from the start. Recording who changed what, and when, costs little at the beginning and is very hard to add later. When two branches disagree about a number, it is the first thing you will want to read.

Share this articleLinkedInXWhatsAppEmail

More Insights