Skip to main content

On-demand usage rating

Zuora

On-demand usage rating

Zuora supports on-demand usage rating for usage charges that use a per unit, tiered pricing, and volume pricing charge models. This feature supports flexible usage rating schedules by allowing multiple rating opportunities in a billing period. Rating usage more frequently allows your customers to track how much usage they have consumed while allowing you to charge immediately after usage is incurred.

If the charge through date of a usage charge with the tiered charge model is later than the target date of a bill run, the charge is no longer picked up for rating and billing in the bill run. 

Configuring on-demand rating 

Zuora gives you the option to specify whether a usage charge should be billed on-demand or at the end of the usage charge's billing period. Rating for usage occurs when a bill run is executed, and rating is the processing of charges to determine the usage cost. 

The on-demand rating option allows you to bill for usage immediately after it is uploaded into Zuora, rather than waiting until the usage charge's billing period has passed. The uploaded usage gets picked up in the next bill run.

To use on-demand rating, first, check whether your charge model is supported, then go to the product catalog charge and under Timing of Charge, select the Usage Records Rating Option called On Demand

You can also use the UsageRecordRatingOption field of the RatePlanCharge object to set this value when using the Zuora Commerce API to create a rate plan charge. 

Sample use case 

You provide a semi-annual service but need the ability to bill weekly or monthly based on the usage volume of the service. With on-demand rating, you still set up the usage charge billing period as semi-annual in the product catalog, but you can set up bill runs to generate invoices weekly, whenever usage records are submitted.

Using on-demand rating

The benefit of using on-demand rating is that it allows you to bill for usage as many times as needed throughout an open billing period. When a bill run is executed, it triggers rating to occur for all charges (including usage charges) which have not been billed - these are usage charges uploaded after the last bill run. The example below describes when a billing period is considered open and closed. 

Setting bill run target date 

The on-demand rating still bills for usage in arrears, but you don’t have to wait until the end of the billing period. That is to say, a usage charge for January 1 can be rated and billed as soon as the day after, on January 2 (this is the bill run target date). 

Open billing period 

Your customer has a bill cycle day set to the 1st of the month and has subscribed to a plan with monthly usage. With the on-demand rating, you can rate and bill for usage as frequently as you would like throughout the month of April by setting the bill run target date equal to a date within the open period for the month of April (between April 1st and April 30th). Any usage uploaded during the open period will be picked up in the next bill run. Therefore, if usage is uploaded every day, each time a bill run is executed to generate an invoice, it will pick up all the usage that has not yet been billed, rate the usage, and include the usage charge amount on the invoice.

Closed billing period 

In this same example, the billing period for April is closed once an invoice is generated using a bill run target date of May 1st. For this monthly charge, setting the bill run target date to the next bill cycle day (that is, May 1st) will close the April billing period and open up the next billing period for May. Once the April billing period is closed, any additional usage records dated in April will not be picked up and rated for billing.

Alternatively, with the end of billing period usage rating option, you are allowed to bill for April usage only once. After you have created a bill run with a target date of May 1st, it closes the April billing period. It is important to note that after the billing period of a charge is closed, you can still upload usage records for the closed billing period, but they will not be processed.

Changing bill cycle day 

Changing the account-level bill cycle day (BCD) does not affect already billed periods, ensuring consistency and preventing mismatches between billed usage quantities and existing invoice amounts. However, it might affect the current or upcoming billing periods, depending on the new bill cycle day you specified.

Take the following scenario as an example:

  • Charge name: Charge 1
  • Charge model: Tiered Pricing
  • Trigger condition: Upon contract effective
  • Billing period: Month
  • Rating group: By Billing Period
  • Usage records rating option: On Demand
  • Billing day: Default from customer account (for example, the account’s bill cycle day is the 20th of the month)
  • Billing period alignment: Align to charge
  • Price table:
    Tier Quantity From Quantity To List price
    1 0 10 2.00
    2 11 20 3.00
    3 21 --- 5.00

Assume that a 3-month-termed subscription is created for this on-demand usage charge. You have uploaded a few usage records and generated a bill run for it.

