Loading

Best Practices to Implement Usage Based Pricing With Salesforce Billing

Дата публикации: Dec 9, 2025
Описание

Salesforce Billing allows you to automate complex billing requirements and electronic payments. Following are some of the best practices to help make your implementation and usage of the product a success. This is not a substitute for having an experienced partner scope, design, and implement your Billing solution.

There are two ways to implement Usage Based Pricing. 

  • On the Product2 setup, set Charge Type = Usage. This is known as Legacy UBP or Legacy Usage.
  • On the Product2 setup, add one or more Consumption Schedules to the related list. This is known as Usage Based Pricing (UBP) or Consumption Schedule Usage pricing. Our help and training documentation often refers to this as 'Subscription Products with Consumption Schedules'. To avoid confusion, we will use the terminology Consumption Schedule Usage or Consumption Schedule UBP.

It is important to note that while Legacy Usage continues to be supported, Consumption Schedule Usage, is a more performant setup and is where potential future enhancements will be directed. Both product types create Usage Summaries for invoicing purposes. For more information on how Usage Summaries are invoiced, see. Invoicing Usage Summaries.

Решение

Legacy Usage features

  • Rating Usage records is done with a Price Schedule.
  • When the Order is created, the Price Schedule with Price Tier(s) is created from the quote line pricing plus any applicable discount schedule(s). 
  • Included Usage and Usage Floor Quantity can be set on the Order Product.
  • Evergreen subscriptions are not supported for Legacy Usage.
  • When creating a Standalone Legacy Usage Product, the Price Schedule and Tiers must also be created.

Consumption Schedule Usage features

  • Rating Usage records is done with an Order Product Consumption Schedule.
  • When a Quote Line is created for a Product with one or more Consumption Schedules, a Quote Line Consumption Schedule is created for each. When ordered, these are used to create the Order Product Consumption Schedule(s).
  • For Standalone Order Products with Consumption Schedules see this article.
  • Included Usage and Usage Floor Quantity is configured by the consumption schedule pricing model. These fields on the Order Product are only used for Legacy Usage.
  • Evergreen Subscriptions are supported and can be used with Consumption Schedules.  
  • Consumption Schedules can be set up with a different Billing Rule, Tax Rule, and Revenue Recognition Rule than the associated Product and, by extension, Order Product. 
  • Order Product Consumption Schedule does not inherit the Legal Entity from the Order Product. This can be set up using automation similar to how Legal Entity is set on the Order Product. See Automation in How to Get Started with Salesforce Billing Best Practices.
  • When using pre-rated Usage with a consumption schedule, note the requirements for the consumption rate set up. 
  • Setting Hold Billing to Yes on the Order Product prevents Invoicing for both the Order Product and the Usage Summaries. Usage can still be rated while Hold Billing is set to Yes.
  • Setting Invoice Run Processing Status on the Usage Summary to 'Will Not Invoice' will prevent the usage summary from invoicing and will also prevent additional usage from being rated into that summary.

General Guidelines

  • How will usage be loaded? Manually, via data load, or via an integration? 
    • User experience is important here - manual usage load is arduous and error prone. A well defined business process with some supporting configuration can reduce the risk of error. If an external system will be handling usage mediation and rating and there is a desire to forego loading Usage, Usage Summaries can be leveraged by themselves to facilitate invoicing without any Usage records. For more information on this process and potential use cases, view this article: Custom Usage Summaries.
  • Choose how usage will be rated:
    • By Process: 
      • This method can reduce the number of times the usage rating process will need to run.
      • Preferred for large data loads as it reduces load times and is less likely to hit governor limits.
      • Often better for use with integrations since it reduces the probability of interactions between the Billing trigger and the integration.
      • Best if usage records must undergo further processing after loading into Salesforce and before they are rated. 
    • On Trigger 
      • If there is a need to see Usage rated immediately this method is preferred. 
      • Large data volumes combined with other concurrent activities can negatively impact performance. Processing load might lead to hitting a governor limit.
      • Usage records should be loaded in a single thread with batch size = 1

Establish Usage volumes/ benchmarks 

  • Data Storage: How much storage does the org have? Will you need to make a plan for offboarding Usage records? 
    • Note: It is important to remember that the totals captured at the Usage Summary level will not change even if Usage records are deleted prior to invoicing. 
    • Consider audit trail requirements in the offboarding process. 
  • For high usage record volumes, it might be preferable to consolidate Usages records at a summarized level to reduce the number of records to be rated. 
  • Prior to implementing in production, it is recommended to scale test the performance of data loads in a full sandbox based on the order of magnitude of the the maximum expected volume in production. 


Architect Matching ID, Matching Attribute and Unit of Measure logic

  • Matching ID Best practice: Use the Order Product record ID. Use a flow to insert Matching ID upon record creation. There is rarely a need to change it once the record is created. Matching ID requires a match for both Legacy and Consumption Schedule Usage, and null values will count as a match.
  • Matching IDs for Evergreen Subscriptions must be the same for each usage summary period. Using unique identifiers like summary end date or start date are unnecessary and will break the feature that automatically creates new usage summaries after the 12th month.
  • Matching Attribute and Unit of Measure - These are set on the Consumption Schedule. Use a value that easily distinguishes that Consumption Schedule from others associated to the same product. These fields are ignored for Legacy but Consumption Schedule Usage requires a match, and null values will count as a match.

Correcting Errors

  • If the Usage record shows a Status of 'Warning - Unrated' or 'Error' check the Error Message field for information on what went wrong so you can take corrective action. A list of potential errors is provided in Managing Usage Processing Errors
  • If the list of errors does not cover the issue, custom automation (flows or triggers) on the usage and usage summary records may be involved. If there is custom automation, keep in mind that when using On Trigger rating, usage records are created and updated when inserted. Usage Summaries might also be created and updated upon usage record insert for evergreen subscriptions.
  • If the usage record was entered with the wrong data and is rated against the wrong usage summary, the only way to fix this is to create a usage record with an offsetting amount, and then creating a new usage record with the correct data. Deleting or changing a rated usage record will not affect the related usage summary record.
Номер статьи базы знаний

000389368

 
Загрузка
Salesforce Help | Article