Thursday 21 February 2019

CPQ Renewal Opportunity and Forecasting

In order to create Renewal Opportunity which will be used you need to refer to Contract.

Contract object has a field called "SBQQ__RenewalForecast__c" , so whenever you would like to create related Renewal Opportunity for a Contract, you need to set that flag to True and then it takes couple of seconds till Renewal Opportunity would be appeared on Contract in "BQQ__RenewalOpportunity__c" Field.

For example you can set "SBQQ__RenewalForecast__c" 12 months in advance of the expiry of the Contract using time based workflow rule, Then the question would be within the next 12 month there might be some Contract Amendment and then the created Renewal Opportunity would be out of sync with the Contract, but the answer is CPQ is smart enough to update the related Renewal Opportunity automatically if any Amendment happens.

There is one trick to this solution that puzzle me for a while, There is another field on Contract object called "SBQQ__RenewalQuoted__ctill this flag not set that Renewal Opportunity would not have any Renewal Quote and also till there is no Primary Renewal Quote linked to the Renewal Opportunity all Amendment to the Contract would reflect the Renewal Opportunity but if Renewal Quote is there then Contract Amendment would not reflect the Renewal Opportunity

 Probably at some point prior to Contract Expiration you would like to create Renewal Quote also for your Sales team, you might can have another Time Based Workflow Rule to set that 3 months in advance of Contract Expiry or even leave that to Sales team to create it manually.

Hope this help you setting up nice and clean Forecasting in Salesforce

Thursday 22 March 2018

Discount Schedule And Contraced Price in CPQ

Mixing Discount schedule and Contracted Price

Consider that there is a Scheduled Discount for a product but wanted to have flat rate of 50% discount for a particular account or partner or  distributor.

The following steps need to be done :

1- Create a new zero percentage discount schedule.
2- Create a new contracted price on the related account.
3- Set the created zero discount schedule on contracted price.
4- Set discount percentage on contracted price.








Order of executing of Price Rules in CPQ


If there is a scenario that there is a dependency between price rule then different evaluation order needs to be used.

Consider that there is scenario that price rule A is populating a result on Quote line that price rule B needs to consume that result in it's own action , the only way to handle this scenario is using a different evaluation order on price rules.

1)Configuration evaluation order on price rule

  • On Initialisation : When quote line editor loads
  • Before Calculation : before the price is calculated
  • On calculation : when price is being calculated
  • After Calculation : applies after price is calculated




Caution: When two Price Rules share the same evaluation event, the earliest-firing Price Action's target field value will not be usable in the Price Condition of the later-firing Price Rule.

 For a given evaluation event, all conditions are evaluated at once. After this, for rules whose conditions have been met, actions then fire sequentially.

 An action from one rule in a given evaluation event cannot influence the conditions of another rule in the same evaluation event.

https://community.steelbrick.com/t5/Prices-Discounts-Knowledge-Base/Price-Rules/ta-p/166

Sunday 18 March 2018

Dynamic Package Product Code in CPQ

If there is a bundle Product, that based on the selected Product Options you would like to create a specific Code, CPQ comes with some default properties in Product and Product Options to achieve this goal.

First of all , consider this is the bundle we are going to create
Also consider the final code is something like SCODE D-C001,B001

Each Product Option come with a Number



This number later on will be used in the Code Pattern of the Bundle.
So , let's go ahead and set those number like 10,20,30.

There is also another property in Product Option called Component code, basically each Product Option has it's own code. Let's go ahead and set all the Product Options code.

After setting all those properties Product Options would be look like this:

Now we can go back to the Bundle Product A and set the Configure Code Pattern as
SCODE {30}-{10},{20}

Great! so you setup everything on the product, Now you need to display this code on Quote line.
In order to bring the generated code to the Quote line , you need to go to Quote Line, Field Sets and  Edit Line Editor


And Add Package Product Code to the Field Set.


Then If you go to Quote and add Bundle Product A to the Quote, you will see the expected generated code based on the configuration of the bundle.

Salesforce CPQ Contracts and Asset Conversion

Let's see what are the items needs to be set in order to create Contracts , Assets and Subscriptions.

It's all started from Opportunity, it means you need to have a Opportunity then having a Primary Quote  for that Opportunity which means doesn't matter how many Quotes links to the opportunity , one of them must be Primary.

Depending on the selected Products in the Quote Lines , we will have different scenarios.

Just imagine we have the Following Products , A , B , C , D


