Product Search Plugin - Product Search Interface
Use implemented SBQQ.ProductSearchPlugin methods to further filter a product search on the Product Search page after users enter their own search queries.
SBQQ
For example, in Product Search, you could configure the plugin to return all search results in descending order from the most recent Last Ordered Date. If a sales rep enters "Tablets," the search results show tablets starting from the most recent Last Ordered Date field value. Users can then further filter through the Product Search filter panel, if necessary.
Product search plugins can use only a subset of CPQ quote fields by default. If you can't pass a field to your product search, or if it passes as null, you must instead pull it with a SOQL query using the ID passed with the quote model.
Date fields are returned as strings in the yyyy-mm-dd format.
Salesforce CPQ uses the following order to execute the SBQQ.ProductSearchPlugin implemented methods for a Product Search.
-
The Constructor can be called first, but it’s not required for implementation.
-
Salesforce CPQ calls the following two methods for each search input.
- isFilterHidden: Determines whether to hide the search input from the quote line editor
- getFilterDefaultValue: Sets the field value for the initial search
-
Salesforce CPQ calls isSearchCustom to determine whether you’re using Custom or Enhanced searching.
-
If isSearchCustom returned True, Salesforce CPQ calls search(). This method gives you full control of the search query - you’ll build the Select Clause and Where Clause manually, then build and perform the query.
-
If isSearchCustom returned False, Salesforce CPQ calls getAdditionalSearchFilters. This method appends a WHERE clause to the existing SOQL query.
- SBQQ.ProductSearchPlugin Product Search Methods
Use these methods for a Product Search implementation ofSBQQ.ProductSearchPlugin. - SBQQ.Product Search Plugin - Product Search Example Implementation
Refer to this example implementation of theSBQQ.ProdcutSearchPlugin interface.