Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
ccrz.ccLogicProductFind.performProductFind
Compatibility
This reference applies to:
Release | Managed Package Version | API Version |
---|---|---|
B2B Commerce for Visualforce Winter ’21 | 4.13 | 12 |
B2B Commerce for Visualforce Spring ’20 | 4.12 | 11 |
B2B Commerce for Visualforce Summer ’19 | 4.11 | 10 |
B2B Commerce for Visualforce Spring ’19 | 4.10 | 9 |
B2B Commerce for Visualforce Summer ’18 | 4.9 | 8 |
Signature
global virtual Map<String, Object> performProductFind(Map<String, Object>)
Inputs (Required)
This method accepts the working Map<String, Object> after the ccrz.ccLogicProductFind.processInput method completes.
This method requires one of the following keys in the working map:
- ccrz.ccApiProduct.CATEGORY_IDS
- Set<String> of specific category IDs whose assigned products you want to return and price.
- ccrz.ccService.SEARCHSTRING
- String to use for searching product records, and whose results you want to return and price.
Inputs (Optional)
If the working map includes the following keys, this method evaluates them:
- ccrz.ccApiProduct.CURRENT_INDEX
-
Map<String, Object> that specifies the
product index information for the product to use as a starting
point.
Map<String, Object> findProductsStartingFrom = new Map<String, Object> { primary => 'String of product's sfdcName', secondary => CC Product Index record ID }
- ccrz.ccApiProduct.INCLUDE_COUNT
- Boolean
Value Usage true Return the total count of products, keyed under ccrz.ccApiProduct.COUNT. false (default) Don’t return product count. - ccrz.ccApiProduct.PRODUCT_FILTERS
- List<Map<String, Object>>, where each Map<String, Object> specifies spec values to filter products by.
- ccrz.ccApiProduct.PRODUCT_LIMIT
- Integer that specifies the maximum number of product IDs to return.
- ccrz.ccApiProduct.PRODUCTLOCALE
- String that specifies one of your storefront's supported locales. The method returns internationalized product values in the ccrz.ccApiProduct.PRODUCTLIST return key. The service layer translates the values from ccrz__E_ProductItemI18N__c records and handles fallback languages, if necessary.
- ccrz.ccApiProduct.PRODUCTSTOREFRONT
- String that specifies the name of a storefront for filtering the query.
- ccrz.ccService.ORDERBY
- String that specifies the field to order results by. Possible values include:
- ccrz.ccApiProductIndex.BY_NAME
- ccrz.ccApiProductIndex.BY_PRICE
- ccrz.ccApiProductIndex.BY_START_DATE
- ccrz.ccApiProductIndex.BY_RELEVANCE
- ccrz.ccApiProductIndex.BY_SEQUENCE (default)
- ccrz.ccService.SORTDESC
- Boolean
Value Usage true Sort returned products by the field that the ccrz.ccService.ORDERBY key specifies, in descending order. false (default) Sort returned products in ascending order.
Logic Performed
This method passes the input keys to ccrz.ccApiProductIndex.fetchEntitled, and parses that method's output.
Outputs
This method returns the working Map<String, Object>, including the ccrz.ccApiProductIndex.fetchEntitled outputs.