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 bill cycle day has an impact on the open period for a charge. In the example above, if you are using the on-demand rating and have closed the month of April with a bill run target date of May 1st, changing the bill cycle day from the 1st of the month to the 5th of the month opens up the billing period for the month of April. The billing period for the month of April is now from April 1st to May 4th. The next billing period is from May 5th through June 4th. 

More considerations 

Charge model support 

You can only use on-demand rating on per unit, tiered pricing, and volume pricing charge models. Other charge models are not supported.

Note: The volume pricing charge model is supported if you have the Active Rating feature enabled.

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