Billing Rules Engine (f.k.a Cost Allocation)
Learn how the Ternary Billing Rules Engine enables cost allocation, chargeback, showback, and cost redistribution by applying business rules to cloud billing data for accurate financial reporting.
The Ternary Billing Rules Engine enables organizations to apply rule-based logic to cloud billing data in order to support chargeback, showback, cost redistribution, and internal billing workflows. It allows teams to reshape raw cloud costs to reflect business ownership, shared services, internal pricing models, and financial accountability requirements.
Cost Allocation in Ternary has been consolidated into the Billing Rules Engine as a dedicated rule type called Reallocate Costs. This unification brings direct customers access to additional rule types previously available only in MSP workflows, expanding the range of supported billing and cost transformation scenarios.
The Billing Rules Engine allows users to:
- Define multiple rule types to support varied allocation or cost transformation logic.
- Define effective dates for asynchronously processed billing rules.
- Filter source costs using labels such as project, team, or environment.
- Reallocate costs using static proportions or dynamic weighting.
Billing Rules Engine can be accessed from the Cost Assist section in the left-hand navigation menu.
Creating a new billing rule in Ternary
Step 1: Create a rule
From the Billing Rules Engine, select Create Rule to begin configuring a new billing rule.
Step 2: Define rule details
Provide the basic rule metadata that controls identification and applicability:
- Name: A clear, descriptive name that reflects the rule’s intent (for example, redistributing shared support costs).
- Start Date: The date from which the rule becomes effective.
- End Date: The last date the rule applies. Leave blank for ongoing rules.
Step 3: Select a rule type
Choose a rule type from the Type dropdown. The selected rule type determines the configuration options shown in subsequent steps. Supported rule types include:
- Adjust to List: Adjust cost values to cloud provider list prices.
- Back Out Line Item: Offset matching billing line items with negative adjustments.
- Reallocate Costs: Redistribute costs from one group to one or more targets.
- Rerate: Apply a new rate to selected cost line items (eg, internal transfer pricing).
Note: The Operating Margin rule is available for MSPs only. View MSP Billing Rules Engine for more details. Additionally, the Reallocate Costs rule is only available for direct and channel customers, and not MSPs.
Each rule type triggers a different UI configuration below based on the selected option.

Step 4: Rule-specific configuration
After selecting a rule type, the configuration panel updates to reflect the selected billing logic. Each rule type exposes a different set of fields used to transform or redistribute costs.
Adjust to List
The Adjust to List rule normalizes billing amounts to cloud provider list prices, regardless of the actual invoiced cost. This rule is commonly used when reporting or billing must reflect public pricing instead of negotiated or discounted rates. Configuration includes:
- Automatically resetting the base rate to the cloud provider’s list price.
- Apply optional source filters to select the eligible costs. Adjust to List has no percentage-offset setting.
Adjust to List rules are typically used to present standardized list pricing, support rebate or discount calculations, or ensure pricing consistency across tenants or reports.

Back Out Line Item
Back Out Line Item retains imported records and adds negative adjustments that offset their matching amounts and quantities in combined results. Original rows can remain visible in source-level reports. Configuration includes:
- Define at least one source filter to match billing line items, using dimensions such as service, SKU, project, or other supported attributes.
- Offset matching amounts and quantities with negative adjustments in combined results.
Back Out Line Item rules are commonly used to remove internal service charges, exclude experimental or non-billable services, back out refunded credits, or omit managed service fees that are billed through separate processes.

Reallocate Costs
The Reallocate Costs rule redistributes cloud costs from a defined source scope to one or more target scopes. This rule is used to assign shared or indirect costs to the teams, projects, or services responsible for consuming them, while preserving the original total cost footprint. Configuration includes:
-
Define the source costs using at least one complete source filter. These source filters are required. Optional dynamic usage filters separately select the data used to calculate allocation weights. Source costs are offset using inverse entries to maintain balance.
-
Selecting a cost destination method, using either dynamic or static weighting.
- Dynamically weighted allocation distributes costs based on relative consumption

Field Description Measure Basis for calculating dynamic shares (e.g., Cost,UsageQuantity)Weighting Keys Dimensions like Project,Service, orEnvironmentto distribute based on-
Statically weighted allocation distributes costs using fixed percentages by explicitly defining each target and its associated weight. Example:
Project ID = 123 → 25% Project ID = 456 → 75%
-
Set the rule's effective dates. Saving starts asynchronous processing; the authoring flow has no one-time or daily execution-schedule control. Monthly or Daily weight granularity selects the period used to calculate allocation weights, not an execution schedule.
When configuring allocation in the rule editor:
- Static shares must be positive and total 100%; only selected destination dimensions change.
- Dynamic allocation uses FOCUS billing usage grouped by your chosen dimensions. Monthly weights are the default; Daily uses each UTC day.
- An optional fallback receives cost that usable weights cannot allocate; without it, that cost remains on the source. Fallback cannot compensate for usage missing from telemetry.
- A saved multi-dimension fallback is read-only in the UI; retain its grouping dimensions or disable fallback before saving.
- The rule editor does not expose a minimum-share input. New rules use zero; edits through this form preserve the stored value.
Rerate
Rerate applies a percentage adjustment to the selected costs or credits. When Billed Cost and the Rerate configuration's Adjust to List option are selected and list cost is available, the billed total uses list cost multiplied by one plus the percentage. If list cost is absent, the percentage applies to billed cost. Without Adjust to List, the current billed amount is the basis. Configuration includes:
- Select the base metric to adjust, such as Billed Cost or Absolute Credits.
- Optionally select Adjust to List within the Rerate configuration, using the basis described above.
- Define a positive or negative percentage offset. For example, a +10% offset increases prices by 10%, while a -15% offset applies a 15% discount.
Rerate rules are commonly used to apply negotiated customer discounts, reflect exchange rate adjustments, or introduce temporary pricing changes such as time-bound promotions or internal pricing updates.

Step 5: Review and save
Review the rule configuration to ensure accuracy. Once saved, the rule becomes version-controlled, auditable, and tenant-specific.
After saving, the rule enters Processing. View as Report becomes available from the management table only when the rule is Active. Processing can fail; a successful save does not mean that the allocation is already available in reports.
Deleting a rule removes its definition and starts asynchronous cleanup of generated billing rows. Reports may not refresh immediately. Reversal of its reporting effects follows that cleanup.

What are the use cases of Billing Rules Engine in Ternary
Billing rules are commonly used to reshape raw cloud costs so they align with internal ownership, accountability, and financial reporting needs. Common use cases include:
- Charging shared services: Allocate centralized costs, such as platform tooling, security services, or support fees, across business units or teams based on defined allocation logic.
- Backing out failed or invalid discounts: Remove or reverse cost line items that should not be reflected in reporting due to billing errors, misapplied discounts, or one-off adjustments.
- Applying internal transfer pricing: Rerate costs to apply internal markups, cost recovery models, or standardized pricing for internal consumption and chargeback scenarios.
- Supporting showback for engineering usage: Redistribute infrastructure costs based on actual product, service, or workload usage to improve cost visibility and accountability without direct chargeback.
Updated 6 days ago
