Guided Selection (POST)

Retrieve a list of products based on the response identifier or search terms of a guided selection. Guided selection captures user requirements to show suitable products.

Resource 

1/connect/cpq/products/guided-selection

Resource Example 

1https://{yourInstance}.salesforce.com/services/data/v68.0/connect/cpq/products/guided-selection

Available Version 

62.0

HTTP Methods 

POST

Request Body for POST 

JSON Example

1{
2  "correlationId": "corrId",
3  "catalogId": "0ZSxx0000000001GAA",
4  "priceBookId": "pricebookId",
5  "limit": 10,
6  "cursor": "MTAwMDAwMDAwNg==",
7  "userContext": {
8    "accountId": "accId"
9  },
10  "guidedSelectionResponseId": "ABCxx0000000001GAA",
11  "searchTerms": [
12    {
13      "term": "IPhone",
14      "tags": [
15        "deviceType",
16        "mobile"
17      ]
18    },
19    {
20      "term": "4GB",
21      "tags": [
22        "RAM"
23      ]
24    },
25    {
26      "term": "64GB",
27      "tags": [
28        "Storage"
29      ]
30    }
31  ],
32  "enableQualification": true,
33  "enablePricing": true,
34  "includeCatalogDetails": false
35}

This example shows a sample request to fetch eligible promotions.

1{
2  "correlationId": "corrId",
3  "catalogId": "0ZSxx0000000001GAA",
4  "priceBookId": "pricebookId",
5  "limit": 10,
6  "cursor": "MTAwMDAwMDAwNg==",
7  "userContext": {
8    "accountId": "accId"
9  },
10  "guidedSelectionResponseId": "ABCxx0000000001GAA",
11  "searchTerms": [
12    {
13      "term": "IPhone",
14      "tags": [
15        "deviceType",
16        "mobile"
17      ]
18    },
19    {
20      "term": "4GB",
21      "tags": [
22        "RAM"
23      ]
24    },
25    {
26      "term": "64GB",
27      "tags": [
28        "Storage"
29      ]
30    }
31  ],
32  "enableQualification": true,
33  "enablePricing": true,
34  "includeCatalogDetails": false,
35  "transactionContextId": "context123",
36  "transactionId": "trans456",
37  "usePromotions": true
38}

This example shows a sample request to run visibility rules.

1{
2  "catalogId": "0ZSVW000000AhdC4AS",
3  "currencyCode": "USD",
4  "enablePricing": true,
5  "enableQualification": true,
6  "executeConfigurationRules": true,
7  "filter": {
8    "criteria": [
9      {
10        "property": "isActive",
11        "operator": "eq",
12        "value": true
13      },
14      {
15        "property": "UsedFor",
16        "operator": "eq",
17        "value": ""
18      }
19    ]
20  },
21  "guidedSelectionResponseId": "0U3VW0000000a1t0AA",
22  "includeCatalogDetails": true,
23  "limit": 12,
24  "offset": 0,
25  "orderBy": [
26    "name:asc"
27  ],
28  "priceBookId": "01sVW0000024PZlYAM",
29  "transactionId": "0Q0VW000001190f0AA",
30  "userContext": {
31    "accountId": null
32  }
33}

Properties

NameTypeDescriptionRequired or OptionalAvailable Version
additional​ContextDataContext Data Input[]Additional nodes that are added to the custom or default context definition. The maximum number of supported nodes is 10.Optional62.0
additional​FieldsMap<String, Additional Fields Input>Additional standard or custom fields of the Product2 object to include in the response. If the requested fields are invalid or access to fields isn’t available, then the API throws an error.Optional62.0
catalog​IdStringID of the catalog.Required62.0
category​IdStringID of the category.Optional62.0
context​DefinitionStringAPI name of the custom context definition that’s sent for context creation. If this property isn’t specified, then the default context definition is used.Optional62.0
context​MappingStringDefault context mapping of the context definition. If a context mapping is specified, then the API checks whether the mapping belongs to the specified context definition to process the details for hydration.Optional62.0
correlation​IdStringUnique identifier value that’s attached to the requests and messages, and accepts references to a particular transaction or event chain.Optional62.0
currency​CodeStringCurrency code that’s considered for pricing and filtering request. If multiple currencies are enabled for the org, then the currencyCode property is required.Optional62.0
cursorStringUnique ID to represent the position of each product in the dataset.Optional62.0
enable​PricingBooleanIndicates whether to enable pricing for the products (true) or not (false). The default value is true.Optional62.0
enable​QualificationBooleanIndicates whether to enable qualification rules for the products (true) or not (false). The default value is true.Optional62.0
execute​ConfigurationRulesBooleanIndicates whether to execute configuration rules (true) or not (false).Optional67.0
filterFilter InputFilters records based on supported criteria. The supported property is name. If multiple criteria are specified, then the resultant criteria are combined by using the and operator.Optional62.0
guided​Selection​ResponseIdStringResponse identifier of the guided selection.Required if the searchTerms property isn’t specified.62.0
include​Catalog​DetailsBooleanIndicates whether to include catalog details in the response (true) or not (false).Optional62.0
limitIntegerNumber of items to include in the response. The default value is 10.Optional62.0
order​ByString[]Sort order of the results, which is either ascending (asc) or descending order (desc). The default sort order is ascending order. The default value is asc. If the Use Indexed Data For Product Listing and Search toggle from the Product Discovery Settings page from Setup is enabled, then you can sort products by using name only.Optional62.0
price​BookIdStringID of the price book to get the prices from. If this property isn’t specified, then prices from the standard price book are fetched.Required62.0
pricing​ProcedureStringAPI name of the custom pricing procedure that’s used for the pricing process. If this property isn’t specified, then the default pricing procedure is executed.Optional62.0
product​Classification​IdStringID of the product classification.Optional62.0
qualification​ProcedureStringAPI name of the custom qualification procedure that’s used for the product qualification process. If this property isn’t specified, then the default qualification procedure is executed.Optional62.0
searchTermsGuided Selection Search Term Input[]Search terms of the guided selection.Required if the guided​Selection​ResponseId property isn’t specified.62.0
transaction​ContextIdStringID of the transaction context.Optional67.0
transactionIdStringID of the transaction.Optional67.0
usePromotionsBooleanIndicates whether to fetch applicable promotions from Global Promotion Management (GPM) for the guided selection (true) or not (false). If Promotion feature is enabled in the org and this property isn’t specified, then the default value is true. If the Promotion feature isn’t enabled, the default value is false.Optional66.0
user​ContextUser Context InputUser context details. For example, account ID or contact ID.Optional62.0

The supported operators are:

  • eq
  • in
  • contains—This value isn’t applicable if the Use Indexed Data For Product Listing and Search toggle from the Product Discovery Settings page from Setup is enabled.

If both the guided​Selection​ResponseId and searchTerms properties are specified, then the searchTerms property is considered in the input request.

Response Body for POST 

Guided Selection