Skip to main content

Recreate Basic Filters and Make a Subscription Filter

Create Search Filter Records for the Basic Filters

Right now, your CPQ-enabled org already has a few out-of-the-box filters on the Product Selection page. View them by opening the filtering pane with the filter button.

Product Selection page with filters pane open, filter button highlighted.

There are two ways that CPQ decides which Product fields to show in the filter pane. The first is to look at the Search Filters field set on the Product object. The Product Code, Product Name, and Product Family fields are already in that field set. Any custom field you create can also be added to the Search Filters field set. 

However, the field set method has a few big limitations. Most of the Product fields that CPQ uses, such as Subscription Type, can’t be added to the field set. Additionally, you can’t control search behaviors, like how text is matched (that is, ‘starts with’ versus ‘contains’).

There’s another more flexible way to show a field in the filter pane: creating a Search Filter record. This second method lets you add most Product fields as a filter, control matching behavior, and do other fancy things you learn about later. 

Be aware, Salesforce CPQ uses either the Search Filters field set or the Search Filters records, but not both! The moment you start using records, CPQ ignores anything in the field set. For that reason, re-create the Product Code, Product Name, and Product Family filters so that they still exist when you create other Search Filter records.

So, start your Search Filter adventure by creating a Search Filter record for Product Code.

  1. If you don’t already have your CPQ-enabled org open, scroll down to the Challenge section and click Launch to open it.
  2. Click the App Launcher (App Launcher icon), and click the Salesforce CPQ tile.
  3. In the navigation bar, click Search Filters, which may be under the More tab.
  4. Click New.
  5. For Filter Name, enter Product Code.
    The name is shown in the filter pane, so choose something your sales reps will understand.
  6. For Target Object, choose Product.
  7. For Target Field, choose Product Code.
    The Target Object and Field combination tells CPQ what exactly it should search.
  8. For Operator, choose contains.
    The Operator tells CPQ how to conduct the search. Now when a sales rep searches for “usb”, CPQ will find products that contain USB anywhere in the product code, such as 4PORTUSBHUB. The original filter showed only those products that started with USB.
  9. For Display Order, enter 10.
    Filters appear in the filter pane from top to bottom based on display order.
  10. Click Save.

Great! You’ve replaced the original Product Code field that appeared in the search pane with your new filter. Now it’s better than ever.

Let’s re-create the filters for Product Name and Product Family.

  1. In the navigation bar, click Search Filters.
  2. Click New.
  3. For Filter Name, enter Product Name.
  4. For Target Object, choose Product.
  5. For Target Field, choose Name.
  6. For Operator, choose contains.
  7. For Display Order, enter 20.
  8. Click Save & New.
  9. For Filter Name, enter Product Family.
  10. For Target Object, choose Product.
  11. For Target Field, choose Product Family.
  12. For Operator, choose equals.
    This time you choose “equals” because picklist values, like those stored in the Product Family field, must be matched exactly.
  13. For Display Order, enter 30.
  14. Click Save.

Good work—the three original product fields are now back in the search pane. Next, add other useful filters to help the sales reps of AW Computing.

Create a Search Filter for Subscription Pricing

The Subscription Pricing field is the first new field that the sales team wants to base a search on. This will help them view only subscription-based products. But before you can make the new search filter, you need to update the Target Field picklist. Your first three filters used preloaded Target Field values. However, your org doesn’t currently have Subscription Pricing as a choice, so you have to add it.

  1. Click Setup icon and click Setup. The Setup page opens in a new tab.
  2. In the navigation bar, click Object Manager.
  3. Click Search Filter. (Hint: Enter Search Filter into the Quick Find box to reduce scrolling.)
  4. Click Fields & Relationships.
  5. Click Target Field.
  6. In the Values table, click New.
  7. Enter SBQQ__SubscriptionPricing__c.
    Always use the API name when adding fields. Even if the field label changes, it’s unlikely the API name will change.
  8. Click Save.
  9. In the Picklist Options section, locate the Controlling Field entry and click Change.
    Screenshot of Picklist Options section of field properties.
  10. In the Product column, double-click SBQQ__SubscriptionPricing__c.
    It should turn yellow, which means it’s a valid choice whenever the Target Object is set to Product.
  11. Click Save.

Close the Setup tab in your browser to return to the Salesforce CPQ tab. Now that the Subscription Pricing field is in the picklist, you’re free to create the search filter record.

  1. In the navigation bar, click Search Filters.
  2. Click the refresh button in your browser.
    If you don’t refresh, you might see the cached version of the page which won’t include SBQQ__SubscriptionPricing__c as a picklist value.
  3. Click New.
  4. For Filter Name, enter Subscription Pricing.
  5. For Target Object, choose Product.
  6. For Target Field, choose SBQQ__SubscriptionPricing__c.
  7. For Operator, choose equals.
  8. For Display Order, enter 40.
  9. Click Save.

And that’s it, you’re ready to test your work.

  1. In the navigation bar, click Quotes
  2. Choose the All list view.
  3. Click Q-00054.
  4. Click Edit Lines.
    The first time the page loads, it can take a few minutes. Subsequent page loads are faster.
  5. Click Add Products.
  6. Click the Filter button (Filter icon).
    You should see all 4 fields in the filter pane.
  7. For Subscription Pricing, choose Fixed Price.
  8. Click Apply.

Great! The list of 150+ products should have shrunk to a little more than a dozen. The sales reps at AW Computing appreciate that you made it much easier to find subscription products!

In the future, whenever you want to add another product field to the search pane, follow the same steps you used for Subscription Pricing.

  1. Add the API name into the Target Field field. (Remember to update the Controlling Field at the same time.)
  2. Create a search filter record.
Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback