CPQ Level2
CPQ Level2
Salesforce CPQ
Forward-Looking Statement
Statement under the Private Securities Litigation Reform Act of 1995
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions
proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other
than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other
financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded
services or technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and
services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of
our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our
relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer
deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that
could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for
the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our
Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or
at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and
does not intend to update these forward-looking statements.
Agenda
Block Pricing Uses a flat price for a range of quantities A streaming video service is $9 a month for 1–3
instead of multiplying by number of concurrent viewers, and $15 a month for 4–10
units. concurrent viewers.
Percent of Total Looks to the sum of other product The tip for your pizza delivery is 15% of the overall
(PoT) Pricing prices, then takes a percent of that sum. amount of your order.
Option Pricing Replaces the price of a product only The price of a drink is $1 when bought in a combo
Override when it’s within a bundle. meal, but $1.35 when bought alone.
Cost Plus Allows sales reps to add value on top of A car costs the dealer $30,000, and it’s marked up to
Markup Pricing a product’s cost. $34,000 to make commission.
Contracted Sets account-specific prices for individual Your customer Edge Communications pays $100 for
Pricing products or categories of products. a printer toner cartridge while everyone else pays
$125.
What do Pricing fields represent?
Price Rules
Price rules automate price calculations and update quote line fields
Price Rules can be used to calculate pricing for a line item when the out-of-the-box pricing methods do
not suffice.
Execution Order
Salesforce declarative tools do not always give you control over execution order. For example, if there are multiple
Workflow Rules on an object, there is no way to know which will fire first.
Salesforce CPQ allows you to specify evaluation orders for price rules and actions - so your pieces of logic can be
controlled and responsive to each other
Quote Calculation Sequence
• When an action causes a calculation, the Salesforce CPQ Advanced Quote Calculator runs through a series
of steps to determine pricing for quote lines and quote
• This article describes when your Price Rules execute relative to other internal actions taken by the
package, such as proration, quantity and price calculations:
https://help.salesforce.com/articleView?id=cpq_quote_calc_process.htm&type=5
• Understanding the order of execution and wielding it to your advantage will help you implement dynamic
and scalable solutions.
Quote Calculation Sequence
Examples of Internal CPQ logic that execute during the calculation sequence (not in order)
• Calculate Quantities
o Eg. If you change the Bundle Qty, should the Qty of Product Options change as well
• Calculate Proration
o Based on Quote Term Length
If your Price Rules need to impact calculations performed by the package, you need to ensure they are executing early
enough. For example, if your Price Rules are injecting a discount, that needs to occur before the package performs the price
calculations or else it won’t actually be applied until the next pass.
Similarly, if your Price Rules rely on values calculated by the package, you need to wait until the package has performed that
logic. For example, totals are not available until the package performs price calculations.
For eg, all Price Rules in the Before Calculate event will fire before all Price Rules in the On Calculate event,
regardless of Evaluation Order. Evaluation Order is only relative within a particular event.
Quote Calculation Sequence: Simplified
Use Evaluation Order within a given event to determine the order of execution. The rules will execute from
lowest to highest, so Price Rules with larger numbers in the Evaluation Order field “win” in the event of a
conflict
Quote Calculation Sequence: Knowledge Check
Quote Calculation Sequence: Knowledge Check
Quote Calculation Sequence: Knowledge Check
Evaluation Order
Within a given event, all Price Conditions are executed first to determine which Price Rules will run. Only then
do Price Actions fire.
Evaluation Order
Within a given event, all Price Conditions are executed first to determine which Price Rules will run. Only then
do Price Actions fire.
Price Actions can also access values that were set by any previous Price Actions, so you can string together a
series of updates - even within a single Price Rule. Again, the Evaluation Order is used to control the sequence
in which the Price Actions fire.
Order of Execution
Requirement: Reduce the List Price of the Epson PowerLite WUXGA Projector by 15%, when the quantity quoted is
more than 5. Sales Rep should be able to apply an Additional Discount on top of this reduced price.
Price Waterfall
Original Price $100.00
List Price $100.00
Special Price Contracted Price, Custom $100.00
- System Discounts Discount Schedules 10%
Regular Price (*) $90.00
- Additional Discount Manually entered by the sales rep 20%
Customer Price $72.00
- Partner Discount 10%
Partner Price $64.80
- Distributor Discount 10%
Net Price Goes into Pipeline/Forecast Amount $58.32
* Regular Price also represents Special Price or Contracted Price after Discount Schedules
Steps: Price Rule to Modify the List Price based on a condition
Create a Price Rule whose ‘Evaluation Scope’ is Calculator and ‘Calculator Evaluation Event’ is ‘On Calculate’
Price Conditions should be:
• Quote Line Product Code equals EP-WUXGA
Price Action should be,
• Set the List Price field on the Quote Line object using the formula:
IF((SBQQ__Quantity__c >5), SBQQ__OriginalPrice__c*0.85,SBQQ__OriginalPrice__c)
Test: Price Rule to Modify the List Price based on a condition
Requirement: LTE Hotspot have a Standard Discount Schedule. However if the Payment is in Advance then
a special Upfront Discount Schedule should be applied.
Steps: Conditional Discount Schedules applied using Price Rule
Create a custom Quote picklist field called ‘Payment Type’, with picklist values Upfront and Arrears (this field is
already created in your org)
‘Standard Discount Schedule’ record is already created in your orgs. Click the Edit Tiers action to see the discount
tiers.
Clone the ‘Standard Discount Schedule’ record, to create the ‘Upfront Discount Schedule’ record.
Click ‘Edit Tiers’ action on ‘Upfront Discount Schedule’ record to define the discount tiers - specify discount values
that are higher than those in the Standard Discount Schedule.
Create a custom lookup field on the ‘Product’ object, called Upfront Discount Schedule. This is a look up to the
Discount Schedule object
On the ‘LTE Hotspot’ product record, update the Discount Schedule and Upfront Discount Schedule fields with the
values ‘Standard Discount Schedule’ and ‘Upfront Discount Schedule’ respectively.
Contd……
Steps: Conditional Discount Schedules applied using Price Rule
Create a Price Rule with valuation Event as Calculator, Calculation Evaluation Event as ‘On Calculate’ event with,
Price Condition: ‘Payment Type’ field on the Quote record is not blank
Price Action: Use the below formula to update the Quote Line field ‘SBQQ__DiscountSchedule__c’:
IF(TEXT(SBQQ__Quote__r.Payment_Type__c) = 'Upfront', SBQQ__Product__r.Upfront_Discount_Schedule__c,
SBQQ__Product__r.SBQQ__DiscountSchedule__c
)
Test: Conditional Discount Schedules applied using Price Rule
Navigate to a Quote record and update the ‘Payment Type’ field as Arrears.
Navigate to the QLE and add LTE Hotspot as a quote line. On the quote line, notice the discount tiers in
the discount schedule custom action. Click Save.
On the Quote record, change the Payment Type to Upfront and navigate back to the QLE
In the QLE, click Calculate. The quote line will now have have the Upfront Discount Schedule applied. This
can be verified by hovering over the discount schedule custom action in the QLE.
Pricing Based on Customer Segments and Quantity Range
Requirement: Your company sells a Product called MagSafe 245 Power. The price of the product varies by both the
quantity being quoted and the Customer Segment of the Account.
You will need a custom picklist field ‘Customer Segment’ on the Account object (this is already created in your org).
This filed has picklist values: Enterprise, Mid-Market, Commercial, ESMB
Create a custom formula field ‘Customer Segment’ on Quote object that fetches the customer segment value from
the account (formula - TEXT(SBQQ__Account__r.Customer_Segment__c)). (Tip: Price Rules cant
directly access Account level fields, hence you need to use a formula field to get the ‘Customer Segment on the
quote)
Create a custom object called ‘Segment Based Pricing’ that stores the values for Customer Segments, Quantity
Ranges and Prices as depicted in the previous slide (this object is already created in your org).
Create price and quantity range records for the Enterprise Segment in this custom object (as highlighted in red on
the previous slide).
Contd….
Steps: Pricing Based on Customer Segments and Quantity Range
Create a Price Rule to compare the the Customer Segment on the quote and the quantity of quote line with the values
stored in the custom object ‘Segment Based Pricing’ and return the quote line’s list price from the custom object
On the Price Rule, set the ‘Lookup Object’ field as the API name of the ‘Segment Based Pricing’ object.
Set the Price Condition as,
• The ‘Customer Segment’ field on the quote object should not be blank
• Quote Line Product Code equals MAG245W
Use the Lookup Queries to compare,
• ‘Customer Segment’ on the quote with the Customer Segment in the custom object (use the Lookup field)
• Quantity of the quote line should be greater or equal to the Lower Bound in the custom object
• Quantity of the quote line should be less than or equal to the Upper Bound in the custom object
Use the Price Action to,
• Set the Quote Line’s List Price based on the Price in the custom object (use Source Lookup field)
Test: Pricing Based on Customer Segments and Quantity Range
What if there are multiple products that follow this pricing strategy?
Use case combining price rules, twin fields, and configuration attributes to
calculate a quote line’s field value based on the configuration attribute
Requirement: You sell Apple MacBook (AP-MB) bundle. There is a product option for RAM in this bundle – RAM 8
GB. You want to allow the Sales Rep to be able to specify the total Gigabyte’s of RAM needed while configuring the
bundle. The system should automatically be able to adjust the quantity of RAM 8GB quote line based on the total
GB’s of RAM needed.
Tips:
You need to create a custom number field called ‘Memory’ on the Product Option object
Create a Configuration Attribute inside the Apple MacBook bundle, that allows the Sales Rep to configure the Total
Memory needed in the bundle
Create a twin field on the quote line object that maps the value of Total Memory Needed to the Quote Line
Create a Price Rule that divides the total memory by 8, to set the quantity of the RAM 8GB quote line
Steps: Use case combining price rules, twin fields, configuration attributes to
calculate a quote line’s field value based on the configuration attribute
Create a custom number field on the Product Option object with the name Memory
Create a custom number field on Quote Line object with name Memory (this is already created in your org)
Navigate to the Apple MacBook product record. In the Configuration Attribute related, list create a new Configuration
Attribute called ‘Memory’
On the Config Attribute, Target Field should be the API name of the Memory field (that you created in Step1). Specify Row
Order as 10, Column Order as 1, Position as Top, Apply to Product Options should be checked.
Create a Price Rule whose ‘Evaluation Scope’ is Calculator, ‘Calculator Evaluation Event’ is On Calculate
Price Conditions should be,
• Product Code of the Quote Line equals value ‘RAM8GB’
• Quote Line formula SBQQ__RequiredBy__r.SBQQ__ProductCode__c equals AP-MB
Price Action should be,
• Use this formula (SBQQ__RequiredBy__r.SBQQ__Quantity__c*Memory__c/8) to calculate the Quantity of Quote Line
Test: Automatically set the quantity of the RAM 8GB
Create a Quote and add Apple MacBook as one of the quote lines
Configure the Apple MacBook product and set the ‘Memory’ configuration attribute value as 256. Click Save
The quantity of the RAM 8GB quote line should be set to 32
Now change the quantity of the Apple MacBook quote line to 4. Click Calculate
The quantity of the RAM 8GB quote line should be set to 128
Hardware and Software Warranty
IT Complete Pack is a bundled product. It has Hardware and Software product options. The bundle also includes Hardware and
Software Warranty options. Configure the warranty options such that the price of the Hardware Warranty is 5% the list price of the
Hardware options and price of software warranty is 5% of the list price of the software options.
Note: All the software options are subscription products.
IT Complete Pack
Hardware
Apple MacBook Pro
LaserJet Printer
Apple ThunderBolt Display
Hardware Warranty
Software
MS Office 365
Cloud Storage 1GB
Software Warranty
Subscription Product Free for first 3 Months
Requirement: A client sells monthly office cleaning services which is a subscription product. They are running a special
campaign where customers who buy for a year of service will get the first 3 cleanings for free. How can this be
accomplished in Salesforce CPQ?
Steps: Subscription Product Free for first 3 Months
Add the Deep Cleaning Services product to the Quote Line Editor.
Click the pencil icon next to Custom. Then click ‘+’ sign to add a new segment.
Adjust the start and end dates of the two segments, such that first segment covers exactly 3 months. Remaining term
should be covered by the second segment. Click Save.
Click the forward arrow against the product name to view segment details
Provide a 100% Additional Discount on the First Segment
** You can also add the the Deep Cleaning Services product twice to the Quote Line Editor. Set the Start Date and End
Date of the first Quote line as 3 months and provide a 100% discount. You will have to add the Start Date and End Date
fields to the Line Editor field set on the Quote Line object
Use Case: Apply Discounts based on Promotion Codes and Dates
Marketing wants to promote a new line of products between 6/1/2020 to 6/30/2020 and have issued
promo codes to Sales Reps. Your sales reps will have to enter the Promo Code while creating a quote. If the
code is valid and quote expiration date lies between the Promotion Start Date and End Date, promotional
discount should be applied to quote line.
In addition, sales reps can also provide additional discounts on top of promotional discounts.
Use Case: Apply Discounts based on Promotion Codes and Dates
Store the Promo Codes, Discounts and Start Dates and End Dates in a custom object
Price Action:
• Action1: Fetch the Promo Discount from the custom object and store in a Quote Line custom field called Promotional
Discount
• Action2: List Price of the Quote Line = Original Price* (1 – Promotional Discount)
Use Case: Contracted Price
A client offers a customer a Contracted Price of 80 dollars for WiFi Router(a specific unit price for a specific product)
only when the Customer purchases a minimum quantity of 100 for that product. How can they accomplish this?
• If this preferred/contracted customer purchases 0-100 units of Wifi Router, no discount/no contracted price. They should
be charged whatever the list price is for the price book that's in effect
• If customer purchases 100 or more units of Product X, the contracted unit price is exactly 80 dollars
Price Waterfall
Original Price $100.00
List Price $100.00
Special Price Contracted Price, Custom $100.00
- System Discounts Discount Schedules 10%
Regular Price (*) $90.00
- Additional Discount Manually entered by the sales rep 20%
Customer Price $72.00
- Partner Discount 10%
Partner Price $64.80
- Distributor Discount 10%
Net Price Goes into Pipeline/Forecast Amount $58.32
* Regular Price also represents Special Price or Contracted Price after Discount Schedules
Steps: Contracted Price based on a condition
Create a Price Rule with valuation Event as Calculator, Calculation Evaluation Event as ‘On Calculate’ event with,
Price Condition: Quote Line field ‘Product Code’ has a value WIFIROUTER
Price Action: Use two Price Actions:
• Price Action 1: Quote Line field ‘SBQQ__SpecialPrice__c’ equals the formula: IF((SBQQ__Quantity__c<100),
SBQQ__ListPrice__c, 80)
• Price Action 2: Quote Line field ‘SBQQ__SpecialPriceType__c’ equals the value: Contracted Price
Contracts, Amendments and Renewals
61
Subscription Products
Subscription Pricing:
Fixed Price
Percent of Total
Subscription Term
Eg. Cloud Storage 1GB has a Fixed Price of 10 USD for a Subscription Term of 12 months
Contracting Process
Contracts + Subscriptions
Quote data Tracks the time-based products that may need renewing or
amending, facilitates forecasting by creating opportunities
Known information about what is
sold (products, quantities,
subscription terms)
Assets
Tracks one-time products
63
Lasting Records
How does CPQ create lasting records to track what a customer has purchased?
Opportunity Account
Quote must
• be Primary
• have an Account
• have a Start Date
• have a quote line for a Subscription Product
An email is sent to the user when errors occur.
Renewals
68
Renewal Overview
Subscriptions eventually end, so there’s a sales opportunity for another subscription next
year!
69
Record Type is
defined by ID
Term defaults to
Quote value
Identify participants if
different team handles
renewals
72
CPQ manipulates the Additional Discount field to achieve the original or uplifted price.
Amendments
76
Amendment Overview
Often customers will want a change to their subscription to add more (or remove some).
CPQ streamlines the amendment process. Lets say customer wants to buy more Cloud Storage after 6
months
77
Salesforce CPQ supports automatically switching to a new price book when you amend contracts.
Product Configuration Use Cases
Product Configuration Tools
Requirement: Your company sells Diesel GenSets. Customers can also purchase an Yearly Maintenance for the GenSet
which is a subscription product. The Maintenance is priced at 3% of the Net Price of the Diesel Genset. Configure the
Maintenance product as an option inside the Diesel Genset product and achieve the desired pricing for the
Maintenance product.
The following products are already created in your org:
Requirement: A Sales Rep can only sell products that belong to the Product Family defined on his/her user record.
Update the ‘Add Products’ Custom Action to allow the Sales Rep to only select Products that belong to his Product
Family.
Overall Steps:
You can associate Search Filters to Custom Actions. Search filters allow you to filter products based on specific field
values.
Search Filter records have a ‘Filter Source Field’ that can source the filtering value from a Quote level field.
Quote has a lookup to User object through the Owner field and Sales Rep field. You can use cross object formula
fields to fetch user level fields from these relationships to the quote record.
In your org, ‘Product Family’ is a custom field created on User object. This field defines the Sales Rep’s product
family at the user record level. ‘Sales Rep Product Family’ is a custom formula field that fetches the user level
Product Family and stores it at the Quote level.
Steps: Show/Hide Products based on the Product Family defined at Sales Rep’s User
record
Custom field to define a Sales Rep Product Family is already created on the User object in your org
Create a custom formula field on the Quote object that references the Product Family defined at the ‘Sales Rep’
user record. Name the field ‘Sales Rep Product Family’ and use the formula TEXT(
SBQQ__SalesRep__r.Product_Family__c)
Create a new Search Filter on the ‘Add Products’ Custom Action record. The Search Filter should target the
‘Product Family’ field on the ‘Product’ object.
Next you need to pass the ‘Sales Rep Product Family’ as a filter value to the Search Filter created in the previous
step. Next step will help you to do that:
On the Search Filter record (created in Step3), set the ‘Filter Source Field’ as the API name of the ‘Sales Rep
Product Family’ field on quote object. (This will pass the value of the ‘Sales Rep Product Family’ field as a filter
value to the Product Family filter). Then set the controlling field value to Quote.
On the Search Filter record, check the ‘Hidden’ checkbox.
Test: Show/Hide Products based on the Product Family defined at Sales Rep’s User record
Steps:
Navigate to Setup>Users>Admin User record. Update the ‘Product Family’ on the user record as ‘Hardware’
Create a new quote from an opportunity. Verify the ‘Sales Rep Product Family’ field is populated on the
quote. Navigate to the QLE and add products using the ‘Add Products’ Custom Action.
Verify that the user is able to view only products that belong to the Hardware product family.
Now navigate back to the Admin User record and change the picklist value to blank (this will ensure in later
exercises you are able to search for all products)
Show/Hide Products based on the Product Family defined at Sales Rep’s User record
What are the other options to Show/Hide Products based on the Product Family defined
at Sales Rep’s User record?
Hide a Product based on Prior Purchases
Requirement: IT Corporate Pack has a Product Option called Barracuda NextGen Firewall X300. You need to
automatically hide this Product Option from IT Corporate Pack, if the customer has purchased this product in the past.
Steps: Hide a Product based on Prior Purchases
There are three main steps to creating a Selection Product Rule which checks prior purchases of a Product
Create a custom field on the Asset object to filter for a specific Product. This field is already created for you –
ProdCode. It’s a formula field that uses the syntax- Product2.ProductCode
(Tip: Summary Variables aren’t compatible with Standard Salesforce fields. Hence in order to count the number of assets using a
summary variable we need a custom field on the Asset object. This custom formula field ‘ProdCode’ is already created in your org)
Create a Summary Variable to count the number of Assets for the Barracuda NextGen Firewall X300 product. In this
Summary Variable,
• You need to ‘Sum’ the ‘Quantity’ of ‘Assets’ whose ‘ProdCode__c’ is BA-FWX300 (API name of the ProdCode field, has been
added as a picklist value in the Filter Field on the Summary Variable)
• Contd….
Steps: Hide a Product based on Prior Purchases
Create a Product Rule which hides the product in configuration if it has been previously purchased
• Product Rule ‘Type’ should be Selection and ‘Scope’ should be Product, ‘Conditions Met’ should be All, Active is Checked,
‘Evaluation Event’ is Load. Click Save.
• Add an Error Condition that checks the Summary Variable created in Step2 is greater than 0
• Add an Action, that Hides the Barracuda NextGen Firewall X300 product
• Create a Configuration Rule and update the ‘Product’ as IT Corporate Pack
Test: Hide a Product based on Prior Purchases
Validate by creating a Quote against the Account ‘Burlington Textiles Corp of America’ (this account already has an
asset for the Barracuda NextGen Firewall X300 product)
Navigate to Quote Line Editor and add IT Corporate Pack product to the quote.
Configure the IT Corporate Pack bundle and verify if the user can view the Barracuda NextGen Firewall X300 product
option
Hide and Display Product Options based on Shipping Country
Hide/Display Product Options in the IT Starter Pack bundle, based on the Shipping Country of Account
Create a custom formula field on the quote object to capture the Shipping Country from Account. Name the field
‘Shipping Country’ and formula as SBQQ__Account__r.ShippingCountry
Create a custom object to store the details of products that need to be displayed/hidden based on the shipping country.
This object is already created for you ‘Country Based Product Selection’.
The first three records in the table on the previous slide have already been created in your org. Add the records
highlighted in red in the previous slide to the ‘Country Based Product Selection’ object.
Note: In practice this table may have many more records
Contd…..
Steps: Hide and Display Product Options based on Shipping Country
Create a Product Rule that compares the shipping country from the quote with the custom object and dynamically
hides/displays product options in the IT Starter Pack bundle
• Rule ‘Type’ should be Selection, ‘Scope’ should be Product, ‘Evaluation Event’ should be Load. Click Save.
• ‘Lookup Object’ field should be the API name of the ‘Country Based Product Selection’ object (add the API name as a picklist
value)
• ‘Lookup Type’ field should be the API Name of the ‘Type’ field on ‘Profile Based Product Selection’ (add the API name as a
picklist value)
• ‘Lookup Product’ field should be the API Name of the ‘Product’ field on the ‘Country Based Product Selection’ object (add
the API name as a picklist value)
• ‘Lookup Required’ field should be the API Name of the ‘Required’ field on the ‘Country Based Product Selection’ (add the
API name as a picklist value)
• Error Condition – ‘Shipping Country’ field on the Quote object should not be blank
• Configuration Rule – ‘Product’ should be IT Starter Pack and ‘Active’ checked
• Lookup Queries - Compare the ‘Shipping Country’ on the Quote with the field ‘Shipping Country’ in the ‘Country Based
Product Selection’ object (Add the API name of ‘Shipping Country’ field to the Tested Field)
Test: Hide and Display Product Options based on Shipping Country
Create a Quote for the Account – ‘Burlington Textiles Corp of America’ and add IT Starter Pack as a Quote Line
Configure the IT Starter Back Bundle
Verify that the Apple US Keyboard is selected whilst the Apple UK Keyboard and Apple FR Keyboard is hidden from
view
Custom Template Section
Exercise: Display Discount Schedule in the Quote Output Document
Requirement: ABC Corporation wants to display the Discount Schedules in the Quote Output Document
Steps:
Use the Developer Console (or Setup>Apex Classes) to create a new Apex Class – DiscountSchedulePrintController
Copy the Apex Class code from the Exercise Guide and paste it in Developer Console. Save the Class.
Use the Developer Console (or Setup>Visualforce Pages) to create a new Visualforce page – DiscountSchedulePrint
Copy the VF Page code from the Exercise Guide and paste it in Developer Console. Save the VF Page.
Create a new Template Content record. Template Content Type should be Custom.
Name the Template Content record as ‘Discount Schedule’. Add the URL of the VF Page (that you created in Step4) in the Custom
Source field on the Template Content record. Click Save
A Quote Template with the name ‘Training Template’ is already created in your org. Add a new Template Section to this Quote
Template.
Name the Template Section as ‘Discount Schedule Table’. Set Display Order as 20. In the Content field, lookup the ‘Discount Schedule’
custom content that you created in Step 6. Click Save
Exercise: Display Discount Schedule in the Quote Output Document
Test:
Create a new Quote and add Toner Recycling as a Quote Line (this product has a Discount Schdeule associated to it).
Add a couple of other products. Click Save.
On the Quote Detail Page, use the ‘Preview Document’ Action to preview the Quote Output Document
Verify that the Discount Schedule is displayed on the document
Open a VF Page using a
Custom Action
VF Page to display Inventory levels in the QLE using a Custom Action
Use the Developer Console (or Setup>Apex Classes) to create an Apex Class by the Name viewController
Copy the Apex Class code from the Exercise Guide and paste it in Developer Console. Save the Class.
Use the Developer Console (or Setup>Visualforce Pages) to create a VF Page using the Name viewControllerPage
(code on next page)
Copy the VF Page code from the Exercise Guide and paste it in Developer Console. Save the VF Page
Create a new Custom Action. URL should be the URL of the VF Page, URL Target as Popup, Page as Quote Line Editor,
Location as Quote, Icon – any of your choice
Navigate to the Quote Line Editor and click on the Custom Action to view the Inventory levels
CPQ Plugins
External Configurator Use Cases
Use Case:
• Visualize in real time the product as its being configured
• Industrial Manufacturer with very complex selectors/configuration requirements
• Render a custom Configurator UI for the products marked as Externally Configured
Salesforce CPQ provides two ways to access an external configurator from the quote line editor.
• Define an external configurator in Salesforce CPQ package settings. Then, enable external configuration on any
product that you want sales reps to use within that configurator. When a sales rep adds or configures that product
in the quote line editor, Salesforce CPQ launches the external configurator
• Create a custom action that launches a URL. When a sales rep clicks the custom action, Salesforce CPQ launches
the external configurator.
Quote Calculator Plugin Use Cases (QCP)
Use Cases:
• Client has multiple contracted prices in a separate object. Use the QCP to query the object, pull the prices and populate
accordingly
• Take the Length, Width, Height, Weight, Origin and Destination zip code and
use a Custom Script to make an API call to USPS service to get the shipping cost
Requirements that would otherwise cause you to use Flows/ Builder/Apex on Quote Line object.
Eg. Use the QCP to loop through the quote lines multiple times to get net price
Product Search Plugin Use Cases
Use Case:
• When the user enters the Product Search, the products returned in the search results are shown from
the most recent Last Ordered Date. Users can further filter through the Product Search filter panel, if
necessary.
• Make a call to an external system to check inventory or product lead times and accordingly display
Products
Page Security Plugin (PSP) Use Cases
Use Case 1: Client needs to make a field non-editable based on a user level field or a certain product type
• Create a formula field on the quote to fetch the user field at quote level
• Set up the PSP to look at this field and enable/disable the field based on that
Use Case 2: Client wants to hide the discount field based on lines being below a certain $ amount
• Set up the PSP with an If-Else statement to hide the field when the Amount is below the threshold
Use Case 3: Client wants to hide the cost information based on sales rep role
Use Case 4: Client wants to hide the cost information based on a certain product
Order Management Plugin
Order Date settings for the Salesforce CPQ package can be configured two different ways:
Use Case: The Quote does not have a Start Date set, and Today’s date isn’t what the customer is looking for
either - they want (Today + X days).
Conditionally Hide a Field Value using the Page Security Plugin
Requirement: Users should be able to view the cost of all the products except the product Thunderbolt 2M. Use the
PSP to hide the cost of the Thunderbolt 2M product.
Steps:
Navigate to the tab for the Custom Script object
Create a new Custom Script record and name it CustomScriptCode
Copy the code from the PlugIns Exercise Guide and paste it in the ‘Code’ field. Click Save.
Go to Setup>Installed Packages>Configure>Plugins and add the name CustomScriptCode to the Quote Calculator
Plugin
Navigate to Setup>Objects>Quote Line>Field Sets and add the Unit Cost field to Line Editor field set
Test:
Create a Quote and add ThunderBolt 2M and LaserJet Printer to the quote. You will notice the Unit Cost for
ThunderBolt 2M is not displayed while that for LaserJet Printer is displayed
Verify if the Additional Discount is editable for the ThunderBolt 2M quote line
Conditionally make a Field Value non-Editable using the Page
Security Plugin
Steps:
Navigate to the Custom Script record: CustomScriptCode (you created this in the previous exercise)
Copy the code from the PlugIns Exercise Guide and paste it in the next line at the end of existing code
Test:
Add ThunderBolt 2M and LaserJet Printer to a quote. You will notice that the user cannot edit the Additional
Discount for ThunderBolt 2M , whereas for LaserJet Printer a discount can be added.
Calculate Component Custom Total using QCP
Requirement: Sum the total list price of the components in the Apple MacBook Pro bundle and add that to a custom
field on the parent product
Steps:
Create a custom currency field on the Quote Line object – Component Custom Total (this field is already created in your
org)
Edit the Custom Script ‘CustomScriptCode’, and add the code from the PlugIn Exercise Guide in a new line at the end of
existing code. Click Save.
Test:
Create a quote and add Apple MacBook Pro as a quote line. Keep the default product options selected, click save in the
configurator and then Save the Quote.
Navigate to the Apple MacBook Pro Quote line (using the Quote line related list on the Quote). The Component Custom
Total should be 250, which is the sum of the list price of the selected product options.
Implementation Best Practices
General Development
Order of Implementation
1. Get clearly agreed upon product catalog data. A good product load with Product Codes, Product Family, Sub-Families, etc. will
be the basis of the rest of the implementation.
2. After Products have been loaded and well defined, Bundles/Configuration should be implemented.
3. Pricing should be set up after Configuration is complete
4. After Products, Configuration, and Pricing are well defined, Guided Selling, Approvals, Quote Template, and Renewals /
Amendments may be worked in parallel.
General Development
Common Causes of Performance Issues
• Attempt to use CPQ functionality first (Auto-mapping, Price Rules, Product Rules, Summary Variables, etc. instead of Flows,
Process Builder, Apex, etc) when trying to manipulate the following objects:
• Workflow Rules, Process Builder, Flows, and Triggers will not be activated while manipulating Quotes, Quote Lines, Quote Line
Groups, or Product Options inside of the CPQ Visual Force pages. Price and Product Rules should be used first and foremost for
manipulations to these objects.
General Development
Please be cognizant of triggers, workflows, validations and other things that may be operating outside
of the CPQ package on these objects.
These may interfere with functionality from the CPQ package and prevent Renewal/Amendment
Opportunities and Quotes from being created
General Development
Guidelines for Well Designed CPQ implementations
• Quote Lines < 200 It's sometimes needed to exceed these numbers (and these are not hard limits),
• Quote Line Groups < 10 but if these numbers are being exceeded, there is often a flaw in design leading to
over-use of a particular object. It's also important to take into note how
• Active Price Rules < 50 combinations of objects work together as well. Large amounts of processing
• Active Price Rules using Lookup Objects < 3 required for many different reasons on a single quote can become problematic.
• Price Actions per Price Rule< 10
• Total Fields on Quote Line < 200
• Configuration Rules per Bundle < 20
• Product Options per Bundle < 75 These are NOT product
• Levels of Nested Bundles < 2 limitations rather guidelines
• Quote Template Sections < 25 for well designed CPQ
implementations
• Price book entries must be created for products to be available in product selection, also products must be
marked as Active.
• When a new Quote is created or edited the Quote's Currency field can be used to determine what currency
this Quote should be restricted to.
• However, the currency on primary quotes must match the opportunity's currency.
• A Price Book can have products with prices in multiple currencies.
• Following managed package objects support Multi-Currency (PO’s don’t)
• Quotes & Quote Lines
• Block Prices
• Price Dimensions
• Discount Schedules (when discounting by amount)
• Costs
• Contracted Prices (when discounting by amount)
• Subscriptions
Product Catalog
• Setting up an optimal product catalog will make everything about the project and user experience easier and better.
• Get as detailed of a product extract as possible, as early as possible.
• Along with the general product extract, try to get all existing “price books” being used by the customer to understand
complexities around multi-currency or regional based pricing.
• Subscription Products will be prorated based on Start Date and Subscription Term/End Date (End Date wins over
Subscription Term if both are populated), and converted to Subscriptions on Contracts when Contracting is performed. The
fields Subscription Pricing, Subscription Term, and Subscription Type should be filled in for all subscription products, and
should be BLANK for non-subscription products.
Product Catalog
Setting an Optimal Product Catalog
Look for opportunities within the product list to reduce number of entries when possible. This will make development and
maintenance easier, and likely enable better UX for product selection.
• If there are products with the same name but have quantity or term lengths associated with them, see if these can be eliminated
with discount schedules or block pricing. Examples:
• Product A with 1-49 Users, Product A with 50-99 Users, Product A with 100-199 Users...
• Product B - 1 year, Product B - 2 year, Product B - 3 year...
• Product C - QTY 1000 - 1 year, Product C - QTY 2000 - 1 year, Product C - QTY 1000 - 2 year...
• If there are multiple entries for product/attribute combinations, consider whether these can be consolidated into a single product,
and use configuration, global, or other types of attributes to describe these products. Examples:
• Product A - RED, Product A - BLACK, Product A - BLUE...
• Product B - English, Product B - Spanish, Product B - French...
Configuration/Bundles
• Design bundles and product configuration logic for scalability. Having a lot of products, options, and configuration rules is okay as
long as the number referenced at one time remains reasonable. Avoid approaches that result in unsustainable growth.
• Be mindful of how many Quote Line and Product Option custom fields are being created. During calculation sequences, all fields
on these objects are queried. Minimizing the number of fields being used, and even the length of their API names can help to
improve performance.
• Use the “Apply Immediately” checkbox on options and config attributes, only when you need to fire product or price rules on
selection or change of that item. If the rules associated with that option or attribute can wait until “Save”, then no need to toggle
the “Apply Immediately” checkbox.
• Only the following Unit Price levels should be modified directly. Beyond this level, you should never attempt to directly set a
Unit Price. Instead, apply a discount. Salesforce CPQ will automatically apply the discount to calculate the price, incorporating
proration as necessary.
o Original Price
o List Price
o Special Price
• The CPQ Pricing Engine is complex and very useful. Familiarize yourself with the Calculation Sequence and OOB Pricing fields
before attempting any type of customization, no matter how minor.
https://help.salesforce.com/articleView?id=cpq_quote_calc_process.htm&type=5
• When discussing pricing needs with your customer, determine whether their pricing strategies set “Go to Market” prices (the
actual starting price they want their sales reps to begin negotiations with a prospect) vs. allowed pricing ranges. Discount
Schedules and Contracted Pricing will set “Go to Market” pricing for a quote, effectively giving a different starting price for a
product than the List Price.
Quote Calculation Sequence: Simplified
There are four calculator events during which your Price Rules can execute.
Price Rules
• When using Price Rules, it's very rare to need more than one Calculation Event. Do not add multiple events unless it's known
exactly why this calculation needs to be processed multiple times per cycle.
• Salesforce declarative tools do not always give you control over execution order. For example, if there are multiple Workflow
Rules on an object, there is no way to know which will fire first.
• Salesforce CPQ allows you to specify evaluation orders for most types of rules - and even actions - so your pieces of logic can be
controlled and responsive to each other in a way that is not easily possible on the broader Salesforce platform.
• Price Conditions for all price rules on a single evaluation event (On Calculate for example) are evaluated BEFORE their actions are
processed. So, it's not possible to have a Price Rule fire if it's Condition is dependent on another rule's Action in the same event,
even if the value is coming from a rule earlier in the order sequence.
Price Rules
o From the Quote, go directly to a Quote Line record instead of using the quote line editor (QLE). From there trigger a
calculation by changing referenced field values on this record and saving (Quantity is a good one). This will show many more
fields than in the QLE, without needing to modify the QLE field set. It will also adapt to changes in the rules without needed
to refresh the page, or exit in and out of the QLE.
o The same sort of trick can be used on the Quote too, for Quote level price rules. Find a referenced field to toggle, and it's
not necessary to enter QLE all the time.
• When writing Quote Line level price rules using Look-up Tables, the number of lookup price rules, number of lookup queries,
number of quote lines, and number of lookup table records can have a multiplicative effect on the total query rows returned
during calculation. Reducing any of these four things can reduce the number of query rows returned.
• When using Lookup Queries attempt to minimize the amount of queries related to a price rule. Example, if you are querying a
table to find a price and its based on product name, currency, and account type, instead of creating 3 queries related to the price
rule, create formula fields (one on the quote line and one on the look up object that combines these 3 values (these will be the
'keys' to match in the query) , and then create a single lookup query matching those fields.
Price Rules
• When using many summary variables to update fields on a quote (often done to keep track of Product Family specific values
Hardware List Total, Hardware Net Total, Software List Total, Software Net Total.....), just put them in a single rule with many
actions.
• When using tiered pricing methods, such as Block Pricing or Discount Schedules, make sure there are no gaps in your quantities
for tiers. This will prevent errors from coming up in the process.
Renewals and Amendments
• Review the documentation on Renewals and Contracts before attempting to set up for the first time
• Do not check both “Renewal Forecast” and “Renewal Quoted” checkboxes at the same time. “Renewal Forecast”, as a best
practice, should be checked as early as possible in the process. Typically, this is done as soon as the Contract is Activated.
• “Renewal Forecast” will create a quote record, for purposes of synching data to the Renewal Opportunity, and then delete the
record. Please keep this in mind if there are issues with the Renewal Opportunity not being formed correctly. There could be
something interfering with the quote creation process (validations, triggers, etc on the CPQ Quote object).
Guided Selling
Guided Selling
“Guided Selling” is a very loaded term. Every CPQ customer will say that they want and need Guided Selling. However, very few of
them will need a Quote Process to accomplish this. Here are all the layers of an implementation to be considered to enable a guided
quoting experience:
Bundles
• By setting up configurable solutions with product rules, or sometimes just by simply grouping products together with features and
options, a guided experience is further achieved.
Quote Templates
• Keep in mind that document generation is split into two major steps; assembly and conversion
• Assembly takes place in Force.com and produces an XML document
• Conversion takes place on Heroku and generates the target binary (PDF or Docx)
Use extra caution when using platform automation on the following objects:
Quote Line / Quote / Opportunity Product / Opportunity
• Updates to a Quote Line triggers a full recalculation of the entire Quote, including all Quote Lines.
• If the Quote is Primary, the Opportunity Products will sync as well, updating the Opportunity in the process.
A large number of objects are touched whenever a Quote recalculation is initiated, and multiple saves/trigger
executions may occur. Exceeding governor limits on CPU time and SOQL Queries most commonly occurs due to
excessive and/or poorly designed automation on these objects.
Package Installation
• Install most recent Generally Available Major Release in Production org. Check in with a Salesforce resource (Customer Support or
SM) for the correct install link. Do NOT install from a link from training materials or older emails, these are often out of date. New
patches are sometimes released as frequently as every week.
• Install for ALL USERS. Access is provisioned through Licenses. Installing for all users will assure permissions to needed objects are
available when a license is provisioned to a certain group of users. It will not give access to anyone until they have a license. This is
also true for the Advanced Approvals (SBAA) package.
• Refresh Sandboxes from the newly installed Production org before starting any development project.
• Authorize the Advanced Calculator from the configuration settings after installation is complete. Note: If the user that Authorizes
this services is deactivated, the service will need to be authorized again. Otherwise this is a one-time process.
Case Study 1
Review the case study (15 minutes)
We will discuss the solution design after 15
minutes
Case Study was shared over an email yesterday
and relates to set up of POS Software
Case Study 2
Review the case study (10 minutes)
We will discuss the solution design after 10 minutes
Case Study was shared over an email yesterday and
relates to set up of Windows product