There is an important note here, Contracts only get created for Subscription based products, so if in the Opportunity there is not a subscription product in Opportunity Product , then no contract will be created.

 There is a field in Product called Subscription Type  which can be renewable or One-Time, you need to remember that this field is depending on Subscription Pricing in Product so if Subscription Pricing  is none the value of Subscription Type is not going to effect anything!

Now let's talk about a different scenarios:


Product A and B in Quote

If there are A and B in the quote,  Start Date and Subscription Terms must be set, otherwise we creation of Contract would be failed! Once you set the value for those fields then you can go to the related opportunity and mark is as Contracted. 

Then Contract gets created for the Account, If you look at the contract, only Product A which is the subscription Product will available Subscriptions




Now let's see what happened to the Asset and Subscription in the Account.

As Product A is a Subscription based product  and Asset Conversion is One per Quote Line , so we see one subscription gets created with the selected Quantity in the Quote Line Item(In this example I set two for Quantity for Product A)

Also because Product B is normal product and Asset Conversion is One Per Quote Line, so one Asset also gets created against the Account.(In this example I set two for Quantity in Product B)


So in total in this scenario the following items gets created/

  • one Contract
  • one Asset 
  • one Subscription
Product B and C in Quote
In this scenario since none of the Products is a Subscription Product, then no need to set the  Start Date and Subscription Terms in Quote. So if you just set Contracted in the Quote the Assets get created without a contract.Consider quantity of each product in Quote is two. 

Since Asset Conversion in product C is One Per Unit , We will have one Asset for Product B with Quantity as two and two separated asset for Product C with Quantity as one.


Product B and D in Quote
This scenario is pretty much same as the above scenario but the difference is Product D, Asset Conversion for Product D is None.

So again if we create a Opportunity and Quote and add Product B and D in Quote Line with Quantity of two, then setting the Opportunity as Contracted , we will see only one asset against the account which is for Product B , also no Contract gets created as there is no Subscription Product in Quote.






Saturday 17 March 2018

Product visibility in CPQ Quote Template

As CPQ offers many products model, it also come with so many control over visibility of a product in a quote and it gives the full control to CPQ admin to take advantage of those options.

Product.Hidden
Let's Start from Product, There is a filed called Hidden , If this field is checked , then this product wont be displayed on Quote templates. This is regardless of everything else.

Example: If there is a specific product you would like to hide in all Quote Template, easiest way is to check the Hidden field. Another example would be hiding a bundle product if the company doesn't want to expose their bundles and just want to expose components.

Product Option.Quote Line Visibility
This option gives admin controls over displaying a product option first in the Quote Line Editor which sales people are using, also exposing a specific component(product option) in Quote Template which customer would see or hide it from both and make it visible always.

This is a pick list item with the following values.

  • None
  • Always
  • Editor Only (means Quote line editor)
  • Document Only
  • Never



Example: If there is a bundle and you don't want to expose its components to the customer then you can go to product options of the bundle and the the Quote Line Visibility to Editor Only, which means sales people can only see that component in the Quote Line Editor Configuration of the bundle.




Quote Template. Hide Component Products
This is a handy property in the quote template, to hide all components of a bundle in the quote templates. Maybe there is a scenario that you would like to hide bundles component in a specific quote template(s) only and display in others.



Quote Template. Show All package product
If all package products needs to be printed regardless of their value. Otherwise only package products with non-zero values would be printed.

Quote Template. Show Bundle Products
If there is a scenario that a company set up product bundles with some product options , then you only want to display bundles in Quote Template then check this property and all product options would be hidden in the quote templates.




Sunday 11 March 2018

Merge Fields in CPQ Quote Terms

Merge fields are available on Quote terms , this can be used if couple of properties that needs to be displayed dynamically in quote terms.

If data is coming from CPQ Quote, then
{!quote.SBQQ__MyProperty__c}



This is a wrong format
{!SBQQ__quote_c.SBQQ__MyProperty__c}


Apart from quote , template , primaryContact, salesRep are also available.(They are case sensitive)


  • {!quote.SBQQ__MyProperty__c}
  • {!primaryContact.Name}
  • {!salesRep.Name}
  • {!template.MyProperty__c}



So in order to access primary contact on quote, this format also doesn't work

{!Quote.primaryContact.Name}

If you need to use Static Variables, the format is
 {!Text.YourVariableName}

Product Option - Apply immidiately


Apply immediately should be selected on the product option which is triggering the event , not the one which is receiving it.

Example : If there is a product option called "Printer"  and when this product option selected in the bundle , "Toner" (another product option in the same bundle) needs to be added (Show & Add), then if this event should happen immediately then on "Printer" Apply immediately needs to be ticked.


