The Cargo Billing Engine is what turns your day-to-day warehouse activity into clear, repeatable charges for each customer. Instead of calculating invoices manually, you define Billing Agreements (your commercial rules), and the system uses those rules to automatically calculate what should be billed for a given period—then produces detailed billing lines and a proforma invoice you can review.
At a high level, the engine works by combining: what you bill for (documents, services, holding/storage, or a lump sum), how the billable quantity is measured (for example by count, weight, volume/CBM, days in holding), and when billing runs (monthly, every X days, etc.). Once this is set up, running a billing period follows a consistent workflow: validate the period and agreements, calculate quantities, apply pricing (including tiers), apply VAT and surcharges, and generate billing lines and a proforma invoice.
What you can achieve with Billing Agreements #
A Billing Agreement is where you define the billing rules for a specific client. You can have multiple agreements per client, and you can update them over time using revisions so pricing changes take effect from a specific date without breaking historical billing.
When you set up an agreement, you decide:
- What you are billing for (Agreement Type)
- Lump Sum: a fixed amount per period (e.g., monthly fee)
- Services: charges based on service events you record (e.g., unloading, inspection)
- Documents: charges based on documents processed (e.g., receipts/issues)
- Holding: charges for stock held in storage (often time-based)
- How the system measures the billable quantity (Quantum)
Examples include Count, Actual Units, Volume (CBM), Weight, Line, Days in Holding, or Remaining Units. - How often and when billing happens (Frequency + Billing Date)
You can bill every X days/months/years, or based on an action/event. For monthly billing you can choose rules like first day, last day, or a specific date—and define what should happen if that date doesn’t exist in a month (e.g., “31st” in February).
How pricing is calculated #
Once the engine knows “what” and “how much,” it calculates “how much to charge” using pricing rules set on the relevant revision:
- Pricing Structure
- Flat Rate: one rate for all quantities
- Quantity Based: rates vary by quantity using price scales (tiered pricing)
- Grouping
- Grouped: fewer, combined invoice lines (simpler invoice)
- Individual: more detailed lines (more transparency)
- Minimum/Maximum line charges and Force minimum on zero
These protect revenue and enforce contract rules—for example ensuring you never bill below a minimum charge even when activity is low. - Surcharges and VAT
Surcharges add extra fees when applicable, and VAT is applied automatically based on the VAT settings.
Revisions: how you handle price changes correctly #
If contract terms change, you don’t overwrite the existing agreement—you create a new revision with a start date, set the new pricing, and mark it ready to use. This is how the system can correctly apply different rates within the same billing period when needed.
Processing a billing period (what happens when you run billing) #
When you process a billing period (e.g., “January 2026” for a client), the engine follows a predictable flow:
- Create or select the billing period for the partner/client.
- Run a pre-process check to catch setup issues early (for example, no valid signed revision).
- Process the period, where the system:
- validates again,
- clears any previously generated lines for the period,
- finds active agreement revisions for the relevant date range,
- calculates billable units, applies pricing scales, VAT, and surcharges,
- and generates billing lines.
- Review the billing lines to understand exactly what was billed and why.
- Generate the proforma invoice, which sums billing lines into a draft invoice for review/finalisation.
Examples of common billing setups #
- Monthly storage billing: Holding + Days in Holding + monthly at month end → system counts how long items were stored and bills accordingly.
- Per-service billing: Services + Count → system counts service events and applies the relevant rate or tiers.
- Document processing fees: Documents + Count → system counts documents processed and bills per document.
Common issues and how users resolve them #
- “No eligible agreements” / validation errors: usually means there isn’t at least one valid (signed) revision covering the billing period. Add or correct a revision and retry.
- Specific billing dates in short months: set the date exception rule so the system knows whether to bill on the previous available date or the next available date.
