Welcome to Zuora Product Documentation

Explore our rich library of product information

Order Delta TCB - Discounts

The Order Delta TCB - Discounts topic explains how Order Delta Metrics calculates the delta of gross and net TCB, factoring in discounts.

Order Delta Metrics uses the GrossAmount field to store the delta of the gross TCB before and after an order is placed, and uses the NetAmount field to store the delta of TCB net of discounts.

Order Delta TCB created with Discount Charges

OrderDeltaMetrics operates at the order action level. This implies that a separate set of delta metric records is created for each order action within an order. When a discount charge is included in an order, the position of the discount order action relative to other order actions determines how the delta metrics are calculated and recorded.

Order Delta Metrics Calculation

Delta metrics represent the difference in TCB before and after each order action is applied, in the sequence they are processed. For each order action:

  • The GrossAmount field represents the change in gross TCB without accounting for any discount.

  • The NetAmount field represents the change in TCB after the discount is applied.

When an order contains both a regular charge and a discount charge, the order in which these actions are added affects how the metrics are distributed across the records.

Example Scenarios

Consider the following charges:

  • C1: A regular charge of $1,000

  • D1: A 10% discount

The following scenarios illustrate how the OrderDeltaTCB records differ depending on the order in which C1 and D1 are added:

Scenario 1: Discount Added Before the Regular Charge (D1 → C1)

When D1 is added as the first order action and C1 is added as the second order action, the system has no charge to apply the discount to at the time D1 is processed. As a result:

  • Order Action 1 (D1): No delta metrics records are generated, because there is no charge for the discount to act upon yet.

  • Order Action 2 (C1): The regular charge is added and the discount is applied simultaneously. Delta metrics are recorded as follows:

Order Action

GrossAmount

NetAmount

D1 (Discount)

-

-

C1 (Regular Charge)

$1000

$900

Scenario 2: Regular Charge Added Before the Discount (C1 → D1)

When C1 is added as the first order action and D1 is added as the second order action, each action is processed independently against the current state of the subscription. Delta metrics are recorded as follows:

  • Order Action 1 (C1): The regular charge is added with no discount applied yet. Delta metrics represents the full charge amount.

  • Order Action 2 (D1): The discount is applied to the existing charge. Delta metrics represents the adjustment introduced by the discount.

Order Action

GrossAmount

NetAmount

C1 (Regular Charge)

$1000

$1000

D1 (Discount)

$0

-$100

The total TCB across both order actions is consistent in both scenarios (Net: $900), but the distribution of delta metrics across order action records differs based on the sequence in which the order actions are added.