Thursday 22 February 2018

Salesforce CPQ- Product Bundling

A collection of products that are sold together called bundle.
A bundle is a product itself , also component of bundle maybe sold separately or maybe not.


For example if you are selling computer case with all components like CPU , RAM, VGA, Mother Board . maybe you would like to sell CPU separately or just via the bundle product.

In order to set a product as bundle you need to specify the options on the product or component of the product , this can be set on Product Option .

Consider you have a product called "Dell Desktop Computer" , you need to define options but before that just see if you can categorize those options, so sales users can choose those options easier. these categories are like Processor, RAM, ... as there are multiple CPUs that can be selected when selling this product.

If you need to create those category click on "New Product Feature" on the product layout.

Then go ahead and all other required features, Number field on product option is going to determine the order of displaying features in Quote line configuration.


It's a best practice to set the number like 10, 20 ,30 so if later on you would like to change the order, you don't need to update the order of all features.

Now go ahead and add new product option to this product like a CPU(this product should be already available in your product list)


The most important field in product option is Type , it has the following values

  • Component : Quantity is depending on its parent, and it needs to be required.
  • Accessory : This is a dependent option but Quantity is not depending on its parent.
  • Related Product : Fully independent to its parent (this can be used for cross sell or upsell)
  • None: similar to component


In product option you can also specify the required filed and min and max number of product option in the bundle. Unit price , if this is set this will override the value from pricebook.

Then next option that can be set is "Option Constraints", by using this you can specify the required logic for selecting a product option.

Quote Line Visibility on Product Option

If there is a bundle product and you don't want to display the component as a separated line in quote line editor after bundle gets configured then , set Quote Line Visibility to Document Only.

These are the different values for Quote Line Visibility:

  • None
  • Editor Only (Quote Line Editor | QLE)
  • Document Only (Quote Template)
  • Never
So by using Quote line visibility on product option , you can control of you would like to display the product option in Quote Line Editor or Quote Document , or not.

Salesforce CPQ Configuration


  • CPQ Calculator

CPQ has two Calculators that being used in Quote Line Editor.

By Default the one that it's enabled is a server side calculator , which means each request needs to call a server side event , this is also called as legacy calculator.

The new calculator is not turn on , in order to turn the new client side calculator you need to go to setup-> install packaged - > CPQ package and click on Configure and on "Pricing and Calculation" tap, set authorize the new calculator service.

Legacy Calculator

  • Server Side
  • Apex
  • Debug log
New Calcolator
  • Client Side
  • Javascript
  • Browser Debug
I recommend to go ahead and authorize the new calculator in your org.


  • Prorate Precision and Term

Another option that can be set on CPQ configuration section is setting Prorate Precision and Subsciption Term units.



Term is used in the product and some other objects , the value can be Month and Day be default

To give you an example, if you are selling a subscription product you can specify the Subscription Term to 12 and Term in the CPQ config set to Month then in the  Quote line/Opportunity line quantity of this item is 1. this means you are going to provide that service for 12 month.(Length of the term is 12 month)



Now if you are always selling this product for 12 months then it's all good but usually this is not the case, you might sell this product for 12 months and 15 days or 6 months in reality.

So there is two options here first option is saying if customer wants to buy that service/product for less than 12 months , he/she needs to pay 12 months anyway.

The next option is prorate that to what customer is going to buy , like if buying it for 6 months and 10 days, 5 months and 20 days needs to be reduced from the price(Prorate needs to be set to Monthly+Daily ) or customer needs to pay 7 months and only 5 months needs to be reduced (Prorate needs to be set to Month)


  • Solution Group

Enabling Solution Group would be useful if you are grouping line items usually when selling your products ,


  • Renewal Mode

This can be based on Contract or Assets, regardless of model Renewal Opportunity and Quote will get created.

Salesforce CPQ Pricing Structure


There is a specific order that price and discounts applies in CPQ product and remember This order cannot be changed.

  1. Original Price
  2. List Price
    • System Discounts -> Discount Schedules, like Volume based discount
  3. Regular Price
    •  Special Price, Contracted Price, Additional discounts ( manually added)
  4. Customer Price
    • Partner discount
  5. Partner Price
    • Distributor discount
  6. Net Price


Note : Applying discount on a wrong price might cause some strange behavior, (Like Net price instead of List or regular price)

Setting Special Price
If you would like to set the Special price, remember you need to set the Special Price Type to Custom as well.


CPQ Renewal Opportunity and Forecasting

In order to create Renewal Opportunity which will be used you need to refer to Contract. Contract object has a field called " SBQQ__R...