Rating processor
The Rating processor in Zuora Mediation calculates rated amounts for usage events, transforming raw data into billable records.
The processor calculates the rated amount for each usage event by evaluating usage quantity against the configured pricing in Zuora’s product catalog. It supports tiered pricing models by evaluating accumulated usage to ensure accurate billing.
Rating output
The Rating processor produces billed usage events that include calculated charges based on the Zuora pricing configuration. You must ensure that all identifiers and quantity fields are mapped correctly to avoid rating errors.
You can use the Audit Trail Download feature to track and debug rated outputs.
Rating processor for tiered-pricing model
In the tiered pricing model, the Rating processor must receive cumulative usage as a Pricing Quantity, grouped by charge number and/or account number. Without this, tier rates may be applied incorrectly for each event.
Example:
Day 1 = 10 units, Day 2 = 5 units.
Day 2’s Pricing quantity must be 15, not 5.
For tiered pricing, the Price Quantity in the Rating Operator needs to reflect the total accumulated usage up to the processed event. You must group this accumulation by Charge Number. If your system ensures that the Charge Number is unique across all accounts, then grouping by Charge Number alone may be sufficient. For example: A globally unique identifier for each charge instance.
Accumulated usage for tiered pricing
Accumulated usage is critical for a tiered pricing model as it evaluates the total consumption within a defined period to determine the applicable price tier. If the Price Quantity only reflects the current event's usage, the system will incorrectly apply rates, leading to under- or over-billing. By accumulating usages, the Rating processor can accurately determine which tier the total consumption falls into.
- Zuora recommends using natural month billing periods (for example, calendar months) for rate plan charges when using the Rating processor. Mediation does not have access to the billing cycle day (BCD) from the subscription. Therefore, using non-standard billing periods may result in rating misalignment. Aligning to calendar months ensures accurate and consistent rating.
- Mediation and Billing do not automatically synchronize data. Any changes made in Billing are not reflected in Mediation unless you explicitly rerun the events, as Mediation does not auto-update.
- The Rating processor only supports the following charge models:
- Per Unit Pricing
- Tiered Pricing
- Volume Pricing
- Tiered with Overage Pricing
Pricing updates during streaming processing
The Rating processor caches pricing information to improve rating performance by reducing repeated requests for pricing information. When you update a charge price while a streaming meter is actively processing usage, the updated price might not be reflected immediately. The Rating processor might continue using the previous price for up to 10 minutes. After the cache expires, the Rating processor retrieves the updated pricing information. New usage processed after the cache refresh uses the updated price.
Example: If a charge changes from $2 per unit to $3 per unit, usage processed shortly after the change might still be rated at $2 per unit. The Rating processor uses the updated $3 per unit price after the cache refresh.
The same caching behavior applies to applicable Product Catalog and Attribute-Based Pricing (ABP) pricing. Pricing changes from these sources might also take up to 10 minutes to appear in rating results. If you change pricing while a streaming meter is actively processing usage, allow up to 10 minutes for the change to take effect in rating.