Get Multiple Product Details Action

Get product details for a list of products.

This action is available in API version 64.0 and later.

You can invoke this action via Apex and Flows only.

Special Access Rules 

The Get Multiple Product Details action is available in Enterprise, Unlimited, and Developer Editions where Product Discovery is enabled.

Inputs 

InputTypeDescription
additionalContextDataApex-definedCollection of Apex runtime_industries_cpq.AdditionalContextData records that contain additional context data for nodes of the custom context definition, if applicable. You can add details for up to 10 nodes.
additionalFieldsApex-definedAn Apex AdditionalFields record that contains the additional fields that are passed for the Product2 object.
catalogIdstringID of the catalog record.
contextDefinitionNamestringName of the custom context definition that’s used to create context data for categories. If null, the default context definition is used.
contextMappingNamestringName of the context mapping. By default, the default context mapping associated with the context definition is used.
correlationIdstringUnique identifier attached to requests and messages, allowing reference to a specific transaction or event chain.
currencyCodestringCurrency code that’s used to calculate and show prices.
enablePricingbooleanIndicates whether pricing procedure must run ( true ) or not ( false ). The default value is true. To use this parameter, the Pricing Procedure setting must be enabled.
enableQualificationProcedurebooleanIndicates whether the qualification procedure is applied to categories ( true ) or not ( false ).
priceBookIdstringID of the pricebook that the pricing information is retrieved from.
pricingProcedureNamestringName of the pricing procedure to calculate product prices. If you don’t enter a value, the pricing procedure selected on the Product Discovery Settings page is used.
productDataInputsApex-definedRequired. Collection of Apex BulkProductDetailsInputBody records that contain details about the products that are to be retrieved.
qualificationProcedureNamestringName of the custom qualification procedure that’s executed to determine the category list. If null, the default qualification procedure is executed.
userContextInputRepresentationApex-definedAn Apex UserContextInputRepresentation record that contains user details, such as account ID, geographical location, language preferences, and more.

Outputs 

OutputTypeDescription
apiStatusOutputRepresentationApex-definedAn Apex runtime_industries_cpq.ApiStatusRepresentation record that contains the status of the request, including the status code and message.
contextIdstringID of the context that’s created using the specified context definition.
correlationIdstringUnique identifier attached to requests and messages, allowing reference to a specific transaction or event chain.
productDetailsOutputRepresentationApex-definedCollection of Apex BulkProductDetailsRepresentation records that contain details of available products.
userContextApex-definedAn Apex ConnectApi.UserContextRepresentation record containing user information.

Example 

Here’s a sample input to call this invocable action from Apex code.

1Invocable.Action action = Invocable.Action.createStandardAction('getMultipleProductDetails');
2
3List<runtime_industries_cpq.BulkProductDetailsInputBody> productDataList = new List<runtime_industries_cpq.BulkProductDetailsInputBody>();
4runtime_industries_cpq.BulkProductDetailsInputBody productData = new runtime_industries_cpq.BulkProductDetailsInputBody();
5productData.productId = '01tIY000000nCxhYAE';
6
7productDataList.add(productData);
8
9runtime_industries_cpq.BulkProductDetailsInputBodyList productList = new runtime_industries_cpq.BulkProductDetailsInputBodyList();
10productList.productData = productDataList; 
11
12action.setInvocationParameter('productDataInputs', productList); 
13
14List<Invocable.Action.Result> results = action.invoke();
15System.debug('Result === ' + results);

Here’s a sample response when you call this action.

