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.
  • Set start and end dates to restrict when a rule applies.
  • Create one-time or recurring (daily) execution schedules.
  • 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 based on a predefined adjustment list.
  • Back Out Line Item: Remove or reverse specific billing line items.
  • 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: TheOperating 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.
  • Optionally applying an offset percentage to the list rate. A positive offset represents a markup, while a negative offset represents a discount.

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.

Adjust to List

Back Out Line Item

The Back Out Line Item rule removes or nullifies specific billing line items so they are excluded from downstream billing views and reports. This rule is used when certain charges should not be reflected in cost reporting or tenant-facing views. Configuration includes:

  • Defining filters to match the billing line items that should be removed, using dimensions such as service, SKU, project, or other supported attributes.
  • Automatically excluding all matching entries from subsequent billing calculations and reports.

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.

Back out line item rule

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:

  • Defining the cost origin, including the grouping dimension (such as vendor, service, or project) and optional filters to scope the source costs. Source costs are automatically 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
    FieldDescription
    MeasureBasis for calculating dynamic shares (e.g., Cost, Usage Quantity)
    Minimum Share (Optional)Exclude targets that fall below a defined threshold
    Weighting KeysDimensions like Project, Service, or Environment to 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%

  • Configuring rule execution, either as a one-time run for retroactive corrections or as a scheduled daily rule that updates current and recently closed invoice periods.

Rerate

The Rerate rule adjusts billing amounts by applying a percentage offset to existing costs or credits. Unlike Adjust to List, this rule modifies values relative to their current base and does not reset pricing to cloud provider list rates. Configuration includes:

  • Select the base metric to adjust, such as Billed Cost or Absolute Credits.
  • 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. Rules can be removed at any time to fully reverse their impact. Once the rule is saved, the allocation can be viewed as a report from the Billing Rules Engine management table.

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.