Get Qualified Products Action

Retrieves the PricebookEntry IDs for products that a user is authorized to use for a given account and territories. When productPurpose isn’t specified, the action defaults to Quote. Allowed purpose values are Quote, Visit, and Order.

This action is available in API version 66.0 and later.

Supported REST HTTP Methods 

URI: /services/data/vXX.X/actions/standard/getQualifiedProducts

Where XX.X is the latest API version.

Formats: JSON, XML

HTTP Methods: POST

Authentication: Authorization: Bearer TOKEN

Where TOKEN is your OAuth access token.

Inputs 

InputTypeDescription
accountIdIDRequired. The ID of the account used to qualify products.
territoryIdsIDRequired. The IDs of the territories used to qualify products. Accepts up to 200 IDs.
pricebookIdIDRequired. The ID of the price book used to retrieve qualified price book entries. Invocable REST keys are case-sensitive; use pricebookId (lowercase b).
catalogIdIDOptional. The ID of the product catalog (prefix 0ZS). Required when categoryId is specified.
categoryIdIDOptional. The ID of the product category (prefix 0ZG). Requires catalogId.
searchTermStringOptional. A search string used to filter products by name.
productPurposeStringOptional. The product territory availability purpose picklist API value. Allowed values are Quote, Visit, and Order. Defaults to Quote when omitted.
usageTypeStringOptional. The product territory availability usage type picklist API value. The allowed value is LifeSciences. Defaults to LifeSciences when omitted.
pageLimitIntegerOptional. The maximum number of price book entry IDs to return in a single response. Valid range is 1–200. Default value is 200.
pageOffsetIntegerOptional. The zero-based offset used for pagination. Defaults to 0.
currencyIsoCodeStringOptional in single-currency orgs. Required in multi-currency orgs; omitting it throws an error. When provided, the value must be a valid 3-letter uppercase ISO currency code, such as USD or EUR.

Outputs 

OutputTypeDescription
pricebookEntryIdsIDA collection of qualified PricebookEntry IDs for the current page. Invocable REST keys are case-sensitive. Use pricebookEntryIds (lowercase b). The number of IDs returned in one response is limited by pageLimit (1–200, default value is 200), not by the invocable collection capacity.
hasMoreRecordsBooleanIndicates whether more qualified price book entries are available beyond the current page.
displayCurrencyIsoCodeStringThe ISO currency code used to display the returned price book entries.

Example 

This example retrieves up to 50 qualified price book entry IDs for an account and territory, filtered by catalog, category, search term, purpose, and currency.

Example request

1{
2    "inputs" : [ {
3        "accountId" : "001XX000000AAAA",
4        "territoryIds" : [ "0MIXX000000TTTT" ],
5        "pricebookId" : "01sXX000000PBBB",
6        "catalogId" : "0ZSXX000000CCCC",
7        "categoryId" : "0ZGXX000000GGGG",
8        "searchTerm" : "Aspirin",
9        "productPurpose" : "Quote",
10        "usageType" : "LifeSciences",
11        "pageLimit" : 50,
12        "pageOffset" : 0,
13        "currencyIsoCode" : "USD"
14    } ]
15}

Example response

1[ {
2    "actionName" : "getQualifiedProducts",
3    "errors" : null,
4    "invocationId" : null,
5    "isSuccess" : true,
6    "outputValues" : {
7        "pricebookEntryIds" : [ "01uXX0000004PPP", "01uXX0000005PPP" ],
8        "hasMoreRecords" : false,
9        "displayCurrencyIsoCode" : "USD"
10    },
11    "version" : 1
12} ]