Table of Contents
Error avoidance
- help sales staff to avoid errors in product composition
- for this purpose certain conditions are defined – pass/fail test
- for some tests all rules must pass the test, for some tests only some must pass
- this must be communicated to CPQ

Example
A product may not be sold to a particular industry.
- Salesforce CPQ
- Product Rules
- New
- Type Name for Product Rule (=
Product not for the Specific industry
) - Type – choose Validation
- Evaluation Event – choose Always
- Message = insert appropriate Message
- z.B:
This product is not able for the selected industry
!.
- z.B:
- Save
Create error condition
- Compare two data
- which data should be compared and how?
Example
- Open Product Rule
- Realted List – Error Conditions – New
- Tested Object – Select Quote Line
- Tested Field – Select API name of field to be tested – Add field to picklist if necessary (e.g.:
SBQQ__ProductCode__c
) - Operator – select equals
- Filter Type – select Value
- Filter Value – select the value for which the field (in the example:
SBQQ__ProductCode__c
) should be checked (e.g.42.45.12.34.56
) - Save
Note: Additional rules can be created. Fields to be checked must be on the following objects.
- Quote
- Quote Line
- Quote Line Group
- Product Option
- Confguration Attributes
- Upgraded Asset
If fields to be tested are located on linked objects, then these must be transferred to the corresponding level via a formula field! This field must be added to the „Tested Field“ picklist for the test. This picklist is dependent on the „Tested Object“ picklist.
Testing the Product Rule with an appropriate quota and a suitable product!
Advanced Conditions
- for extended conditions the error conditions must be provided with an index
- so the product rule can be adapted accordingly

Where and when should CPQ evaluate fault conditions?
Product vs. Quote – Scope – Where?
- Product Rules can be applied to Product Configuration or Quote Lines, not both
- should this be necessary >>> create 2 rules

Evaluation Event – When?
- when should the product rule be executed?
The combination of „Scope“ and „Evaluation Event“ determine the evaluation time.

Scope | Evaluation Event | Wen? |
Rule Types |
Product | Load | First Load - Product Konfiguration | Selection, Filter |
Product | Edit | Modify the Attributes and Options in Product Configuration | Selection, Validation |
Product | Save | Save-Button - Product Configuration | Alert, Validation |
Quote | Save | Change to Quote Line - after Product-Selection or Configuration | Selection |
Quote | Save | Save or Quick-Save - Quote Line Editor | Alert, Validation |
- Therefore: The combination „Product/Load“ does not lead to any evaluation by CPQ.
Apply rules immediately!
possibility – product option
- Activate checkbox at product option
- Evaluation Event (Product Rule) must be „Edit„
- by setting the checkbox „Apply Immediatly“

2nd possibility – product attributes
- Activate checkbox at product attribute
- Evaluation Event (Product Rule) must be „Edit„

3rd possibility – evaluation sequence
- The valuation sequence (Product Rule) also has an influence

