Usage Based Pricing – Salesforce CPQ

In Salesforce CPQ, you can create invoice for the customer, based on the usage of products. 

We are going to see an example of Usage products and creating invoices based on the units/quantity consumed by the customer. This example will show how the Invoice total is calculated based on the number of units/quantities consumed by the customer. 

Create a quote from an Opportunity. 

Add a quote line for the test usage-based product. 

Create an Order from the Quote, by checking ordered checkbox. 

Open Order Product and look at Related List. You can see the twelve usage summary records created.  

You can load usage records for usage summary records.  

Following is the code snippet that I used to insert usage records. Matching Id is Id of Order product.  

blng__Usage__c u = new blng__Usage__c(); 

u.blng__Account__c = ‘0015g00000tdCbBAAU’; 

u.blng__Order__c   = ‘8015g0000009XBmAAM’; 

u.blng__OrderProduct__c = ‘8025g000000NQ4AAAW’; 

u.blng__UsageSummary__c = ‘a2K5g000000HqggEAC’; 

u.blng__MatchingId__c = ‘8025g000000NQ4AAAW’; 

u.blng__Status__c = ‘New’; 

u.blng__StartDateTime__c = DateTime.Now(); 

u.blng__EndDateTime__c = DateTime.Now() + 2;  

u.blng__Quantity__c = 10; 

insert u; 

Following is the usage record created and associated to Usage Summary.  

Manually create invoices, by checking the [Bill Now] checkbox in Order. Make sure the Order is activated before creating invoices.  

You can see the invoice created for the usage of product, and it is related to Order Record. Following is the example screenshot. Graphical user interface, text, application, email, TeamsDescription automatically generated 

Reference:  

https://help.salesforce.com/s/articleView?id=sf.cpq_usage_products_parent.htm&type=5

https://help.salesforce.com/s/articleView?id=sf.blng_usage_fields.htm&type=5

About MST

At MST Solutions our cornerstone is to adapt, engage and create solutions which guarantee the success of our clients. The talent of our team and experiences in varied business verticals gives us an advantage over other competitors.

Recent Articles

Work with us.

Our people aren’t just employees, they are key to the success of our business. We recognize the strengths of each individual and allow them time and resources to further develop those skills, crafting a culture of leaders who are passionate about where they are going within our organization.