Branches and the branch locator¶
A branch is a physical location of a member company — a store, depot, or office. Branches exist so a company's sites can be mapped and found; the main surface is the branch locator, a searchable map of member branches.
What a branch is¶
A branch record holds identity and location only: name, internal
reference, address, town/county/postcode, map coordinates, phone/fax/
email/web, a contact, and tags. Each branch belongs to a parent company
(company_id), and its join/leave dates come from that parent
company — branches have no membership dates of their own. A branch is
"active" when its company is currently a member.
Branches carry no financial data. Turnover, rebates, and deal participation are all recorded at the company level, never per branch. The one place a branch appears to have a value is the dashboard heatmap, which spreads a member's total spend evenly across its mapped branches purely for map weighting — it is a visualization artifact, not stored per-branch turnover.
The branch locator¶
The locator (/branch/map) shows member branches as a map and a
list, with a postcode + radius search to find branches near a point.
It draws only from member companies (type 3) whose membership is
current. The map pulls all matching branches at once; the list is paged.
Filters by member company and tag are available.
Clicking a branch opens a detail panel with its address, contact, company join/leave dates, a satellite map, and cards for the company's other branches (the sibling locations). That sibling list is computed when a branch is indexed for search, not fetched per-request.
How branches are maintained¶
Branches are created and edited in the branch editor (/branch/edit),
which captures the identity/address/contact/tag fields above and a
selected contact from the company. Map coordinates are geocoded in the
browser and saved with the record — there is no server-side geocoding.
Saving re-indexes the branch (and recomputes its sibling list) for the
locator.
Who can see and edit branches¶
The branch endpoints (view, search, save, delete) require only a valid login — there is no server-side role or ownership check. Any gating on who sees the map or edits a branch is enforced only by the front end.
Why does the branch locator change unexpectedly¶
- A branch disappeared from the map — its parent company's membership lapsed (leave date passed) or hasn't started (join date in the future); the locator shows only current members.
- A branch's siblings look stale after an edit — the sibling list is recomputed at index time; a just-saved branch reindexes, but related branches update on their own next save/reindex.
- A branch isn't on the map but is in data — it may lack valid coordinates, or its company is not a member (type 3).
What a branch is not¶
- Not a company — a branch rolls up to a member company and has no financial identity of its own.
- Not a participant in deals — participation is per company; see Editing deal core details.
- Not a turnover unit — figures are entered against the company, not the branch.
Related pages¶
- Editing deal core details — company participation and membership dates
- The deal spend view — company-level turnover