Generation rules and examples of Charge Metrics object
This article explains the rules for generating the Charge Metrics object and includes examples of various scenarios for generating Charge Metrics objects, such as subscription creation or modification.
Generation rules
The Charge Metrics object is typically generated when subscription rate plan charges (RPCs) are created or updated. Zuora follows these rules when generating the Charge Metrics object:
- Each Charge Metrics object is linked to a specific service period within a subscription.
- If multiple RPCs with identical charge details exist for a service period, the Charge Metrics object is associated with the earliest created RPC.
- If multiple RPCs with different charge details exist for a service period, the Charge Metrics object is associated with the most recently modified RPC.
Example 1: Create a subscription with a single charge
As shown in the following table, a subscription is created with a single charge.
Subscription number | Charge number | RPC ID | Charge start date | Charge end date |
---|---|---|---|---|
S1 | C1 | RPC1 | 01/01/2025 | 01/01/2026 |
When the subscription is created, Zuora creates a Charge Metrics object for the charge. The charge metrics start and end dates are the same as the charge start and end dates.
Charge metrics | RPC ID | Amendment type | Charge metrics start date | Charge metrics end date |
---|---|---|---|---|
M1 | RPC1 | Composite | 01/01/2025 | 01/01/2026 |
Example 2: Create a subscription with multiple charges
As shown in the following table, a subscription is created with two charges.
Subscription number | Charge number | RPC ID | Charge start date | Charge end date |
---|---|---|---|---|
S1 | C1 | RPC1 | 01/01/2025 | 01/01/2026 |
C2 | RPC2 | 01/01/2025 | 01/01/2026 |
When the subscription is created, Zuora creates a Charge Metrics object for each charge. The charge metrics start and end dates are the same as the charge start and end dates.
Charge metrics | RPC ID | Amendment type | Charge metrics start date | Charge metrics end date |
---|---|---|---|---|
M1 | RPC1 | Composite | 01/01/2025 | 01/01/2026 |
M2 | RPC2 | Composite | 01/01/2025 | 01/01/2026 |
Example 3: Update a subscription
When you update a subscription to modify charge details, for example, adjusting charge prices, changing subscription terms, or removing charges, Zuora might generate Charge Metrics objects during these modifications.
The example in this section demonstrates how Zuora manages the Charge Metric object during different types of subscription modifications.
Step 1: Create a subscription with a single charge
As shown in the following table, a subscription is created with a single charge.
Subscription number | Charge number | RPC ID | Price (per month) | Charge start date | Charge end date |
---|---|---|---|---|---|
S1 | C1 | RPC1 | $100 | 01/01/2025 | 01/01/2026 |
When the subscription is created, Zuora creates a Charge Metrics object (M1
) for RPC1
. The charge metrics start and end dates are the same as the charge start and end dates.
Charge metrics | RPC ID | Amendment type | Gross MRR | Charge metrics start date | Charge metrics end date |
---|---|---|---|---|---|
M1 | RPC1 | Composite | $100 | 01/01/2025 | 01/01/2026 |
Step 2: Update the charge price
When you update the charge price from $100
to $120
for the service period from 06/01/2025
to 01/01/2026
, Zuora generates RPC2
for the first service period from 01/01/2025
to 06/01/2025
and RPC3
for the second service period from 06/01/2025
to 01/01/2026
.
Subscription number | Charge number | RPC ID | Price (per month) | Charge start date | Charge end date |
---|---|---|---|---|---|
S1 | C1 | RPC2 | $100 | 01/01/2025 | 06/01/2025 |
C1 | RPC3 | $120 | 06/01/2025 | 01/01/2026 |
As part of this product update, Zuora updates the charge end date of the Charge Metrics object (M1
) to 06/01/2025
. The object remains linked to RPC1
because both RPC1
and RPC2
include the same service period with identical sell prices and RPC1
was created before RPC2
.
Zuora also generates a new Charge Metrics object (M2
) for RPC3
.
Charge metrics | RPC ID | Amendment type | Gross MRR | Charge metrics start date | Charge metrics end date |
---|---|---|---|---|---|
M1 | RPC1 | Composite | $100 | 01/01/2025 | 06/01/2025 |
M2 | RPC3 | UpdateProduct | $120 | 06/01/2025 | 01/01/2026 |
Step 3: Update the subscription term
When you change the subscription term from 12 to 13 months, Zuora generates RPC4
and RPC5
. The charge details of RPC4
are the same as RPC2
. The only difference between RPC5
and RPC3
is their charge end date.
Subscription number | Charge number | RPC ID | Price (per month) | Charge start date | Charge end date |
---|---|---|---|---|---|
S1 | C1 | RPC4 | $100 | 01/01/2025 | 06/01/2025 |
C1 | RPC5 | $120 | 06/01/2025 | 02/01/2026 |
As part of this term update, Zuora generates a new Charge Metrics object (M3
) for RPC5
. The charge metrics start date of M3
is 01/01/2026
because the service period from 06/01/2025
to 01/01/2026
is included in M2
.
Note that M2
remains linked to RPC3
because RPC3
and RPC5
overlap during the service period from 06/01/2025
to 01/01/2026
with identical sell prices. As a result, RPC3
is selected because it was created before RPC5
.
Charge metrics | RPC ID | Amendment type | Gross MRR | Charge metrics start date | Charge metrics end date |
---|---|---|---|---|---|
M1 | RPC1 | Composite | $100 | 01/01/2025 | 06/01/2025 |
M2 | RPC3 | UpdateProduct | $120 | 06/01/2025 | 01/01/2026 |
M3 | RPC5 | TermsAndConditions | $120 | 01/01/2026 | 02/01/2026 |
Step 4: Remove the product
When you schedule a product removal for 10/01/2025
, Zuora generates RPC6
and RPC7
. The charge details of RPC6
are the same as RPC2
and RPC4
. The only difference between RPC7
and RPC5
is their charge end date.
Subscription number | Charge number | RPC ID | Price (per month) | Charge start date | Charge end date |
---|---|---|---|---|---|
S1 | C1 | RPC6 | $100 | 01/01/2025 | 06/01/2025 |
C1 | RPC7 | $120 | 06/01/2025 | 10/01/2025 |
As part of this product removal, Zuora updates the charge metrics end date for M2
and generates a new Charge Metrics object (M4
) for RPC7
. The gross MRR value of M4
is $0
.
The Charge Metrics object M3
, which links to RPC5
, is deprecated because its service period is overridden by RPC7
.
Charge metrics | RPC ID | Amendment type | Gross MRR | Charge metrics start date | Charge metrics end date |
---|---|---|---|---|---|
M1 | RPC1 | Composite | $100 | 01/01/2025 | 06/01/2025 |
M2 | RPC3 | UpdateProduct | $120 | 06/01/2025 | 10/01/2025 |
M4 | RPC7 | RemoveProduct | $0 | 10/01/2025 | 02/01/2026 |
In this example, Zuora generates a total of seven RPCs. After the last step, only three of them have corresponding Charge Metrics objects.