Loading

Salesforce CPQ Filter Product Rule for Dynamic Bundles

Date de publication: Nov 4, 2025
Description
On the Feature, the Option Selection Method of 'Dynamic' presents to the user an 'Add Options' button during configuration of a bundle.  By default, pressing the 'Add Options' button will take the user to a separate page, presenting all products in the same manner as an unfiltered search.  However, in most scenarios, for the Feature in question, an admin would like to display a pre-filtered list of products available for selection.  The following is an example of a use case which accomplishes this goal.
Résolution

The use-case for the following example is as follows; The admin would like the user to select from a pre-filtered list containing only Hardware products within the "Hardware" Feature of the "Many Wares" bundle.  

In order to accomplish this goal, there are 5 steps

  1. Set the Option Selection Method on the Feature
  2. Create the field to be used for filtering on the Product Object
  3. Create the field to be used for filtering on the Product Option Object
  4. Create the corresponding Filter Product Rule 
  5. Validate


Set the Option Selection Method on the Feature

  1. Navigate to the relevant Feature
  2. Set the Option Selection Method to 'Dynamic'


Create the field to be used for filtering on the Product Object

  1. Navigate to a Product
  2. Create a new formula field; Return Type Text
  3. Provide a meaningful Name/Label, for example ProdFamily
  4. Enter the following in the formula body:  TEXT(Family)
  5. Save


Create the field to be used for filtering on the Product Option Object

  1. Navigate to Setup | Create | Objects | Product Option
  2. Create a new formula field, Return Type Text
  3. Ensure that the API is the same as the field created on the product, in this example, ProdFamily__c
  4. Enter the following in the formula body:  "Irrelevant Text"
  5. Save


Note: The returned Text in this formula is not relevant as this field value will be driven from the formula written on the Product object.  This is an exception to standard behavior as, normally, while in configuration, a Product Option field value would take precedence over the like named Product field.  That being said, the field on the Product Option MUST exist, and must have the same API name and return type as the field created on the Product, or this use-case will fail.  

Create the corresponding Filter Product Rule

  1. Navigate to the Product Rules Tab, hit "New"
  2. Set the following field values:
    1. Product Rule Name: Filter to Show Only Hardware Products
    2. Type: Filter
    3. Conditions Met: All
    4. Active: True
    5. Scope: Product 
    6. Evaluation Event: Always
  3. Save
  4. Navigate to the Configuration Rules Related List, hit "New Configuration Rule"
  5. Set the following field values
    1. Active: True
    2. Product: Name of the Bundle Parent, for this example "Many Wares"
    3. Product Rule: Name of Product Rule, for this example, "Filter to show only Hardware Products"
    4. Product Feature: Name of Feature on which you have set the Option Selection Method to Dynamic, for this example: Hardware
  6. Save
  7. Navigate to the Actions Related List, hit "New Product Action"
  8. Add the API name (ProdFamily__c) to the Filter Field Related List
  9. Set the following field values:
    1. Type: Default Filter
    2. Filter Field: ProdFamily__c
    3. Operator: equals
    4. Hardware
  10. Save


Validate​

  1. Navigate to a quote and Edit Lines
  2. Add the bundle, in this example, "Many Wares"
  3. During Configuration, Navigate to the Hardware Feature
  4. Press the Add Options button
  5. Ensure the list of returned products are only from the Hardware Product Family


    NOTES:
  • Dynamic Bundles will not respect Nested Bundles.  If an admin would like the 'Add Options' button associated to a Filter Product Rule for a Nested Bundle, a dedicated filter product rule is required.
  • The products returned in a Dynamic Feature are subject to the same requirements as products in the standard product search.
  • Selection Product Rules with Show/Add actions will not be respected by the dynamic feature.  If a product has already been selected from within a dynamic feature, then Hiding/Removing actions will be respected.
  • If Search Filters are being used with no action, they are global filters and will impact results of Product Rule when selecting Add Options during configuration. 
Numéro d’article de la base de connaissances

000381705

 
Chargement
Salesforce Help | Article