Loading
Manage Your Billing Processes with Salesforce Billing
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Usage Rating Methods

          Usage Rating Methods

          When you add usage to a usage summary in Salesforce Billing, you have two ways to control how Salesforce rates the usage and calculates the usage summary’s new quantity and price. (Salesforce Billing Managed Package)

          On Trigger
          When you load usage, Salesforce Billing assigns the usage to a matching usage summary, then calculates each usage record’s subtotal and unit price. Then, it calculates each usage summary’s quantity and unbilled subtotal based on the summary’s new usage records. If your usage summary uses range pricing, Salesforce Billing also rates all the summary’s other usage to determine whether the new usage moves the summary into a new pricing tier. If your usage summary uses slab pricing, Salesforce Billing evaluates the summary’s total quantity to determine a pricing tier for the new usage. It then rates all the new usage that falls in that tier.
          By Process
          When you load usage, Salesforce Billing doesn’t automatically assign the usage to a usage summary. Instead, you can run the usageSchedulable Apex class. This class assigns usage to a summary, then calculates the summary’s quantity and unbilled subtotal based on the Quantity field in each of the summary’s new usage records. However, to reduce load times, it doesn’t calculate the Subtotal and Total Price fields for each usage record.

          If your summary uses range pricing, On Trigger rating can cause long load times because Salesforce Billing runs the rating process every time new usage is uploaded. We recommend customers with range-priced usage summaries and large usage quantities use By Process rating. To avoid long load times, we advise testing in your Salesforce org to determine acceptable load times and which usage rating method meets your needs.

          • Schedule Batch Usage Rating
            Schedule a recurring Apex class that evaluates unrated usage, assigns it to usage summaries, and recalculates usage summaries based on their new usage records. (Salesforce Billing Managed Package)
           
          Loading
          Salesforce Help | Article