on_demand_usage_rating_default_billing_periods.png

  • Subscription:
    • Term Start Date: 01/01/2025
    • Term Duration: 3 months
    • Term Period: From 01/01/2025 to 04/01/2025
  • Billing periods:
    • BP1: From 01/01/2025 (inclusive) to 01/20/2025 (exclusive)
    • BP2: From 01/20/2025 (inclusive)  to 02/20/2025 (exclusive)
    • BP3: From 02/20/2025 (inclusive)  to 03/20/2025 (exclusive)
    • BP4: From 03/20/2025 (inclusive)  to 04/01/2025 (exclusive)
  • Uploaded usage records:
    • U1: 10 units on 01/10/2025
    • U2: 5 units on 01/17/2025
  • Bill Run:
    • Target Date: 01/18/2025

In this case, the first invoice is generated for the period from 01/01/2025 to 01/18/2025.

Total quantity: 10 + 5 = 15

Total invoice amount: 10 * $2 + 5 * $3 = $35

Case 1

When the updated BCD is earlier than the original BCD and equal to or later than the billed date, the current and upcoming billing periods are affected.

For example, if you changed the BCD on the customer account from the 20th to the 19th, the new billing periods are as follows:

  • BP1: From 01/01/2025 (inclusive) to 01/19/2025 (exclusive)
  • BP2: From 01/19/2025 (inclusive) to 02/19/2025 (exclusive)
  • BP3: From 02/19/2025 (inclusive) to 03/19/2025 (exclusive)
  • BP4: From 03/19/2025 (inclusive) to 04/01/2025 (exclusive)

on_demand_usage_rating_bdc_19th.png

For a tiered on-demand usage charge model, the usage quantity will reset on 01/19/2025, 02/19/2025, and 03/19/2025.

The same logic applies if you change the BCD to the 18th, which is the same as the billed date.

The following examples explain how invoice amount is calculated for different scenarios.

Example 1:

  • Uploaded usage records:
    • U3: 5 units on 01/18/2025
  • Bill Run:
    • Target Date: 01/19/2025
  • Invoice:
    • Total Invoice Amount: (10 * $2 + (5 + 5) * $3) - $35 = $15

Example 2:

  • Uploaded usage records:
    • U4: 5 units on 01/20/2025
  • Bill Run:
    • Target Date: 01/21/2025
  • Invoice:
    • Total Invoice Amount: 5 * $2 (tier 1 in BP2) = $10

Case 2

When the updated BCD is earlier than the original BCD and the billed date, the current billing period remains the same, and upcoming billing periods are affected.

For example, if you changed the BCD on the customer account from the 20th to the 15th, the new billing periods are as follows:

  • BP1: From 01/01/2025 (inclusive) to 01/20/2025 (exclusive)
  • BP2: From 01/20/2025 (inclusive) to 02/15/2025 (exclusive)
  • BP3: From 02/15/2025 (inclusive) to 03/15/2025 (exclusive)
  • BP4: From 03/15/2025 (inclusive) to 04/01/2025 (exclusive)

on_demand_usage_rating_bdc_15th.png

For a tiered on-demand usage charge model, the usage quantity will reset on 01/20/2025, 02/15/2025, and 03/15/2025.

As shown in the diagram above, when the BCD is updated to the 15th, the first expected billing period ends on 01/15/2025. However, this date falls within the existing billed period from 01/01/2025 to 01/18/2025, which cannot be split due to the irreversible nature of the rating process. As a result, the first usage quantity reset occurs on 01/20/2025 instead of 01/15/2025.

The following examples explain how invoice amount is calculated for different scenarios.

Example 1:

  • Uploaded usage records:
    • U3: 5 units on 01/19/2025
  • Bill Run:
    • Target Date: 01/20/2025
  • Invoice:
    • Total Invoice Amount: (10 * $2 + (5 + 5) * $3) - $35 = $15

Example 2:

  • Uploaded usage records:
    • U4: 5 units on 01/21/2025
  • Bill Run:
    • Target Date: 01/22/2025
  • Invoice:
    • Total Invoice Amount: 5 * $2 (tier 1 in BP2) = $10

Case 3

