Project · 2026
First Pricing Framework
A freight rate is a bet on fuel, currency, tariffs, network balance and a competitor's next bid, signed months before any of them settle. This platform turns those exposures into a price that can be explained line by line, approved by the right person, and measured afterward against what the business actually earned.
01 Overview
One waterfall, every division
Pricing in a multi-division carrier usually lives in four places at once. Truckload prices off a cost sheet, brokerage off the spot board, dedicated off a capital model and warehousing off square footage, and none of them agree on what a margin is or who may approve a thin one. Discounts get negotiated deal by deal, and nobody can say afterward which concessions paid for themselves.
The name is literal. This is where the first price comes from: the initial quote on a lane, the first landed cost of an imported item or the first finished cost of a manufactured one, the number every later negotiation, approval and margin review is measured against. I built the platform around a single rule: every quote, in every division, is built and explained the same way. Activity-based operating cost, then the network adjustment for repositioning and backhaul, then Canada, United States and Mexico border costs, then the risk premiums for fuel, currency, tariff-driven volume loss and carrier buy rates, then margin, then market positioning, with the fuel surcharge shown separately. Each premium names the contract term that removes it, so a negotiation becomes a trade of terms rather than a haggle over a number.
Around that waterfall sit the parts that make it an operating system rather than a calculator: a governance layer that decides who may approve what, a bid workflow that takes an RFP from intake to implementation, profitability analytics that check whether the prices that were approved are the prices that were billed, and a pass-through study that turns a tariff increase into a selective, governed price plan for each SKU and customer segment instead of one blunt percentage.
A discount that cannot name the risk it gives back is not a pricing decision. It is a leak.
02 Inside the tool
Seven screens, one pricing run
The dashboard, the costing form and the batch import, captured from the demonstration run. The screens follow the language and theme you are reading in.
Synthetic demonstration data. Select the centre image to open it full size.
03 What it does
From cost basis to closed loop
Price it, govern it, win it, then measure whether it earned what it promised.
Pricing engine
Cost models per method: driver, fuel, equipment and overhead on loaded and expected empty miles for asset truckload, expected buy rate for brokerage, seats and site management for dedicated, space and labor for warehousing. Network repositioning, border crossings, risk premiums and margin or return-on-assets targets complete a full price waterfall.
Market-calibrated optimization
Win probability is logistic in price relative to the market benchmark, with steepness and midpoint calibrated from bid outcomes. The recommended price maximizes win probability raised to one strategy weight times contribution, so growth, defence and margin postures are a single auditable parameter instead of ad-hoc discounting.
Governance and approvals
Margin floors by division and customer segment, a five-level delegation-of-authority matrix on both margin shortfall and annual revenue, and policy flags for below-floor margins, missing fuel surcharges, currency exposure and outsized rate increases. The requester can never approve their own price, and every decision is written to a SHA-256 hash-chained audit log.
Bid and RFP lifecycle
Intake, validation, pricing, cross-functional review from Operations, Brokerage, Finance and Sales, approval, submission, award and implementation, each behind a stage gate. Bid lanes are layered onto the network before pricing, capacity overflow is routed to brokerage, and turnaround is tracked against service standards.
Profitability and leakage
Margin, operating ratio and return on assets by network, division, customer, lane, market and corridor. Seven detectors surface money already lost: rate non-compliance, fuel surcharge under-recovery, unbilled accessorials, below-floor accounts, below-market contracts, margin erosion and excess empty miles, ranked by annual value in an executive dashboard.
Product and landed costing
Beyond freight, the same engine prices goods. In-house finished cost with bill of materials, labor, overhead absorption, set-up, yield and tooling amortization, or imported landed cost under all eleven Incoterms 2020 rules with customs valuation, duties and import taxes for Canada, the United States and Mexico, priced through the same approval path.
Excise duties and GST codes
The CBSA sync also loads the excise duty and tax codes linked to each tariff number, the GST codes, and the tariff numbers not subject to GST. Landed cost applies the chosen excise code, per litre, per thousand, per item or as a share of duty-paid value, includes it in the GST base, and honours GST exemptions line by line, warning when a code can apply but none was chosen.
Tariff cost shock and surcharges
Tariff changes are matched to the item master by HS code and origin and to saved landed costings, giving each SKU its expected cost increase. A scored checklist on certainty, duration, breadth and size decides between a surcharge, a list-price increase or a hybrid, and each increase is split so the surcharge tracks the cost it names, with one rate and a removal trigger per measure.
Elasticity and selective increases
Invoice history is cleaned with every exclusion reported, then price elasticity is estimated per SKU on a mix-adjusted price index and shrunk toward its category. Increases go in small steps to the SKU and segment cells that recover the most margin per dollar of volume at risk, compared with absorbing, an across-the-board rise and dollar-for-dollar pass-through, with every cell run through the same approval rules.
04 Under the hood
Policy as data, math as code
The platform is a Python package with typed Pydantic models from end to end. Every policy number, from margin floors and segment flex to approval limits, rule thresholds, cost-model parameters and service standards, lives in a versioned YAML configuration that a company overrides rather than edits, and every governance decision records the policy version that produced it. Adding a division is a configuration change; adding a new pricing method is one cost model and one basis builder, because the waterfall, optimizer, approvals, profitability and reporting layers do not know which method they are handling.
The same facade drives three surfaces. A command-line tool prices a lane, prints reports and runs an end-to-end demonstration on synthetic data. A FastAPI service exposes quotes, bids, approvals, profitability, renewals and the audit trail. Browser forms for product costing and bulk CSV import persist items and costings in SQLite so a team can share one running instance. The executive dashboard is a single self-contained HTML file with inline SVG charts and light and dark themes. The dashboard, the costing form and the bulk import run in English and French: the engine works in English and a translation layer at the edge renders labels, warnings, policy flags and findings in French with French number formatting, while a test fails the build if a covered scenario produces a sentence the catalog cannot translate. The pass-through study is a command-line and API workflow whose report is in English for now.
Duty rates come from live government sources rather than a bundled table: a connector to the U.S. International Trade Commission HTS REST API and another to the CBSA Customs Tariff API that also brings in excise and GST codes, each parsing defensively and reporting what it cannot read instead of guessing. A suite of 162 tests covers the cost models, risk premiums, optimizer, policy rules, segregation of duties, audit-chain verification, the full bid lifecycle, Incoterms allocation, excise and GST codes, both tariff connectors, the pass-through study and the French translation.
05 What it does not claim
Calibrate before you trust it
Every number bundled with the platform is synthetic or illustrative: cost parameters, margin targets, market rates, fuel prices, exchange rates, distances, tariff scenarios and customers. They exist to exercise the code and to make the demonstration readable. None of them is a market fact, and the defaults have to be replaced with the company's own cost accounting, plan and licensed market data before a single real quote leaves the building.
Several modelling choices are assumptions, stated as configurable parameters rather than hidden constants: how quickly contract rates follow spot, how volume responds to a tariff, the network repositioning heuristic and the typical broker margin. Each should be validated against the company's own history. The win model in particular is only as good as the bid outcomes it is calibrated on; without a market benchmark the platform says so and falls back to cost-plus at target.
The pass-through study states its own limits. Elasticities estimated from sales history are biased toward zero where prices were raised into strong demand and away from zero where they were cut to clear stock, so they are used to rank SKUs and segments by sensitivity, and the largest increases should be tested on a sample of customers first. Volume follows a constant elasticity with no competitor reaction and no switching between substitutes, and the tariff changes in the sample are labelled illustrative and describe no real measure.
It is also honest about its production gaps. Product costing persists to SQLite, but bids, approvals, the rate book and the audit log are held in memory, the API carries no authentication yet, and money is handled as rounded floats suited to quoting and analytics rather than invoicing. Each is documented as a deliberate boundary rather than discovered as a surprise.
A pricing model that never says what it assumes will eventually be trusted for exactly the thing it got wrong.
Decision-support software. All bundled data is synthetic and illustrative. Tariff and duty figures must be confirmed against authoritative trade-policy sources before use.
Price it, govern it, then measure it
The code is private. I am happy to walk through the waterfall, the governance model or the demonstration run on synthetic data.