Products List (POST)

Get a list of products for a specified catalog, category, or subcategory. This API is a composite API for Product Discovery.

Resource 

1/connect/cpq/products

Resource Example 

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

Available Version 

60.0

HTTP Methods 

POST

Request Body for POST 

JSON Example

1{
2  "correlationId": "eeaa1db2-f371-4227-a886-c77e2f66ce1d",
3  "limit": 60,
4  "cursor": "MTAwMDAwMDAwNg==",
5  "orderBy": [
6    "name:asc"
7  ],
8  "catalogId": "0ZSDU0000002Og74AE",
9  "categoryId": "0ZGDU0000002P0H4AU",
10  "priceBookId": "01sDU000000JVsVYAW",
11  "productClassificationId": "11BDU0000002TCC2A2",
12  "currencyCode": "USD",
13  "userContext": {
14    "accountId": "001DU000001o2UzYAI"
15  },
16  "includeCatalogDetails": true,
17  "enableQualification": true,
18  "enablePricing": true,
19  "qualificationProcedure": "ProductQualification",
20  "pricingProcedure": "pricingProcedure",
21  "contextDefinition": "BrowseContextDefinitionExt",
22  "contextMapping": "ProductDiscoveryMapping",
23  "filter": {
24    "criteria": [
25      {
26        "property": "name",
27        "operator": "eq",
28        "value": "Laptop Pro Bundle"
29      }
30    ]
31  },
32  "relatedObjectFilters": [
33    {
34      "objectName": "ProductSpecificationRecType",
35      "criteria": [
36        {
37          "property": "IsCommercial",
38          "operator": "eq",
39          "value": true
40        }
41      ]
42    }
43  ],
44  "additionalContextData": [
45    {
46      "nodeName": "Account",
47      "nodeData": {
48        "id": "001DU000001o2UzYAI",
49        "name": "Cloud Kicks"
50      }
51    }
52  ],
53  "additionalFields": {
54    "Product2": {
55      "fields": [
56        "CanRamp",
57        "DecompositionScope",
58        "ProductCode"
59      ]
60    }
61  }
62}

If a parent category ID is specified in the request body, then the API returns all products associated to all child categories.

This example shows a sample request to retrieve a product list with promotions.

1{
2  "correlationId": "eeaa1db2-f371-4227-a886-c77e2f66ce1d",
3  "limit": 60,
4  "cursor": "MTAwMDAwMDAwNg==",
5  "orderBy": [
6    "name:asc"
7  ],
8  "catalogId": "0ZSDU0000002Og74AE",
9  "categoryId": "0ZGDU0000002P0H4AU",
10  "priceBookId": "01sDU000000JVsVYAW",
11  "productClassificationId": "11BDU0000002TCC2A2",
12  "currencyCode": "USD",
13  "userContext": {
14    "accountId": "001DU000001o2UzYAI"
15  },
16  "includeCatalogDetails": true,
17  "enableQualification": true,
18  "enablePricing": true,
19  "qualificationProcedure": "ProductQualification",
20  "pricingProcedure": "pricingProcedure",
21  "contextDefinition": "BrowseContextDefinitionExt",
22  "contextMapping": "ProductDiscoveryMapping",
23  "filter": {
24    "criteria": [
25      {
26        "property": "name",
27        "operator": "eq",
28        "value": "Laptop Pro Bundle"
29      }
30    ]
31  },
32  "relatedObjectFilters": [
33    {
34      "objectName": "ProductSpecificationRecType",
35      "criteria": [
36        {
37          "property": "IsCommercial",
38          "operator": "eq",
39          "value": true
40        }
41      ]
42    }
43  ],
44  "additionalContextData": [
45    {
46      "nodeName": "Account",
47      "nodeData": {
48        "id": "001DU000001o2UzYAI",
49        "name": "Cloud Kicks"
50      }
51    }
52  ],
53  "additionalFields": {
54    "Product2": {
55      "fields": [
56        "CanRamp",
57        "DecompositionScope",
58        "ProductCode"
59      ]
60    }
61  },
62  "executeConfigurationRules": false,
63  "transactionContextId": "a1b2c3d4e5f6",
64  "transactionId": "trans789",
65  "usePromotions": true
66}

This example shows a sample request to run visibility rules.

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

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.Optional60.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.Optional61.0
catalog​IdStringID of the catalog. If the catalog ID is specified, then the API returns the list of offers from the catalog with the pricing details related to the catalog.Optional60.0
category​IdStringID of the category. If the category ID isn’t specified, then the API returns the list of offers from the catalog.Optional60.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.Optional60.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.Optional60.0
correlation​IdStringUnique identifier of the request.Optional60.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.Optional60.0
cursorStringUnique ID to represent the position of each product in the dataset.Optional60.0
enable​PricingBooleanIndicates whether to enable pricing for the products ( true ) or not ( false ). The default value is true. The Pricing Procedure toggle from the Product Discovery Settings page from Setup overrides this property. For example, if the Pricing Procedure toggle is disabled, then setting the enablePricing property to true has no effect and the prices property in the API response is returned empty.Optional60.0
enable​QualificationBooleanIndicates whether to enable qualification rules for the products ( true ) or not ( false ). The default value is true. The Qualification Procedure toggle from the Product Discovery Settings page from Setup overrides this property. For example, if the Qualification Procedure toggle is disabled, then setting the enableQualification property to true has no effect and the qualificationContext property in the API response isn’t returned.Optional60.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.Optional60.0
include​Catalog​DetailsBooleanIndicates whether to include catalog details in the response (true) or not (false).Optional61.0
limitIntegerNumber of items to include in the response. The default value is 10.Optional60.0
offsetIntegerReserved for internal use.Optional60.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.Optional60.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.Required60.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.Optional60.0
product​Classification​IdStringID of the product classification.Optional60.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.Optional60.0
related​Object​FiltersRelated Object Filter Input[]Filter records based on supported criteria for related objects. The supported object is ProductSpecificationRecType. The supported property is IsCommerical. The supported operator is eq. The supported values are true and false.Optional60.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 each product in the list (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.Optional60.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.

Response Body for POST 

CPQ Base List