When the updated BCD is later than the original BCD, the current billing period remains the same, and upcoming billing periods are affected.

For example, if you changed the BCD on the customer account from the 20th to the 25th, the new billing periods are as follows:

  • BP1: From 01/01/2025 (inclusive) to 01/20/2025 (exclusive)
  • BP2: From 01/20/2025 (inclusive) to 01/25/2025 (exclusive)
  • BP3: From 01/25/2025 (inclusive) to 02/25/2025 (exclusive)
  • BP4: From 02/25/2025 (inclusive) to 03/25/2025 (exclusive)
  • BP5: From 03/25/2025 (inclusive) to 04/01/2025 (exclusive)

on_demand_usage_rating_bdc_25th.png

For a tiered on-demand usage charge model, the usage quantity will reset on 01/20/2025, 01/25/2025, 02/15/2025, and 03/15/2025.

The following examples explain how invoice amount is calculated for different scenarios.

Example 1:

  • Uploaded usage records:
    • U3: 5 units on 01/19/2025
  • Bill Run:
    • Target Date: 01/20/2025
  • Invoice:
    • Total Invoice Amount: (10 * $2 + (5 + 5) * $3) - $35 = $15

Example 2:

  • Uploaded usage records:
    • U4: 5 units on 01/24/2025
  • Bill Run:
    • Target Date: 01/25/2025
  • Invoice:
    • Total Invoice Amount: 5 * $2 (tier 1 in BP2) = $10

Example 3:

  • Uploaded usage records:
    • U5: 5 units on 01/29/2025
  • Bill Run:
    • Target Date: 01/30/2025
  • Invoice:
    • Total Invoice Amount: 5 * $2 (tier 1 in BP3) = $10

More considerations 

Charge model support 

You can only use on-demand usage rating on the following charge models. Other charge models are not supported.

  • Per unit
  • Tiered pricing
  • Volume pricing

    To use on-demand usage rating on the volume pricing charge model, you must enable the Active Rating feature.

Rating option inheritance

When adding a per-unit usage charge to a subscription, the Usage Records Rating Option will inherit the setting from the product catalog charge and cannot be updated to use a different usage rating setting. This means you cannot: 

  • Select a different usage rating option (than the one set in the product catalog) when adding the usage charge to a subscription. 
  • You cannot update an existing charge to change the rating option. 

Changing rating option

If you want to modify the rating option of a per-unit usage charge from End of Billing Period to On Demand, you need to do the following: 

  • In the existing subscription, create two amendments to remove the current usage charge and add the new usage charge (with the on-demand usage rating option). 
  • When adding the new usage charge, ensure that the per-unit usage charge in your product catalog is set to on-demand rating.

Rating by billing period

When you use on-demand rating and your rating group is by billing period, Zuora's rating engine determines the billing period in a different way as follows:

From: the later of charge start date and current billing cycle day, with the day included

To: the earliest of billing target day, charge end date and the next billing cycle day, with the day excluded.

Take the following scenario as an example.

Tier Quantity From Quantity To List price
1 0 10 2.00
2 11 20 3.00
3 21 --- 5.00

Step 1: You upload the first batch of usages to Charge 1 as below:

Start Date Quantity
01/01/2020 3
01/02/2020 5
01/03/2020 7

Step 2: You create a bill run with a target date of 01/04/2020 and generate the first invoice.

In this case, the billing period is from 01/01/2020 (including this day) to 01/04/2020 (excluding this day), not the whole month of January.

Total quantity: 3 + 5 + 7 = 15

Usage cost on the first invoice: 10 * $2 + 5 * $3 = $35

Step 3: You upload the second batch of usages to Charge 1 as below:

Start Date Quantity
01/01/2020 1
01/04/2020 5

Step 4: You create the second bill run with a target date of 01/05/2020 and generate the second invoice.  

This time, the billing period is from 01/01/2020 (including this day) to 01/05/2020 (excluding this day).

Total quantity: 3 + 5 + 7 + 1 + 5 = 21

Total usage fee: 10 * $2 + 10 * $3 + 1 * $5 = $55

The amount already billed is $35 as a result of the first bill run.

Usage cost on the second invoice: $55 - $35 = $20