Billing Rules (Advanced)
Billing Rules (Advanced)
Billing Rules automatically adjust charges or invoice totals while preserving the original usage data.
All rule activity is logged for auditability.
Rule Scope & Targeting
Group, Project or Project Type Based Rule Application
In addition to the parameters listed for each individual Rule below - ALL BILLING RULES accept the following parameters
These parameters can be used to explicitly control rule application based the Group, Project, or Project Type associated with the Charge or Invoice. Using both includex and excludex parameters in the same rule may produce unexpected results.
Best Practice
Avoid using include and exclude parameters together in the same rule.
Charge Rules β Detailed Behavior
Charge Rules Timing
Charge Rules are evaluated at the moment a Charge is generated from a Usage Record.
They modify the billed quantity only β the original usage is always preserved for analytics and auditing.
Charge rules modify the billed quantity, never the actual usage.
Supported Charge Rules
| Rule | Description | Parameters |
|---|---|---|
| Cap Quantity | Maximum quantity charged | cap |
| Cap Per Interval | Caps usage per time interval | cap interval |
| Minimum Quantity | Enforces a minimum charge | minimum |
| Round Up to Booking | Bills booked time instead of actual | |
| Scale Quantity | Scales quantity by a factor | factor cap |
| Grace Period | Skips charges below threshold | grace |
Charge Rules apply only to time-based units (Minute, Hour, Day).
They may be scoped by Rate, Rate Group, Project, Project Type, or Team.
Cap Quantity
Parameters: cap
Purpose:
Limits the maximum quantity that can be billed for a single charge.
How it works:
If the actual usage exceeds the specified cap, the billed quantity is reduced to the cap value.
- The cap is evaluated after unit conversion
- Actual usage is retained, but billing is limited
Typical use cases:
- Daily maximum billable hours
- Flat-rate caps for long-running usage
- Preventing runaway billing
Example:
cap = 8 hours
Usage = 10 hours
Billed Quantity = 8 hoursCap Quantity Per Interval
Purpose:
Caps billable quantity per repeating time interval, rather than globally.
How it works:
Usage is segmented into intervals (for example, days), and the cap is applied independently to each interval.
- Remaining partial intervals are billed at actual usage
- Useful for multi-day usage records
Typical use cases:
- Maximum billable hours per day
- Shift-based billing limits
- Long bookings spanning multiple days
Example:
cap = 8 hours
interval = 1 day
Usage = 76 hours over 4 days
Billed:
Day 1: 8 hours
Day 2: 8 hours
Day 3: 8 hours
Day 4: 4 hours
Total Billed = 28 hoursMinimum Quantity
Parameters: minimum
Purpose:
Ensures a minimum billable amount, even for short usage.
How it works:
If the actual usage is less than the minimum, the billed quantity is raised to the minimum value.
- Actual usage remains unchanged
- Billing reflects the minimum commitment
Typical use cases:
- Minimum booking durations
- Setup or access minimums
- Preventing micro-charges
Example:
minimum = 1 hour
Usage = 15 minutes
Billed Quantity = 1 hourRound Up To Booking Time
Purpose:
Ensures users are billed for what was booked, not just what was used.
How it works:
The billed quantity becomes the greater of:
- Actual usage
- Booked duration
This rule compares usage against the associated booking record.
Typical use cases:
- Reserved equipment
- High-demand shared resources
- Discouraging early release abuse
Example:
Booked Time = 2 hours
Actual Usage = 1.25 hours
Billed Quantity = 2 hoursScale Quantity
Purpose:
Applies a scaling factor to the billed quantity, optionally bounded by a cap.
How it works:
- If a cap is provided, scaling applies only if usage exceeds the cap
- If no cap is provided, scaling always applies
- Scaling occurs before final billing
Important:
After scaling, the billed quantity may still exceed the cap.
Typical use cases:
- Partial discounts on overages
- Graduated billing
- Penalty or incentive models
Example:
factor = 0.5
cap = 10 hours
Usage = 12 hours
Scaled Quantity = 6 hours
Billed Quantity = 6 hoursGrace Period
Parameters: grace
Purpose:
Prevents billing for very short usage periods.
How it works:
If the actual usage is less than the grace period, no charge is generated.
- No charge record is created
- Usage remains visible for analytics
Typical use cases:
- Short test usage
- Accidental starts
- Tolerance windows
Example:
grace = 15 minutes
Usage = 10 minutes β No charge generated
Usage = 20 minutes β Charged normallyInvoice Rules β Detailed Behavior
Invoice Rules Timing
Invoice Rules are applied only when an Invoice is generated.
They modify the final invoice total, not individual charges.
Supported Invoice Rules
| Rule | Description | Parameters |
|---|---|---|
| Cap Total | Maximum invoice total | maximum |
| Scale Total | Scales invoice total | factor maximum |
Invoice Totals
Invoice totals may not equal the sum of charges when invoice rules are applied.
Invoice Rules preserve charge integrity and auditability while allowing controlled financial adjustments.
Cap Total
Parameters: maximum
Purpose:
Limits the maximum amount that can be invoiced.
How it works:
If the sum of all charges exceeds the specified maximum, the invoice total is reduced to the cap.
- Individual charges are unchanged
- The invoice reflects the capped total
Typical use cases:
- Contractual maximums
- Fixed-price agreements
- Budget enforcement
Example:
maximum = $10,000
Charges Total = $12,500
Invoice Total = $10,000Scale Total
Purpose:
Scales the invoice total by a factor, optionally bounded by a maximum.
How it works:
- If a maximum is provided, scaling applies only when exceeded
- If no maximum is provided, scaling always applies
- Scaling occurs after all charges are summed
Important:
Scaling may still result in a total greater than the maximum, depending on configuration.
Typical use cases:
- Percentage discounts
- Subsidies
- Internal cost-sharing models
Example:
factor = 0.8
Charges Total = $5,000
Invoice Total = $4,000Additional Examples
Example 1: Flat Percentage Discount (No Maximum)
Scenario:
Apply a 20% discount to every invoice, regardless of total.
factor = 0.8
maximum = (not set)
Charges Total = $5,000
Invoice Total = $4,000Explanation:
Because no maximum is defined, the scaling factor is always applied.
This behaves like a global percentage discount applied to every invoice.
Example 2: Discount Only After a Threshold
Scenario:
Apply a 20% discount only when the invoice exceeds $10,000.
factor = 0.8
maximum = $10,000| Charges Total | Invoice Total | Explanation |
|---|---|---|
| $8,000 | $8,000 | Below maximum β no scaling applied |
| $10,000 | $10,000 | At maximum β no scaling applied |
| $12,000 | $9,600 | Exceeds maximum β scaling applied |
Explanation:
The maximum value defines when scaling begins, not a final cap.
Example 3: Maximum Is Not a Hard Cap
Scenario:
Apply a partial discount after a threshold, but allow totals above the maximum.
factor = 0.9
maximum = $10,000
Charges Total = $20,000Invoice Total = $18,000Explanation:
Even though the maximum is $10,000, the final invoice total exceeds that value.
This is expected behavior.
To enforce a hard ceiling, use Cap Total, not Scale Total.
Example 4: Internal Cost-Sharing Model
Scenario:
Internal projects are billed at 50% of actual cost.
factor = 0.5
maximum = (not set)
Charges Total = $12,000
Invoice Total = $6,000Explanation:
This model is commonly used for internal departments where costs are shared rather than fully recovered.
Example 5: Subsidy Model With Threshold
Scenario:
External funding covers 30% of costs after the first $5,000.
factor = 0.7
maximum = $5,000| Charges Total | Invoice Total |
|---|---|
| $4,000 | $4,000 |
| $5,000 | $5,000 |
| $7,000 | $4,900 |
Explanation:
The subsidy applies only once the total exceeds the funded threshold.
Choosing the Right Rule
- Use Scale Total for percentage-based adjustments
- Use Cap Total for absolute maximums
- Combine rules carefully and document intent for finance and audit clarity
Accounting & Audit Notes
Audit & Compliance
- Actual usage is never modified
- All rule applications are logged
- Charges remain individually auditable
- Invoice totals may not equal charge sums by design :::