Fuel is a published fact that disagrees by carrier more often than finance wants. The naive design is one table plus "overrides." Overrides go sparse. Sparse tables get filled from the parent. Suddenly a carrier you listed on a premium branch is priced off Default because Thursday's row was empty.
Sonic's design is blunter — and easier to audit.
Default vs branch — complete tables, not overlays
Every rate index has Default values: a dated series used when no branch claims the carrier.
Optional branches list carrier ids and carry their own complete value series. A carrier belongs to at most one branch. Rating on a contract passes that contract's carrier_id and asks:
- Is this carrier listed on a branch? → use that branch's table.
- Otherwise → use Default.
- Is there a value on the chosen table for the shipment date? → apply it.
- No row for that date? → skip (gap stays a gap).
There is no "try branch, then quietly use Default for missing dates." A missing date on the chosen series does not fall back to the other table.
Operator workflow
| Action | What happens |
|---|---|
| New branch | Creates Branch N at the top of the picker |
| Rename | In-field, with the pencil beside the chevron |
| Remove branch | Sits on the Branch label row; hidden on Default. Removed carriers return to Default |
| Publish | Do it Thursday, before you rate Thursday's hauls |
Draft invoices recompute when you save the index. Issued invoices keep what they were billed. That pairing matches frozen sent invoices everywhere else on the chain.
How branches show up on invoices
Rate index inputs appear as compact labelled values above shipment charge lines on the invoice — the numbers the formulas actually used. If fuel skipped because the series had no date, the formula should reflect that absence, not a guessed parent value.
Mapping preview and production upload both pass the contract carrier into rating so branch selection is consistent from sample to live file.
Example mental model
Imagine two carriers on one contract family:
| Carrier | Branch assignment | 3 Oct fuel row |
|---|---|---|
| Carrier A | Default | 92.40 |
| Carrier B | Premium branch | (empty) |
Carrier B on 3 October does not inherit 92.40 from Default. Fuel surcharge for that haul either omits the index term or fails rating visibly — depending on formula structure — but it does not silently cross tables.
That is the difference between "we forgot to publish" and "the system guessed."
Watch out for
- Branches are whole tables. Do not treat them as sparse diffs against Default.
- One carrier, one branch. Listing the same carrier on two branches is a configuration error to fix before go-live.
- Gaps are operational signals. Publish the date or accept that formulas without fuel will rate without it.
- Issued freight stays frozen. Fixing a branch table fixes drafts and future invoices, not customer inboxes from last week.
- Contract period bounds still apply. An expired contract term is not used as a fallback rate source.