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.ccApiSpec.fetchProductSpecIndices
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 static Map<String, Object> fetchProductSpecIndices(Map<String, Object>)
Service Layer Classes
- Data Service Provider
- ccrz.ccServiceProductSpecIndex
Inputs (Required)
Map<String, Object> that must include the following required keys:
- ccrz.ccApi.API_VERSION
- The version of the B2B Commerce for Visualforce API to reference for the method call. We recommend that you use the ccrz.ccApi.CURRENT_VERSION constant whenever possible, and only reference a specific version for compatibility if necessary.
Inputs (Optional)
The input map can also include the following keys:
- ccrz.ccApi.API_SIZING
-
Map<String, Object> that specifies the
scope of data that this method returns. To specify which
fields are available in the return data for each product spec index record, add ccrz.ccApiSpec.PSI_ENTITYNAME as a key in this
map:
ccrz.ccApi.SIZING => new Map<String, Object> { ccrz.ccApiSpec.PSI_ENTITYNAME => new Map<String, Object> { ccrz.ccApi.SZ_DATA => ccrz.ccApi.SZ_M } }
- ccrz.ccApiSpec.PRODUCT_IDS
-
Set<String> of product IDs whose product
spec index records you want to
return:
new Set<String>{'Product_ID_1', 'Product_ID_2'}
- ccrz.ccApiSpec.PRODUCT_SPEC_INDICES
-
List<Map<String, Object>>, where each
Map<String, Object> specifies a spec ID and
a particular spec value whose corresponding product spec index records you want to
return, such
as:
[ { "specValues" : [ { "value" : "Blue" } ], "sfid" : "a1h6A00000045s5QAA" } ]
For a spec where Filter Type is Slider, you can specify a filterMin and filterMax range for filtering:
[ { "sfid" : "a1h6A00000045s5QAA", "filterMin" : "1.0", "filterMax" : "10.0" } ]
- ccrz.ccApiSpec.SPECIDLIST
-
Set<String> of product spec index IDs whose
data you want to
return:
new Set<String>{'Product_Spec_Index_ID_1', 'Product_Spec_Index_ID_2'}
- ccrz.ccApiSpec.SPECLOCALE
- String that specifies a locale. The method returns only the product spec index records where the referenced spec has the specified locale.
- ccrz.ccApiSpec.USE_FOR_FILTER
- Boolean
Value Usage true Return only product spec index records where the related spec's ccrz__UseForFilter__c field is true. false (default) Ignore the value of a related spec's ccrz__UseForFilter__c field when querying product spec index records.
Outputs
Map<String, Object> that can include the following keys:
- ccrz.ccApi.API_VERSION
- Integer that indicates which API version was used for the query.
- ccrz.ccApi.SUCCESS
- Boolean
Value Usage true The call completed. false The call encountered errors. - ccrz.ccApiSpec.PRODUCT_SPEC_INDICES
- Data from the product spec index records
that match the fetch query. This return data can take the following types, depending on
values specified in the input map:
Type Input Map Criteria Map<String, Map<String, Object>> Default return format List<Map<String, Object>> ccrz.ccApi.SIZING => new Map<String, Object> { ccrz.ccApiSpec.PSI_ENTITYNAME => new Map<String, Object> { ccrz.ccApi.SZ_DATA => ccrz.ccApi.SZ_GROUPBY } }
List<ccrz__E_ProductSpecIndex__c> ccrz.ccApi.SIZING => new Map<String, Object> { ccrz.ccApiSpec.PSI_ENTITYNAME => new Map<String, Object> { ccrz.ccApi.SZ_SKIPTRZ => true } }
List<AggregateResult> ccrz.ccApi.SIZING => new Map<String, Object> { ccrz.ccApiSpec.PSI_ENTITYNAME => new Map<String, Object> { ccrz.ccApi.SZ_DATA => ccrz.ccApi.SZ_GROUPBY, ccrz.ccApi.SZ_SKIPTRZ => true } }