SBQQ.ProductSearchPlugin - Guided Selling Interface
Namespace
SBQQ
Usage
You can configure the Product Search plugin to filter a guided selling prompt based on certain parameters when users enter a value. For example, in a guided selling prompt, you could configure the plugin to return all search results in descending order from the most recent Last Ordered Date. When the user chooses their input, the products returned in the search results are shown starting from the most recent Last Ordered Date field value.
Product search plugins can use only a subset of CPQ quote fields by default. If you can't pass a field to your guided selling input, or if it passes as null, you must retrieve it with a SOQL query.
Order of Execution
For a Guided Selling prompt, Salesforce CPQ executes the implemented SBQQ.ProductSearchPlugin methods in the following order.
//**The constructor is optional**//
* 1.0 Constructor()
* 2.0 FOREACH(Search Field){
* 2.1 isInputHidden()
* 2.1 getInputDefaultValue()
* }
* 3.0 isSuggestCustom (CUSTOM vs ENHANCED)
* IF(isCustom){
* 4.0 suggest()
* }
* ELSE{
* 4.0 getAdditionalSuggestFilters()
* }
- The constructor can be called first, but it’s not required.
- Salesforce CPQ calls the following two methods for each guided selling input.
- isInputHidden: Determines whether to hide the guided selling input from the guided selling prompt
- getInputDefaultValue: Sets the field value for the initial input
- Salesforce CPQ calls isSuggestCustom to determine whether you’re using custom or enhanced searching.
- If isInputCustom returned TRUE, Salesforce CPQ calls suggest. 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 isInputCustom returned FALSE, Salesforce CPQ calls getAdditionalSuggestFilters. This method appends a WHERE clause to the existing SOQL query.