Context
Freight quoting is high-stakes: real money changes hands on every lane. Ocean, air, and trucking each carry distinct rate structures, surcharge triggers, dimensional rules, and customer expectations. Sales wants lightning-fast turnaround, finance demands margin protection, operations insists on feasibility. I’ve built quoting systems where seconds matter and bad assumptions cost thousands.
The real goal isn’t just spitting out a total—it’s creating a workflow that’s fast, transparent, and resilient to inconsistent or incomplete rate data.
Problem
Pricing logic used to live everywhere: shared spreadsheets, personal notepads, remembered carrier quirks, last-minute markup tweaks. Two reps quoting the same shipment could easily land 8–15% apart purely because of different assumptions or stale reference sheets.
This produced three persistent problems:
- Margin enforcement was inconsistent across users and modes
- Routine quotes took far too long to assemble
- Explaining or defending a price during internal review or customer pushback was painful and slow
Some discrepancies only surfaced after the fact—during margin reconciliation or when finance flagged an outlier.
Constraints
Rate sources were messy: contracts, carrier portals, emailed updates, spot quotes—all with varying freshness and reliability. The system couldn’t block quoting every time a source was stale.
Business rules evolved constantly and differed by customer, lane, volume commitment. Hardcoding everything invited regression hell; making everything fully configurable without guardrails invited chaos and opacity.
Users needed controlled flexibility. Pure automation choked on exceptions; pure manual mode reintroduced the original inconsistency.
What I Did
I centralized calculation logic into purpose-built services with clear separation: rate retrieval → charge derivation → markup application → final rendering.
The core became QuoteCalculationsService.ts—a deterministic, mode-aware pipeline that computes base transport, accessorials, and markup in explicit order. Recalculation was always predictable.
I introduced standardized auto-charge rules for common items (fuel surcharges, handling, documentation fees) that varied by mode and scenario. Rules were explicit, overrideable, and captured the override reason for audit.
Workflow improvements focused on speed and confidence:
- Guided input flow that surfaced required fields early
- Real-time margin display as parameters changed
- Safe, auditable override paths
- Reusable lane/mode templates for high-frequency scenarios
Rate-source handling got tighter too:
- Stale/anomalous value flagging
- Explicit source precedence
- Graceful fallbacks when the preferred source was unavailable
Validation & Outcome
I ran parallel validations against known manual quotes across ocean FCL/LCL, air, and truckload scenarios. Discrepancies were triaged into “intentional policy enforcement” vs “actual defects.”
Operationally, I tracked override frequency, override concentration points, and steps that still slowed users down. Key signals:
- Standard scenarios quoted noticeably faster
- Margin became visible during construction, not after
- Override patterns highlighted UX or policy gaps instead of hiding them
- Quote totals stabilized under repeated recalculation
- Audit trails made finance and account manager reviews quicker and less contentious
The modular service design also made future changes safer—new surcharge logic or customer-specific rules could drop in without touching the full quote flow.
Tradeoffs & Lessons
I initially underestimated air-freight long-tail complexity (dimensional weight, carrier-specific rounding, multi-leg legs). Trying to force everything into a single formula mindset created rework I could have avoided with earlier mode-specific branching.
Biggest lesson: define explicit policy boundaries—what’s always automated, what’s user-adjustable, what needs approval. Ambiguity in those lines causes both user frustration and margin leakage.
Another: never bury business intent inside generic helper functions. Pricing logic outlives most code; it stays maintainable when it speaks the same language as policy documents and review conversations.
Next Improvements I’d Prioritize
Attach a pricing decision log to every quote revision—record what changed (base rate, surcharge, markup, override), who did it, and why. This speeds finance reviews, improves rep coaching, and reduces back-and-forth on unusual margins.
Build and maintain a shared scenario library of real-world edge cases (mixed-mode, customer surcharge exceptions, partial rate coverage). Run these before every release to catch policy regressions that unit tests miss. Over time this becomes shared language across engineering, sales ops, and finance.
Give analysts self-service dashboards for rate freshness and anomaly detection so engineering isn’t the bottleneck for basic monitoring.
One small change that drove adoption: exposing a plain-language calculation breakdown next to every total. Users could see exactly where the money moved without needing to decode technical terms. That transparency cut support noise and made policy updates far easier to roll out.
I build quoting and pricing systems that balance automation with the messy reality of freight. If your current workflow is slow, inconsistent, hard to explain, or leaking margin, I can help redesign it around clear contracts, operator speed, and defensible decisions.
FAQ
Questions I usually get about this work.
How do you handle inconsistent rate sources in freight quoting?
I build explicit source precedence rules with staleness flagging and graceful fallbacks so quoting continues even when the preferred source is unavailable, without hiding data quality problems from operators.
Can you reduce pricing inconsistency across sales reps?
Yes. Centralizing calculation logic, standardizing auto-charge rules, and adding real-time margin visibility consistently reduces rep-to-rep variance while preserving the controlled flexibility operators need for exceptions.
Do you rebuild the entire pricing system or work incrementally?
I work incrementally. The goal is to centralize and clarify the most painful paths first, prove the improvement, and expand from there without disrupting revenue workflows.