Franchise

Franchise and multi-branch hub: head office sees everything, a franchisee sees their branch

Franchise platforms fail on permissions long before they fail on features. Once one franchisee can see another's numbers, the platform is finished politically no matter how good the reporting is.

GoGee treats franchising as a permissions architecture first. Branches are the structural unit, roles determine scope, and the database, not the interface, enforces who sees what.

GoGee feature series · 11 of 33

How it's actually built

Structural unit
Branch records with slug, address, coordinates and delivery settings
Role set
Head office admin and staff, franchise admin, branch staff, supplier, business, customer, developer, admin
Enforcement
Row-level security using security-definer role and branch helpers
Scoping rule
Branch-scoped roles see only their branch; head office sees all
Onboarding
Branches, staff attachments and roles created in the admin
Branch data
Address, Google Place ID, coordinates and opening hours
Access and scoping
  1. 01Input

    Branch records

    Slug, address, coordinates and delivery settings

  2. 02Database

    Roles

    Head office admin and staff, franchise admin, branch staff, supplier, business, customer

  3. 03Deterministic

    Row-level security

    Security-definer role and branch helper functions

  4. 04Output

    Scoped view

    Branch roles see their branch; head office sees all

Guardrails and fallbacks

  • Branch-scoped roles constrained in the database, not the interface
  • Branch staff attachments checked by helper functions

Franchise & multi-branch hub, data flow, generated from the shared GoGee feature diagram template.

Roles, and what each one can reach

The role list grew with real client requirements rather than being designed in the abstract: customer, staff and admin at the base, then developer, then business and business-pending for trade accounts, then client admin, head office admin, head office staff and franchise admin, then supplier and catalogue manager.

Application code separates global roles from branch-scoped roles. Head office roles operate across all branches; franchise admin and branch staff are branch-scoped and their queries are constrained to their own branch. On login, a branch-scoped user lands on their own branch view while head office lands on a global dashboard.

The database enforces the boundary

Policies on inventory, orders and order lines are written using security-definer helper functions that answer two questions: does this user hold this role, and is this user staff at this branch. Those helpers are used inside the policy conditions rather than joins being re-written per table.

The result is that scoping does not depend on a developer remembering to add a filter to a new screen. A missing filter returns fewer rows, not another franchisee's data.

  • Role checks and branch-membership checks are reusable database functions
  • The same pattern governs inventory, orders, pricing tiers and variants
  • New admin screens inherit the boundary automatically

What branch scoping feels like in practice

Stock import is the clearest example. A head office user maps a spreadsheet's store column across many branches. A franchise-only user does not see the store column at all, the import is forced to their single assigned branch, and the mapping step disappears.

That is the correct behaviour for a franchise tool: fewer decisions for the franchisee, no possibility of importing into the wrong store, and no training required to explain which store code is theirs.

One platform, many storefronts

Because pricing overrides, stock and promotions are branch-scoped, one deployment can present branch-specific storefronts that inherit head-office rules. Central creative and catalogue, local price and stock reality.

It is worth being precise about the model: a franchise is a role-and-permission concept layered on branch records, not a separate hierarchy table. In practice that keeps reporting simple, because every number rolls up through branches.

Questions we get asked

Can a franchisee see another franchisee's sales?

No. Branch-scoped roles are constrained at the database level by row-level security, not merely hidden in the interface.

Can head office push a promotion to selected branches only?

Yes. Promotions, pricing and announcements are branch-scoped, so a campaign can target one branch, a region or the whole network.

How do new franchisees get onboarded?

Branches are created in the admin with their address, delivery settings and staff attachments, and each user is given a branch-scoped role. Bulk CSV creation of franchises is not part of the platform today.