1[
2  {
3    "actionName": "getMultipleProductDetails",
4    "errors": null,
5    "invocationId": null,
6    "isSuccess": true,
7    "outcome": null,
8    "outputValues": {
9      "apiStatusOutputRepresentation": {
10        "statusMessage": null,
11        "statusCode": "FetchedDetailsSuccessfully",
12        "messages": []
13      },
14      "correlationId": "9cbb9650-48c5-11ed-96d1-0afcf185843b",
15      "contextId": null,
16      "productDetailsOutputRepresentation": [
17        {
18          "unitOfMeasure": {
19            "unitCode": null,
20            "scale": null,
21            "roundingMethod": null,
22            "name": null,
23            "id": null
24          },
25          "status": null,
26          "qualificationContext": null,
27          "productType": null,
28          "productSpecificationType": null,
29          "productSellingModelOptions": [
30            {
31              "productSellingModelId": "0jPxx0000000002EAA",
32              "productSellingModel": {
33                "status": "Active",
34                "sellingModelType": "TermDefined",
35                "pricingTermUnit": "Annual",
36                "pricingTerm": 1,
37                "name": "Term Based - Yearly",
38                "id": "0jPxx0000000002EAA"
39              },
40              "productId": "01txx0000006i2oAAA",
41              "id": "0iOxx000000000JEAQ"
42            }
43          ],
44          "productRelatedComponent": {
45            "unitOfMeasure": null,
46            "sequence": null,
47            "quoteVisibility": null,
48            "quantityScaleMethod": null,
49            "quantity": null,
50            "productRelationshipTypeId": null,
51            "productComponentGroupId": null,
52            "productClassificationId": null,
53            "parentSellingModelId": null,
54            "parentProductId": null,
55            "minQuantity": null,
56            "maxQuantity": null,
57            "isQuantityEditable": null,
58            "isExcluded": null,
59            "isDefaultComponent": null,
60            "isComponentRequired": null,
61            "id": null,
62            "doesBundlePriceIncludeChild": null,
63            "childSellingModelId": null,
64            "childProductId": null
65          },
66          "productQuantity": {
67            "quantity": null,
68            "minQuantity": null,
69            "maxQuantity": null
70          },
71          "productPricingInformation": null,
72          "productInformation": null,
73          "productComponentGroups": [],
74          "productCode": "ASTCERT001",
75          "productClassification": {
76            "id": null
77          },
78          "prices": [
79            {
80              "pricingModel": {
81                "unitOfMeasure": null,
82                "pricingModelType": "TermDefined",
83                "occurrence": 1,
84                "name": "Term Based - Yearly",
85                "id": "0jPxx0000000002EAA",
86                "frequency": "Annual"
87              },
88              "priceBookId": "01sxx0000005ptpAAA",
89              "priceBookEntryId": "01uxx0000008yXaAAI",
90              "price": 2000,
91              "isSelected": true,
92              "isDerived": false,
93              "isDefault": true,
94              "effectiveTo": null,
95              "effectiveFrom": null,
96              "currencyIsoCode": "USD"
97            }
98          ],
99          "nodeType": "simpleProduct",
100          "name": "AI Specialist Certification",
101          "isSoldOnlyWithOtherProds": false,
102          "isQuantityEditable": null,
103          "isDefaultComponent": null,
104          "isComponentRequired": null,
105          "isAssetizable": true,
106          "isActive": true,
107          "id": "01txx0000006i2oAAA",
108          "endOfLifeDate": null,
109          "displayUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQsp4GoUP_nGiCXJ-wzYkPx-RlA_UCUX0zIDv3slxnJACqXaRd1vHJUZe6yQklUiXvEDgo&usqp=CAU",
110          "discontinuedDate": null,
111          "description": "The Certified Artificial Intelligence Expert certification is typically designed for individuals who have an in-depth understanding of artificial intelligence (AI) concepts, algorithms, and applications and want to validate their expertise in the field.",
112          "configureDuringSale": "NotAllowed",
113          "childProducts": [],
114          "catalogs": [],
115          "availabilityDate": null,
116          "attributes": [],
117          "attributeCategories": [],
118          "additionalFields": []
119        },
120        {
121          "unitOfMeasure": {
122            "unitCode": null,
123            "scale": null,
124            "roundingMethod": null,
125            "name": null,
126            "id": null
127          },
128          "status": null,
129          "qualificationContext": null,
130          "productType": null,
131          "productSpecificationType": null,
132          "productSellingModelOptions": [
133            {
134              "productSellingModelId": "0jPxx0000000002EAA",
135              "productSellingModel": {
136                "status": "Active",
137                "sellingModelType": "TermDefined",
138                "pricingTermUnit": "Annual",
139                "pricingTerm": 1,
140                "name": "Term Based - Yearly",
141                "id": "0jPxx0000000002EAA"
142              },
143              "productId": "01txx0000006i2rAAA",
144              "id": "0iOxx000000000QEAQ"
145            }
146          ],
147          "productRelatedComponent": {
148            "unitOfMeasure": null,
149            "sequence": null,
150            "quoteVisibility": null,
151            "quantityScaleMethod": null,
152            "quantity": null,
153            "productRelationshipTypeId": null,
154            "productComponentGroupId": null,
155            "productClassificationId": null,
156            "parentSellingModelId": null,
157            "parentProductId": null,
158            "minQuantity": null,
159            "maxQuantity": null,
160            "isQuantityEditable": null,
161            "isExcluded": null,
162            "isDefaultComponent": null,
163            "isComponentRequired": null,
164            "id": null,
165            "doesBundlePriceIncludeChild": null,
166            "childSellingModelId": null,
167            "childProductId": null
168          },
169          "productQuantity": {
170            "quantity": null,
171            "minQuantity": null,
172            "maxQuantity": null
173          },
174          "productPricingInformation": null,
175          "productInformation": null,
176          "productComponentGroups": [],
177          "productCode": "ACERT001",
178          "productClassification": {
179            "id": null
180          },
181          "prices": [
182            {
183              "pricingModel": {
184                "unitOfMeasure": null,
185                "pricingModelType": "TermDefined",
186                "occurrence": 1,
187                "name": "Term Based - Yearly",
188                "id": "0jPxx0000000002EAA",
189                "frequency": "Annual"
190              },
191              "priceBookId": "01sxx0000005ptpAAA",
192              "priceBookEntryId": "01uxx0000008yXdAAI",
193              "price": 2000,
194              "isSelected": true,
195              "isDerived": false,
196              "isDefault": true,
197              "effectiveTo": null,
198              "effectiveFrom": null,
199              "currencyIsoCode": "USD"
200            }
201          ],
202          "nodeType": "simpleProduct",
203          "name": "Admin Certification",
204          "isSoldOnlyWithOtherProds": false,
205          "isQuantityEditable": null,
206          "isDefaultComponent": null,
207          "isComponentRequired": null,
208          "isAssetizable": true,
209          "isActive": true,
210          "id": "01txx0000006i2rAAA",
211          "endOfLifeDate": null,
212          "displayUrl": null,
213          "discontinuedDate": null,
214          "description": null,
215          "configureDuringSale": "Allowed",
216          "childProducts": [],
217          "catalogs": [],
218          "availabilityDate": null,
219          "attributes": [],
220          "attributeCategories": [],
221          "additionalFields": []
222        }
223      ]
224    },
225    "sortOrder": -1,
226    "version": 1
227  }
228]