Setup · branches

Branches and the operating models.

Every shop is a branch. What makes Opticops different is the model underneath: a single branch carries three separate organisation references that let mixed COCO / COFO / FOFO / FICO chains work without spreadsheets.

Adding a branch

Org owners and regional managers can create branches.

  1. Sidebar → Branches+ New branch.
  2. Pick the operating model (next section). This is the most important field and it's hard to change later.
  3. Type the branch code (3-6 letters, e.g. TRI for Tri Nagar) and name (full display name).
  4. Fill the address — at minimum line 1, city, state, pincode. The state matters for GST: the place-of-supply field on every invoice from this branch defaults to this state.
  5. Optional: contact phone, contact email, branch-level GST number, opening hours.
  6. For non-COCO branches: pick the owner organisation, inventory owner, and capital provider. For COCO leave them as your own org.
  7. Save. The branch appears in every operator's branch picker immediately.
Hard to change later: the four organisation references and the operating model are the legal + financial spine of every transaction at this branch. We'll let you edit them but historical reports will still attribute to the original setup. Get them right at create time.

The four operating models

ModelWho owns the buildingWho runs day-to-dayWho funds opex
COCO — Company-Owned, Company-OperatedParent brandParent brandParent brand
COFO — Company-Owned, Franchisee-OperatedParent brandFranchiseeMix (varies by contract)
FOFO — Franchisee-Owned, Franchisee-OperatedFranchiseeFranchiseeFranchisee
FICO — Franchisee-Invested, Company-OperatedFranchisee (or co-invested)Parent brandParent brand

Indian optical chains often run a mix. The branch row has four org references so each one is captured explicitly:

Reference on branches tableWhat it means
organization_idThe org that operates this branch day-to-day. The org whose staff log in and run the counter.
owner_organization_idThe org that owns this branch financially — gets the upside, takes the downside.
inventory_owner_organization_idThe org that owns the stock sitting in this branch. For consignment models, this is the supplier brand, not the operator.
capital_provider_organization_idThe org that put the money in to build / fit out this branch. For FICO, this is the franchisee even though the brand operates.
parent_brand_organization_idThe brand-owning org. Same as owner for COCO; the franchisor for everyone else.
For a pure COCO chain (parent brand owns + operates + stocks + capitalises everything) all five point at the same org. That's the simplest case and the form treats it as the default.

Why the model matters at runtime

Inventory writes

When you receive stock at a branch, the system stamps the receipt with that branch's inventory_owner_organization_id. For a consignment FICO branch, that's the franchisee even though parent-brand staff did the work — so the asset sits on the franchisee's books, not yours.

Sales accruals

Every sale stamps organization_id (operator) + parent_brand_organization_id (whose brand was sold) on the order. The royalty report joins these two and computes what the operator owes the brand for the period.

RLS visibility

A franchisee's customer records, prescriptions, and operational expenses are visible only to the franchisee's org. The parent brand can see aggregated inventory + royalty- relevant sales totals but not who bought what. See franchisee data sovereignty.

Inter-org transactions

Any time value moves across organisation boundaries — franchisee royalty owed to the brand, stock transferred from a parent warehouse to a franchisee branch on consignment, co-op marketing reimbursement, management fee — a row goes into inter_org_transactions automatically. This is the ledger that makes royalty calculations defensible to franchisees: they can ask “why is this number?” and you can show them the exact transactions that built it.

Surfaced in /reports/finance grouped by agreement and period.

Archiving a branch

You can soft-delete a branch from its detail page. The branch stops appearing in pickers and dropdowns; existing orders and inventory remain queryable but the branch is read-only. We snapshot inventory + financial position at the moment of archive so trends reports always include the “branch closed” event.

Archived branches don't free up the branch code. If you want to reopen at the same address with the same code later, un-archive (we keep the row) rather than creating a new one — otherwise your trend lines reset.

Next up

Platform admin

For the Opticops team running white-glove onboarding.