Rules for certain bundles
- to make sure that a bundle is not misconfigured.
- One option must not be missing
Example:
Summary variable
- Summary variable to sum up the required bundle option.
- e.g.: a PC must not be delivered without keyboard – must be greater than 0
- Summary Variables
- New
- Specify name (e.g.: Keyboard Sum)
- Aggregation Function – e.g.:
Sum
- Select Aggregation Field – Quantity
- Filter Field – e.g. :
Select Product Code
- Select corresponding operator – equals, Ends with
- Filter Value – specify appropriate filter value
- Save
Bundle specific rule
Product Rule
- Product Rule
- New
- Specify name
- Type – Select Validation
- Scope – Select Product
- Evaluation Event – Save
- Activate Active
- Condition Met – All
- Message – Specify corresponding message
- Save
Error Condition
The error message should trigger if the bundle option is e.g.: equal to 0.
- Error Conditions – Related List – New
- Tested Variable – Lookup to the corresponding Summary Variable
- Operator – e.g.:
equals
- Filter Type – Value
- Filter Value – e.g. :
0
- Save
Assign the rule to the bundle.
- Configuration Rules – Related List – New
- Activate Active
- Product – Select corresponding bundle
- Save
Testing the Product Rule with an appropriate quota and a suitable product!
Test product option fields – limits
- CPQ goes through each option, performs each test individually as if it were the only one
- only selected options are tested
- test two separate options in the same rule
- productcode = mouse
- productcode = keyboard
- both should be true – „All“ at „Conditions Met“ must be set
- If CPQ tests the mouse option, then the keyboard option fails.
- Solution:
- count one of the two options – Summary Variable
- Productcode = Mouse
- Sum of keyboards > 0
- count one of the two options – Summary Variable
- Test rules thoroughly after creation!
- if it is triggered
- if it is not triggered
Automatic product configuration – selection rule – one product
- Product Rules – Type=“Selection“
Possibilities of influencing the product configuration
Action | Result |
Add | option activated |
Remove | option deactivated |
Disable | checkbox on option not available |
Enable | checkbox available |
Disable & Remove | option deactivated and checkbox not availbable |
Enable & Add | option activated and checkbox available |
Hide | option hided completely |
Show | option is shown |
Hide & Remove | option hided completely and deactivate it |
Show & Add | option will be shown and activate |
Create two opposite selection rules
- An action is created instead of a message
- General scenario: an option (A) may only be selectable if another option (B) is selected.
- Summary variable – count option B – to check if selected
- deactivate (and remove) a rule – option A
- activate (and add) a rule – option A
- Tab – Summary Variables
- New
- Specify name
- Select Target Object – e.g:
Product Option
- Select Aggregation Function – e.g.:
Sum
- Select Aggregation Field – Quantity
- Select Filter Field – e.g.:
Product Code
- Select Operator – e.g.:
end with
- Filter Value – specify accordingly
- Save
This summary variable can also be used in multiple product rules for testing.
- Tab – Product Rules
- New
- Specify name
- Select Type –
Selection
- Select Scope –
Product
- Select Evaluation Event – e.g:
Always
- Check Active
- Select Conditions Met –
All
- Save
- Error Conditions – Related List – New
- Tested Variable – Lookup – Select Summary Variable!
- Select Filter Operator – e.g.:
equals
- Select Filter Type –
Value
- Filter Value – e.g.:
0
- Save
Now specify the action that should happen when the condition is met.
- Actions – Related List – New
- Select Type – e.g.:
Disable & Remove
- Product – Lookup – select the corresponding bundle option! (Option A)
- Save
Now the rule still needs to be assigned to the bundle.
- Configuration Rules – Related List – New
- Check Active
- Product – Lookup – Select corresponding bundle!
- Save
Selection rules do not undo their actions and therefore you need an additional rule that does that then.
- Clone Existing Rule – Click Clone with Related
- Click Clone
- Edit
- Customize name
- Save
- Customize Error Conditions
- Save
- Customize Action
- Save
So that these rules are only applied when a Sales Rep changes the bundle.
- Tab – Products
- All Products
- Related
- View All
- Edit – at the corresponding bundle option – (Option B)
- Activate Apply Immediately
- Save
Selection rule – multiple products
Beispiel
- Customer lactose intolerant
- do not supply dairy products
- mark all milk products with checkbox
- Create action on rule accordingly
- Filter Field
- Operator = „equals
- Filter Value = True
- Product – Lookup – leave empty
Automatically add product to quote – selection rule
- e.g. automatically add a free promotional item when purchasing a specific product.
- Tab – Product Rules
- New
- Specify name
- Select Type –
Selection
- Select Evaluation Event –
Always
- Activate Active
- Select Conditions Met –
Any
- Save
- Error Conditions – Related List – New
- Select Tested Object – e.g.:
Quote Line
- Select Tested Field – e.g.:
SBQQ__ProductCode__c
- Select Operator – e.g.:
starts with
- Select Filter Type –
Value
- Specify Filter Value – enter corresponding value
- Save
- Actions – Related List – New
- Type – Add
- Product – Lookup – Select related product
- Enable Required (for selection rules required for type „Add“)
- Save
Test rule with corresponding quota!
- Offer related exclusion rules – executed when returning to the offer editor from „Product selection“ or „Product configuration“.
- bundles can be added automatically
- no configuration page before adding
- can be edited quote line afterwards

- no hiding, deactivating and removing with selection rules possible
- (for types hide, disable or remove – do not enable „Required“ – does not work)
Selection rules vs. option restrictions
Selection rule / Product rule | Option restriction |
Apply unlimited to bundles | can act from several options |
can add options | can activate options only |
several conditions possible, which evaluate information outside the bundle context | only simple condition when option A is selected |
can act from several options | is limited to only one option |
Too many rules – lookup queries
Example
- Sell certain products only to certain countries
- disable options not allowed for the country
- usually separate product rule required for each country
- many too much administrative effort
- Solution:
- Lookup Queries
Required data
- Data source needed that describes all scenarios – Custom Object.
- Example:
Example - Custom Object
Country | Product | Action |
USA | Option A | Activate |
USA | Option B | Activate |
UK | Option C | Activate |
UK | Option D | Activate |
Germany | Option E | Activate |
Germany | Option F | Activate |
Lookup Product Rule
- Tab – Product Rules
- New
- Specify name
- Select Type –
Selection
- Select Scope –
Product
- Select Evaluation Event –
Load
- Activate Active
- Select Lookup Object – corresponds to API name of custom object
- Select Lookup Type Field – corresponds to API name of field in custom object that defines action
- Select Lookup Product Field – corresponds to API name of the field (Lookup on Product) in the custom object that defines the product.
- Select Lookup Required Field – corresponds to API name of the field in the custom object that defines e.g.: the country
- Save
CPQ must now compare the data from the Quote with that from the Custom Object.
- Lookup Queries – Related List – New
- Select Match Type –
Field Value
- Select Tested Object –
Quote
- Select Tested Field – e.g.:
SBQQ__ShippingCountry__c
- Select Operator – e.g.:
equals
- Select Lookup Field – corresponds to API name of the field in the custom object that defines e.g.: the country
- Save
Alternatively, lookup queries with static value can be compared.

Or apply to the attributes as well.
- in this case „Tested Configuration Attribute“ is used
In addition to the lookup query for the custom object, an action is required that disables the remaining options.
- Actions – Related List – New
- Select Type –
Diable & Remove
- Select Filter Field –
Product Code
- Select Operator – e.g.
contains
- Filter Value – specify corresponding values
- Save
First, all options are deactivated, and then all the required hand of the country is activated.
Now assign the bundle to be checked to the product rule.
- Configuration Rules – Related List – New
- Activate Active
- Product – Lookup – Assign corresponding bundle
- Save
Test configuration with appropriate rate!
Validation Rules
Product Rules can also be configured as a Validation Rule using Lookup Queries.

Dynamic Bundles
- automatically add new products to bundle and remove products that are no longer needed
- an „Add Options“ button appears
- a small additional product selection list appears for the bundle
- are no option records for the bundle
- so you can not control the behavior
- so it is easier to keep the „virtual“ options
- for filtering additional custom field of products is needed (e.g.: checkbox or picklist)

- CPQ needs additionally the same Custom-Field at Product-Option
- CPQ can thus create the small additional product list
- Setup
- Object Manager
- Product Option
- Fields & Relationships
- New
- Checkbox
- Next
- Specify Label
- Next
- Next
- Save
Set up dynamic product
- special feature
- special product rule
- Tab – Product
- All Products
- Select product – select bundle
- Related
- Features – Related List – New
- Specify feature name – e.g:
Upsells
- Min Options =
0
- Number – e.g.:
50
- Select Option Selection Method –
Dynamic
- Save
Set up filters for the „Upsell“ section. Currently all products are displayed.
- Tab – Product Rules
- New
- Specify name
- Select Type –
Filter
- Select Scope –
Product
- Select Evaluation Event –
Load
- Activate Active
- Select Conditions Met –
All
- Save
Create action that uses the created filter.
- Action – Related List – New
- Select Type –
Default Filter
- Select Filter Field – API name of the custom field on Products and Product Options
- Select Operator – e.g.:
equals
- Filter Value – specify corresponding value
- Save
Additionally a configuration rule for the assignment of the bundle and the included „upsell“ list.
- Configuration Rules – Related List – New
- Activate Active
- Product – Select Lookup – Assign the corresponding bundle
- Product Feature – Select Lookup – Assign the previously created feature
- Save
Test configuration with appropriate rate!!!
Product Rule – Action – Filter Types
- in the small product selection additional filter option available
- the selection of the filter type of the action in the product rule has an effect on it
- Default Filter – the filter created above will be kept after clicking the „Clear Filter“ button.
- Optional Filter – the filter created above will not be kept after clicking the „Clear Filter“ button and all products will be presented for selection again
