---
schema_version: "1"
id: 7a7285c6767f6a4e71e45f88b77a92d15f5b3c396197c389c189c8816bb505f5
title: CommerceCatalog Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 73ddbffe89774a3ddea4ac5d891a802a33d79f437bdf8d6d8d76fbc1ba4941a5
description: Get products, product categories, and product category paths.These methods are for CommerceCatalog. All methods are static.Retrieve product category menu items for the given parent item and store.Get a product.Get a product with variation and attribute information.Get a product with quantity rule information.Get detailed information for a product, optionally including information about its product selling models.Get detailed information for a product without its entitlement information.Get detailed information for a product without its entitlement information.Get detailed information for a product without its entitlement information.Get a product category.Get product categories.Get the product category path from the root category to the current category.Get a collection of child products related to a parent product.Get a collection of child products related to a parent product. Get fields, prices, and default images for a list of products. Get fields and default images for a list of products.Get fields and default images for a list of products.Get fields and default images for a list of products.
---
# CommerceCatalog Class

Get products, product categories, and product category paths.

## Namespace

[ConnectApi](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_connect_api.htm "The ConnectApi namespace (also called Connect in Apex) provides classes for accessing the same data available in Connect REST API. Use Connect in Apex to create custom experiences in Salesforce.")

## CommerceCatalog Methods

These methods are for CommerceCatalog. All methods are static.

- **[getCategoryMenuItems(webstoreId, includeImageUrl, addHomeMenuItem, publishStatus, effectiveAccountId, maxLevels, maxItems)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getCategoryMenuItems_1)**  
    Retrieve product category menu items for the given parent item and store.
- **[getProduct(webstoreId, productId, effectiveAccountId, fields, excludeFields, mediaGroups, excludeMedia, excludeEntitlementDetails, excludePrimaryProductCategory)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getProduct_2)**  
    Get a product.
- **[getProduct(webstoreId, productId, effectiveAccountId, fields, excludeFields, mediaGroups, excludeMedia, excludeEntitlementDetails, excludePrimaryProductCategory, excludeVariationInfo, excludeAttributeSetInfo)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getProduct_3)**  
    Get a product with variation and attribute information.
- **[getProduct(webstoreId, productId, effectiveAccountId, fields, excludeFields, mediaGroups, excludeMedia, excludeEntitlementDetails, excludePrimaryProductCategory, excludeVariationInfo, excludeAttributeSetInfo, excludeQuantityRule)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getProduct_4)**  
    Get a product with quantity rule information.
- **[getProduct(webstoreId, productId, effectiveAccountId, fields, excludeFields, mediaGroups, excludeMedia, excludeEntitlementDetails, excludePrimaryProductCategory, excludeVariationInfo, excludeAttributeSetInfo, excludeQuantityRule, excludeProductSellingModels)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getProduct_5)**  
    Get detailed information for a product, optionally including information about its product selling models.
- **[getProduct(webstoreId, productId, effectiveAccountId, fields, mediaGroups, excludeFields, excludeMedia, excludePrimaryProductCategory, excludeVariationInfo, excludeAttributeSetInfo, excludeQuantityRule, excludeProductSellingModels)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getProduct_5a)**  
    Get detailed information for a product without its entitlement information.
- **[getProduct(webstoreId, productId, effectiveAccountId, fields, mediaGroups, excludeFields, excludeMedia, excludePrimaryProductCategory, excludeVariationInfo, excludeAttributeSetInfo, excludeQuantityRule, excludeProductSellingModels, noCache)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getProduct_6)**  
    Get detailed information for a product without its entitlement information.
- **[getProduct(webstoreId, productId, effectiveAccountId, fields, mediaGroups, excludeFields, excludeMedia, excludePrimaryProductCategory, excludeVariationInfo, excludeAttributeSetInfo, excludeQuantityRule, excludeProductSellingModels, excludeDynamicAttributeInfo, noCache)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getProduct_7)**  
    Get detailed information for a product without its entitlement information.
- **[getProductCategory(webstoreId, productCategoryId, effectiveAccountId, fields, excludeFields, mediaGroups, excludeMedia)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getProductCategory_2)**  
    Get a product category.
- **[getProductCategoryChildren(webstoreId, effectiveAccountId, parentProductCategoryId, fields, excludeFields, mediaGroups, excludeMedia)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getProductCategoryChildren_1)**  
    Get product categories.
- **[getProductCategoryPath(webstoreId, productCategoryId, effectiveAccountId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getStorefrontCategoryPath_1)**  
    Get the product category path from the root category to the current category.
- **[getProductChildCollection(webstoreId, productId, effectiveAccountId, fields, mediaGroups, excludeFields, excludeMedia, excludeAttributeSetInfo, excludeQuantityRule, pageToken, pageSize)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getProductChildCollection_1)**  
    Get a collection of child products related to a parent product.
- **[getProductChildCollection(webstoreId, productId, effectiveAccountId, fields, mediaGroups, excludeFields, excludeMedia, excludeAttributeSetInfo, excludeQuantityRule, includeProductSellingModels, includeRequiredChildrenOnly, excludeDynamicAttributeInfo, pageToken, pageSize, noCache)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getProductChildCollection_5)**  
    Get a collection of child products related to a parent product.
- **[getProducts(webstoreId, effectiveAccountId, ids, skus, fields, excludeMedia, excludePrices)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getProducts_1)**  
    Get fields, prices, and default images for a list of products.
- **[getProducts(webstoreId, effectiveAccountId, ids, skus, fields, excludeMedia)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getProducts_2)**  
    Get fields and default images for a list of products.
- **[getProducts(webstoreId, effectiveAccountId, ids, skus, fields, excludeMedia, includeQuantityRule, includeProductSellingModels, includeAttributeSetInfo, includeGroupByAttributeVariationInfo)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getProducts_3)**  
    Get fields and default images for a list of products.
- **[getProducts(webstoreId, effectiveAccountId, ids, skus, fields, excludeMedia, includeQuantityRule, includeProductSellingModels, includeAttributeSetInfo, includeGroupByAttributeVariationInfo, noCache)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceCatalog_static_methods.htm#apex_ConnectAPI_CommerceCatalog_getProducts_4)**  
    Get fields and default images for a list of products.

### getCategoryMenuItems(webstoreId, includeImageUrl, addHomeMenuItem, publishStatus, effectiveAccountId, maxLevels, maxItems)

Retrieve product category menu items for the given parent item and store.

#### API Version

64.0

#### Available to Guest Users

64.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.NavigationMenuItemCollection getCategoryMenuItems(String webstoreId, Boolean includeImageUrl, Boolean addHomeMenuItem, String publishStatus, String effectiveAccountId, Integer maxLevels, Integer maxItems)

#### Parameters

webstoreId

Type: String

ID of the webstore.

addHomeMenuItem

Type: Boolean

Indicates if a home menu item should be included. The default value is false.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made. If unspecified, the default value is determined from context.

includeImageUrl

Type: Boolean

Indicates if the image URL should be included for root items.

maxItems

Type: Integer

Maximum number of category items to be retrieved.

maxLevels

Type: Integer

Maximum number of hierarchical levels to be retrieved.

publishStatus

Type: String

Publish status of the storefront.

#### Return Value

Type: [ConnectApi.NavigationMenuItemCollection](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_navigation_menu_item_collection.htm "Collection of navigation menu items.")

### getProduct(webstoreId, productId, effectiveAccountId, fields, excludeFields, mediaGroups, excludeMedia, excludeEntitlementDetails, excludePrimaryProductCategory)

Get a product.

#### API Version

49.0

Supported in API versions 49.0 to 63.0.

#### Available to Guest Users

51.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductDetail getProduct(String webstoreId, String productId, String effectiveAccountId, List<String\> fields, Boolean excludeFields, List<String\> mediaGroups, Boolean excludeMedia, Boolean excludeEntitlementDetails, Boolean excludePrimaryProductCategory)

#### Parameters

webstoreId

Type: String

ID of the webstore.

productId

Type: String

ID of the product.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made.If null, the default value is determined from context.

fields

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of field names.

If this list is unspecified, all fields are returned. There is no limit to the number of fields you can specify. The number of fields and number of characters in the field name may affect the URL size limit. If excludeFields and fields are specified, the excludeFields parameter takes precedence.

excludeFields

Type: Boolean

Specifies whether the fields are returned (false) or not (true). If unspecified, defaults to false.

mediaGroups

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of developer names of media group records.

If this list is empty or unspecified, all media groups are returned. If excludeMedia and mediaGroups are specified, the excludeMedia parameter takes precedence.

excludeMedia

Type: Boolean

Specifies whether the media groups and default images of the product are returned (false) or not (true). If unspecified, defaults to false.

excludeEntitlementDetails

Type: Boolean

Specifies whether the entitlement details of the product are returned (false) or not (true). If unspecified, defaults to false.

excludePrimaryProductCategory

Type: Boolean

Specifies whether the primary category path of the product is returned (false) or not (true). If unspecified, defaults to false.

#### Return Value

Type: [ConnectApi.ProductDetail](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_detail.htm "Details of a product.")

#### Usage

This method respects buyer View Product entitlements and only users entitled to view product data can access it.

### getProduct(webstoreId, productId, effectiveAccountId, fields, excludeFields, mediaGroups, excludeMedia, excludeEntitlementDetails, excludePrimaryProductCategory, excludeVariationInfo, excludeAttributeSetInfo)

Get a product with variation and attribute information.

#### API Version

50.0

Supported in API versions 50.0 to 63.0.

#### Available to Guest Users

51.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductDetail getProduct(String webstoreId, String productId, String effectiveAccountId, List<String\> fields, Boolean excludeFields, List<String\> mediaGroups, Boolean excludeMedia, Boolean excludeEntitlementDetails, Boolean excludePrimaryProductCategory, Boolean excludeVariationInfo, Boolean excludeAttributeSetInfo)

#### Parameters

webstoreId

Type: String

ID of the webstore.

productId

Type: String

ID of the product.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made.If null, the default value is determined from context.

fields

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of field names.

If this list is unspecified, all fields are returned. There is no limit to the number of fields you can specify. The number of fields and number of characters in the field name may affect the URL size limit. If excludeFields and fields are specified, the excludeFields parameter takes precedence.

excludeFields

Type: Boolean

Specifies whether the fields are returned (false) or not (true). If unspecified, defaults to false.

mediaGroups

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of developer names of media group records.

If this list is empty or unspecified, all media groups are returned. If excludeMedia and mediaGroups are specified, the excludeMedia parameter takes precedence.

excludeMedia

Type: Boolean

Specifies whether the media groups and default images of the product are returned (false) or not (true). If unspecified, defaults to false.

excludeEntitlementDetails

Type: Boolean

Specifies whether the entitlement details of the product are returned (false) or not (true). If unspecified, defaults to false.

excludePrimaryProductCategory

Type: Boolean

Specifies whether the primary category path of the product is returned (false) or not (true). If unspecified, defaults to false.

excludeVariationInfo

Type: Boolean

Specifies whether the variation information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeAttributeSetInfo

Type: Boolean

Specifies whether the attribute set information for the product is returned (false) or not (true). If unspecified, defaults to false.

#### Return Value

Type: [ConnectApi.ProductDetail](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_detail.htm "Details of a product.")

#### Usage

This method respects buyer View Product entitlements and only users entitled to view product data can access it.

### getProduct(webstoreId, productId, effectiveAccountId, fields, excludeFields, mediaGroups, excludeMedia, excludeEntitlementDetails, excludePrimaryProductCategory, excludeVariationInfo, excludeAttributeSetInfo, excludeQuantityRule)

Get a product with quantity rule information.

#### API Version

52.0

Supported in API versions 52.0 to 63.0.

#### Available to Guest Users

52.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductDetail getProduct(String webstoreId, String productId, String effectiveAccountId, List<String\> fields, Boolean excludeFields, List<String\> mediaGroups, Boolean excludeMedia, Boolean excludeEntitlementDetails, Boolean excludePrimaryProductCategory, Boolean excludeVariationInfo, Boolean excludeAttributeSetInfo, Boolean excludeQuantityRule)

#### Parameters

webstoreId

Type: String

ID of the webstore.

productId

Type: String

ID of the product.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made.If null, the default value is determined from context.

fields

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of field names.

If this list is unspecified, all fields are returned. There is no limit to the number of fields you can specify. The number of fields and number of characters in the field name may affect the URL size limit. If excludeFields and fields are specified, the excludeFields parameter takes precedence.

excludeFields

Type: Boolean

Specifies whether the fields are returned (false) or not (true). If unspecified, defaults to false.

mediaGroups

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of developer names of media group records.

If this list is empty or unspecified, all media groups are returned. If excludeMedia and mediaGroups are specified, the excludeMedia parameter takes precedence.

excludeMedia

Type: Boolean

Specifies whether the media groups and default images of the product are returned (false) or not (true). If unspecified, defaults to false.

excludeEntitlementDetails

Type: Boolean

Specifies whether the entitlement details of the product are returned (false) or not (true). If unspecified, defaults to false.

excludePrimaryProductCategory

Type: Boolean

Specifies whether the primary category path of the product is returned (false) or not (true). If unspecified, defaults to false.

excludeVariationInfo

Type: Boolean

Specifies whether the variation information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeAttributeSetInfo

Type: Boolean

Specifies whether the attribute set information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeQuantityRule

Type: Boolean

Specifies whether the quantity rule information for the product is returned (false) or not (true). If unspecified, defaults to false.

#### Return Value

Type: [ConnectApi.ProductDetail](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_detail.htm "Details of a product.")

#### Usage

This method respects buyer View Product entitlements and only users entitled to view product data can access it.

### getProduct(webstoreId, productId, effectiveAccountId, fields, excludeFields, mediaGroups, excludeMedia, excludeEntitlementDetails, excludePrimaryProductCategory, excludeVariationInfo, excludeAttributeSetInfo, excludeQuantityRule, excludeProductSellingModels)

Get detailed information for a product, optionally including information about its product selling models.

#### API Version

56.0

Supported in API versions 56.0 to 63.0.

#### Available to Guest Users

56.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductDetail getProduct(String webstoreId, String productId, String effectiveAccountId, List<String\> fields, Boolean excludeFields, List<String\> mediaGroups, Boolean excludeMedia, Boolean excludeEntitlementDetails, Boolean excludePrimaryProductCategory, Boolean excludeVariationInfo, Boolean excludeAttributeSetInfo, Boolean excludeQuantityRule, Boolean excludeProductSellingModels)

#### Parameters

webstoreId

Type: String

ID of the webstore.

productId

Type: String

ID of the product.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made.If null, the default value is determined from context.

fields

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of field names.

If this list is unspecified, all fields are returned. There is no limit to the number of fields you can specify. The number of fields and number of characters in the field name may affect the URL size limit. If excludeFields and fields are specified, the excludeFields parameter takes precedence.

excludeFields

Type: Boolean

Specifies whether the fields are returned (false) or not (true). If unspecified, defaults to false.

mediaGroups

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of developer names of media group records.

If this list is empty or unspecified, all media groups are returned. If excludeMedia and mediaGroups are specified, the excludeMedia parameter takes precedence.

excludeMedia

Type: Boolean

Specifies whether the media groups and default images of the product are returned (false) or not (true). If unspecified, defaults to false.

excludeEntitlementDetails

Type: Boolean

Specifies whether the entitlement details of the product are returned (false) or not (true). If unspecified, defaults to false.

excludePrimaryProductCategory

Type: Boolean

Specifies whether the primary category path of the product is returned (false) or not (true). If unspecified, defaults to false.

excludeVariationInfo

Type: Boolean

Specifies whether the variation information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeAttributeSetInfo

Type: Boolean

Specifies whether the attribute set information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeQuantityRule

Type: Boolean

Specifies whether the quantity rule information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeProductSellingModels

Type: Boolean

Specifies whether product selling models are returned or not. The behavior of this parameter depends on whether you turn on the CommerceSubscription permission. If the permission is on, and if you set the parameter to false (or if you omit the parameter), product selling models are returned. If the permission is on, and if you set the parameter to true, product selling models are not returned. If the permission is off, product selling models are not returned, regardless of whether you omit the parameter or provide a value.

#### Return Value

Type: [ConnectApi.ProductDetail](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_detail.htm "Details of a product.")

#### Usage

This method respects buyer View Product entitlements and only users entitled to view product data can access it.

### getProduct(webstoreId, productId, effectiveAccountId, fields, mediaGroups, excludeFields, excludeMedia, excludePrimaryProductCategory, excludeVariationInfo, excludeAttributeSetInfo, excludeQuantityRule, excludeProductSellingModels)

Get detailed information for a product without its entitlement information.

#### API Version

57.0

Supported in API versions 57.0 to 64.0.

#### Available to Guest Users

57.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductDetail getProduct(String webstoreId, String productId, String effectiveAccountId, List<String\> fields, List<String\> mediaGroups, Boolean excludeFields, Boolean excludeMedia, Boolean excludePrimaryProductCategory, Boolean excludeVariationInfo, Boolean excludeAttributeSetInfo, Boolean excludeQuantityRule, Boolean excludeProductSellingModels)

#### Parameters

webstoreId

Type: String

ID of the webstore.

productId

Type: String

ID of the product.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made.If null, the default value is determined from context.

fields

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of field names.

If this list is unspecified, all fields are returned. There is no limit to the number of fields you can specify. The number of fields and number of characters in the field name may affect the URL size limit. If excludeFields and fields are specified, the excludeFields parameter takes precedence.

mediaGroups

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of developer names of media group records.

If this list is empty or unspecified, all media groups are returned. If excludeMedia and mediaGroups are specified, the excludeMedia parameter takes precedence.

excludeFields

Type: Boolean

Specifies whether the fields are returned (false) or not (true). If unspecified, defaults to false.

excludeMedia

Type: Boolean

Specifies whether the media groups and default images of the product are returned (false) or not (true). If unspecified, defaults to false.

excludePrimaryProductCategory

Type: Boolean

Specifies whether the primary category path of the product is returned (false) or not (true). If unspecified, defaults to false.

excludeVariationInfo

Type: Boolean

Specifies whether the variation information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeAttributeSetInfo

Type: Boolean

Specifies whether the attribute set information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeQuantityRule

Type: Boolean

Specifies whether the quantity rule information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeProductSellingModels

Type: Boolean

Specifies whether product selling models are returned or not. The behavior of this parameter depends on whether you turn on the CommerceSubscription permission. If the permission is on, and if you set the parameter to false (or if you omit the parameter), product selling models are returned. If the permission is on, and if you set the parameter to true, product selling models are not returned. If the permission is off, product selling models are not returned, regardless of whether you omit the parameter or provide a value.

#### Return Value

Type: [ConnectApi.ProductDetail](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_detail.htm "Details of a product.")

#### Usage

This method respects buyer View Product entitlements and only users entitled to view product data can access it.

### getProduct(webstoreId, productId, effectiveAccountId, fields, mediaGroups, excludeFields, excludeMedia, excludePrimaryProductCategory, excludeVariationInfo, excludeAttributeSetInfo, excludeQuantityRule, excludeProductSellingModels, noCache)

Get detailed information for a product without its entitlement information.

#### API Version

64.0

Supported in API versions 64.0 to 65.0.

#### Available to Guest Users

64.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductDetail getProduct(String webstoreId, String productId, String effectiveAccountId, List<String\> fields, List<String\> mediaGroups, Boolean excludeFields, Boolean excludeMedia, Boolean excludePrimaryProductCategory, Boolean excludeVariationInfo, Boolean excludeAttributeSetInfo, Boolean excludeQuantityRule, Boolean excludeProductSellingModels, String noCache)

#### Parameters

webstoreId

Type: String

ID of the webstore.

productId

Type: String

ID of the product.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made.

fields

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of field names.

If this list is unspecified, all fields are returned. There is no limit to the number of fields you can specify. The number of fields and number of characters in the field name may affect the URL size limit. If excludeFields and fields are specified, the excludeFields parameter takes precedence.

mediaGroups

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of developer names of media group records.

If this list is empty or unspecified, all media groups are returned. If excludeMedia and mediaGroups are specified, the excludeMedia parameter takes precedence.

excludeFields

Type: Boolean

Specifies whether the fields are returned (false) or not (true). If unspecified, defaults to false.

excludeMedia

Type: Boolean

Specifies whether the media groups and default images of the product are returned (false) or not (true). If unspecified, defaults to false.

excludePrimaryProductCategory

Type: Boolean

Specifies whether the primary category path of the product is returned (false) or not (true). If unspecified, defaults to false.

excludeVariationInfo

Type: Boolean

Specifies whether the variation information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeAttributeSetInfo

Type: Boolean

Specifies whether the attribute set information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeQuantityRule

Type: Boolean

Specifies whether the quantity rule information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeProductSellingModels

Type: Boolean

Specifies whether product selling models are returned or not. The behavior of this parameter depends on whether you turn on the CommerceSubscription permission. If the permission is on, and if you set the parameter to false (or if you omit the parameter), product selling models are returned. If the permission is on, and if you set the parameter to true, product selling models are not returned. If the permission is off, product selling models are not returned, regardless of whether you omit the parameter or provide a value.

noCache

Type: String

Specifies whether to ignore cached data and return the latest response (true) or not (false).

#### Return Value

Type: [ConnectApi.ProductDetail](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_detail.htm "Details of a product.")

#### Usage

This method respects buyer View Product entitlements and only users entitled to view product data can access it.

### getProduct(webstoreId, productId, effectiveAccountId, fields, mediaGroups, excludeFields, excludeMedia, excludePrimaryProductCategory, excludeVariationInfo, excludeAttributeSetInfo, excludeQuantityRule, excludeProductSellingModels, excludeDynamicAttributeInfo, noCache)

Get detailed information for a product without its entitlement information.

#### API Version

65.0

#### Available to Guest Users

65.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductDetail getProduct(String webstoreId, String productId, String effectiveAccountId, List<String\> fields, List<String\> mediaGroups, Boolean excludeFields, Boolean excludeMedia, Boolean excludePrimaryProductCategory, Boolean excludeVariationInfo, Boolean excludeAttributeSetInfo, Boolean excludeQuantityRule, Boolean excludeProductSellingModels, Boolean excludeDynamicAttributeInfo, String noCache)

#### Parameters

webstoreId

Type: String

ID of the webstore.

productId

Type: String

ID of the product.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made.

fields

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of field names.

If this list is unspecified, all fields are returned. There is no limit to the number of fields you can specify. The number of fields and number of characters in the field name may affect the URL size limit. If excludeFields and fields are specified, the excludeFields parameter takes precedence.

mediaGroups

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of developer names of media group records.

If this list is empty or unspecified, all media groups are returned. If excludeMedia and mediaGroups are specified, the excludeMedia parameter takes precedence.

excludeFields

Type: Boolean

Specifies whether the fields are returned (false) or not (true). If unspecified, defaults to false.

excludeMedia

Type: Boolean

Specifies whether the media groups and default images of the product are returned (false) or not (true). If unspecified, defaults to false.

excludePrimaryProductCategory

Type: Boolean

Specifies whether the primary category path of the product is returned (false) or not (true). If unspecified, defaults to false.

excludeVariationInfo

Type: Boolean

Specifies whether the variation information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeAttributeSetInfo

Type: Boolean

Specifies whether the attribute set information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeQuantityRule

Type: Boolean

Specifies whether the quantity rule information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeProductSellingModels

Type: Boolean

Specifies whether product selling models are returned or not. The behavior of this parameter depends on whether you turn on the CommerceSubscription permission. If the permission is on, and if you set the parameter to false (or if you omit the parameter), product selling models are returned. If the permission is on, and if you set the parameter to true, product selling models are not returned. If the permission is off, product selling models are not returned, regardless of whether you omit the parameter or provide a value.

excludeDynamicAttributeInfo

Type: Boolean

Specifies whether the dynamic attribute information for the product is returned (false) or not (true). If unspecified, defaults to true. This behavior of this parameter depends on whether you turn on the Commerce Dynamic Bundles permission. If dynamic bundles are supported, and if you set the parameter to false (or if you omit the parameter), count is returned. If dynamic bundles are supported, and if you set the parameter to true, count is not returned. If dynamic bundles aren't supported, count isn't returned, regardless of whether you omit the parameter or provide a value.

noCache

Type: String

Specifies whether to ignore cached data and return the latest response (true) or not (false).

#### Return Value

Type: [ConnectApi.ProductDetail](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_detail.htm "Details of a product.")

#### Usage

This method respects buyer View Product entitlements and only users entitled to view product data can access it.

### getProductCategory(webstoreId, productCategoryId, effectiveAccountId, fields, excludeFields, mediaGroups, excludeMedia)

Get a product category.

#### API Version

49.0

#### Available to Guest Users

51.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductCategoryDetail getProductCategory(String webstoreId, String productCategoryId, String effectiveAccountId, List<String\> fields, Boolean excludeFields, List<String\> mediaGroups, Boolean excludeMedia)

#### Parameters

webstoreId

Type: String

ID of the webstore.

productCategoryId

Type: String

ID of the product category.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made.If null, the default value is determined from context.

fields

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of field names.

If this list is unspecified, all fields are returned. There is no limit to the number of fields you can specify. The number of fields and number of characters in the field name may affect the URL size limit. If excludeFields and fields are specified, the excludeFields parameter takes precedence.

excludeFields

Type: Boolean

Specifies whether the fields are returned (false) or not (true). If unspecified, defaults to false.

mediaGroups

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of developer names of media group records.

If this list is empty or unspecified, all media groups are returned. If excludeMedia and mediaGroups are specified, the excludeMedia parameter takes precedence.

excludeMedia

Type: Boolean

Specifies whether the media groups and default images of the product are returned (false) or not (true). If unspecified, defaults to false.

#### Return Value

Type: [ConnectApi.ProductCategoryDetail](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_category_detail.htm "Details of a product category.")

### getProductCategoryChildren(webstoreId, effectiveAccountId, parentProductCategoryId, fields, excludeFields, mediaGroups, excludeMedia)

Get product categories.

#### API Version

52.0

#### Available to Guest Users

52.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductCategoryDetailCollection getProductCategoryChildren(String webstoreId, String effectiveAccountId, String parentProductCategoryId, List<String\> fields, Boolean excludeFields, List<String\> mediaGroups, Boolean excludeMedia)

#### Parameters

webstoreId

Type: String

ID of the webstore.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made.If null, the default value is determined from context.

parentProductCategoryId

Type: String

ID of the product category for which you want to get all the children product categories. If null, returns all the top-level product categories for the store.

fields

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of field names.

If this list is unspecified, all fields are returned. There is no limit to the number of fields you can specify. The number of fields and number of characters in the field name may affect the URL size limit. If excludeFields and fields are specified, the excludeFields parameter takes precedence.

excludeFields

Type: Boolean

Specifies whether the fields are returned (false) or not (true). If unspecified, defaults to false.

mediaGroups

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of developer names of media group records.

If this list is empty or unspecified, all media groups are returned. If excludeMedia and mediaGroups are specified, the excludeMedia parameter takes precedence.

excludeMedia

Type: Boolean

Specifies whether the media groups and default images of the product are returned (false) or not (true). If unspecified, defaults to false.

#### Return Value

Type: [ConnectApi.ProductCategoryDetailCollection](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_category_detail_collection.htm "Collection of product category details.")

### getProductCategoryPath(webstoreId, productCategoryId, effectiveAccountId)

Get the product category path from the root category to the current category.

#### API Version

49.0

#### Available to Guest Users

51.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductCategoryPath getProductCategoryPath(String webstoreId, String productCategoryId)

#### Parameters

webstoreId

Type: String

ID of the webstore.

productCategoryId

Type: String

ID of the product category.

effectiveAccountId

Type: String

If null, the default value is determined from context.ID of the buyer account or guest buyer profile for which the request is made. If unspecified, the default value is determined from context. This field is available in API version 65.0 and later.

#### Return Value

Type: [ConnectApi.ProductCategoryPath](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_category_path.htm "List of product categories in a path.")

#### Usage

This method respects buyer View Product entitlements and only users entitled to view product data can access it.

### getProductChildCollection(webstoreId, productId, effectiveAccountId, fields, mediaGroups, excludeFields, excludeMedia, excludeAttributeSetInfo, excludeQuantityRule, pageToken, pageSize)

Get a collection of child products related to a parent product.

#### API Version

57.0

#### Available to Guest Users

57.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductChildCollection getProductChildCollection(String webstoreId, String productId, String effectiveAccountId, List<String\> fields, List<String\> mediaGroups, Boolean excludeFields, Boolean excludeMedia, Boolean excludeAttributeSetInfo, Boolean excludeQuantityRule, String pageToken, Integer pageSize)

#### Parameters

webstoreId

Type: String

ID of the webstore.

productId

Type: String

ID of the product.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made. If unspecified, the default value is determined from context.

fields

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of field names.

If this list is empty or unspecified, all fields are returned. There’s no limit to the number of fields you can specify. The number of fields and number of characters in the field name may affect the URL size limit. If excludeFields and fields are specified, the excludeFields parameter takes precedence.

mediaGroups

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of developer names of media group records. Possible values:

- Attachment
- productDetailImage
- productListImage

If this list is empty or unspecified, all media groups are returned. If excludeMedia and mediaGroups are specified, the excludeMedia parameter takes precedence.

For product bundles, only the producListImage is returned.

excludeFields

Type: Boolean

Specifies whether the fields are returned (false) or not (true). If unspecified, defaults to false.

excludeMedia

Type: Boolean

Specifies whether the media groups and default images of the product are returned (false) or not (true). If unspecified, defaults to false.

excludeAttributeSetInfo

Type: Boolean

Specifies whether the attribute set information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeQuantityRule

Type: Boolean

Specifies whether the quantity rule information for the product is returned (false) or not (true). If unspecified, defaults to false.

pageToken

Type: String

Specifies the base64 encoded page token. Page tokens are returned as part of the response. If unspecified, the first page is returned.

pageSize

Type: Integer

Specifies the number of items per page. Valid values are from 1 through 100. If you don’t specify a value, the default size is 20.

#### Return Value

Type: [ConnectApi.ProductChildCollection](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_child_collection.htm "Collection of child products related to a parent product.")

### getProductChildCollection(webstoreId, productId, effectiveAccountId, fields, mediaGroups, excludeFields, excludeMedia, excludeAttributeSetInfo, excludeQuantityRule, includeProductSellingModels, includeRequiredChildrenOnly, excludeDynamicAttributeInfo, pageToken, pageSize, noCache)

Get a collection of child products related to a parent product.

#### API Version

66.0

#### Available to Guest Users

57.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductChildCollection getProductChildCollection(String webstoreId, String productId, String effectiveAccountId, List<String\> fields, List<String\> mediaGroups, Boolean excludeFields, Boolean excludeMedia, Boolean excludeAttributeSetInfo, Boolean excludeQuantityRule, Boolean includeProductSellingModels, Boolean includeRequiredChildrenOnly, Boolean excludeDynamicAttributeInfo, String pageToken, Integer pageSize, String noCache)

#### Parameters

webstoreId

Type: String

ID of the webstore.

productId

Type: String

ID of the product.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made. If unspecified, the default value is determined from context.

fields

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of field names.

If this list is empty or unspecified, all fields are returned. There’s no limit to the number of fields you can specify. The number of fields and number of characters in the field name may affect the URL size limit. If excludeFields and fields are specified, the excludeFields parameter takes precedence.

mediaGroups

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of developer names of media group records. Possible values:

- Attachment
- productDetailImage
- productListImage

If this list is empty or unspecified, all media groups are returned. If excludeMedia and mediaGroups are specified, the excludeMedia parameter takes precedence.

For product bundles, only the producListImage is returned.

excludeFields

Type: Boolean

Specifies whether the fields are returned (false) or not (true). If unspecified, defaults to false.

excludeMedia

Type: Boolean

Specifies whether the media groups and default images of the product are returned (false) or not (true). If unspecified, defaults to false.

excludeAttributeSetInfo

Type: Boolean

Specifies whether the attribute set information for the product is returned (false) or not (true). If unspecified, defaults to false.

excludeQuantityRule

Type: Boolean

Specifies whether the quantity rule information for the product is returned (false) or not (true). If unspecified, defaults to false.

includeProductSellingModels

Type: Boolean

Specifies whether product selling models are returned or not. The behavior of this parameter depends on whether you turn on the CommerceSubscription permission. If the permission is on, and if you set the parameter to false (or if you omit the parameter), product selling models are returned. If the permission is on, and if you set the parameter to true, product selling models are not returned. If the permission is off, product selling models are not returned, regardless of whether you omit the parameter or provide a value.

includeRequiredChildrenOnly

Type: Boolean

Specifies whether to include only the required children for the product (true) or not (false). If unspecified, defaults to true.

excludeDynamicAttributeInfo

Type: Boolean

Specifies whether to exclue the dynamic attribute information for the product (true) or not (false). If unspecified, defaults to true.

pageToken

Type: String

Specifies the base64 encoded page token. Page tokens are returned as part of the response. If unspecified, the first page is returned.

pageSize

Type: Integer

Specifies the number of items per page. Valid values are from 1 through 100. If you don’t specify a value, the default size is 20.

noCache

Type: String

Specifies whether to ignore cached data and return the latest response (true) or not (false).

#### Return Value

Type: [ConnectApi.ProductChildCollection](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_child_collection.htm "Collection of child products related to a parent product.")

### getProducts(webstoreId, effectiveAccountId, ids, skus, fields, excludeMedia, excludePrices)

Get fields, prices, and default images for a list of products.

#### API Version

54.0

Supported in API versions 54.0 to 63.0.

#### Available to Guest Users

54.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductOverviewCollection getProducts(String webstoreId, String effectiveAccountId, List<String\> ids, List<String\> skus, List<String\> fields, Boolean excludeMedia, Boolean excludePrices)

#### Parameters

webstoreId

Type: String

ID of the webstore.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made. If unspecified, the default value is determined from context.

ids

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

List of product IDs. Specify either a list of up to 20 product IDs or SKUs, but not both.

skus

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

List of SKUs. Specify either a list of up to 20 SKUs or product IDs, but not both.

fields

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of field names to return for each product. If the list is empty or not specified, all fields are returned. You can specify any number of fields.

excludeMedia

Type: Boolean

Specifies whether default images are returned for the products (false) or not (true). The default is false.

excludePrices

Type: Boolean

Specifies whether prices are returned for the products (false) or not (true). The default is false.

In version 58.0 and later, prices aren’t returned for products regardless of this parameter. To get pricing information for products in version 58.0 and later, use the [CommerceStorePricing Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_CommerceStorePricing_static_methods.htm#apex_ConnectAPI_CommerceStorePricing_static_methods "Get product prices.").

#### Return Value

Type: [ConnectApi.ProductOverviewCollection](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_overview_collection.htm "Collection of product overviews.")

### getProducts(webstoreId, effectiveAccountId, ids, skus, fields, excludeMedia)

Get fields and default images for a list of products.

#### API Version

58.0

Supported in API versions 58.0 to 62.0.

#### Available to Guest Users

58.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductOverviewCollection getProducts(String webstoreId, String effectiveAccountId, List<String\> ids, List<String\> skus, List<String\> fields, Boolean excludeMedia)

#### Parameters

webstoreId

Type: String

ID of the webstore.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made.If null, the default value is determined from context.

ids

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

List of product IDs. Specify either a list of up to 20 product IDs or SKUs, but not both.

skus

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

List of SKUs. Specify either a list of up to 20 SKUs or product IDs, but not both.

fields

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of field names to return for each product. If the list is empty or not specified, all fields are returned. You can specify any number of fields.

excludeMedia

Type: Boolean

Specifies whether default images are returnedSpecifies whether the media groups and default images of the product are returned (false) or not (true). If unspecified, defaults to false.

#### Return Value

Type: [ConnectApi.ProductOverviewCollection](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_overview_collection.htm "Collection of product overviews.")

### getProducts(webstoreId, effectiveAccountId, ids, skus, fields, excludeMedia, includeQuantityRule, includeProductSellingModels, includeAttributeSetInfo, includeGroupByAttributeVariationInfo)

Get fields and default images for a list of products.

#### API Version

63.0

Supported in API versions 63.0 to 64.0.

#### Available to Guest Users

54.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductOverviewCollection getProducts(String webstoreId, String effectiveAccountId, List<String\> ids, List<String\> skus, List<String\> fields, Boolean excludeMedia, Boolean includeQuantityRule, Boolean includeProductSellingModels, Boolean includeAttributeSetInfo, Boolean includeGroupByAttributeVariationInfo)

#### Parameters

webstoreId

Type: String

ID of the webstore.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made.If null, the default value is determined from context.

ids

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

List of product IDs. Specify either a list of up to 20 product IDs or SKUs, but not both.

skus

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

List of skus. Specify either a list of up to 20 SKUs or product IDs, but not both.

fields

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of field names to return for each product. If the list is empty or not specified, all fields are returned. You can specify any number of fields.

excludeMedia

Type: Boolean

Specifies whether the media groups and default images of the product are returned (false) or not (true). If unspecified, defaults to false.

includeQuantityRule

Type: Boolean

Specifies whether the quantity rule information for the product is returned (false) or not (true). If unspecified, defaults to false.

includeProductSellingModels

Type: Boolean

Specifies whether product selling models are returned (true) or not (false). The behavior of this parameter depends on whether you turn on the CommerceSubscription permission. If the permission is on, and if you set the parameter to false (or if you omit the parameter), product selling models are returned. If the permission is on, and if you set the parameter to true, product selling models are not returned. If the permission is off, product selling models are not returned, regardless of whether you omit the parameter or provide a value.

includeAttributeSetInfo

Type: Boolean

Specifies whether the attribute set information for the product is returned (true) or not (false). If unspecified, defaults to false.

includeGroupByAttributeVariationInfo

Type: Boolean

Specifies whether the attribute set information for the product is returned (true) or not (false). If unspecified, defaults to false.

#### Return Value

Type: [ConnectApi.ProductOverviewCollection](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_overview_collection.htm "Collection of product overviews.")

### getProducts(webstoreId, effectiveAccountId, ids, skus, fields, excludeMedia, includeQuantityRule, includeProductSellingModels, includeAttributeSetInfo, includeGroupByAttributeVariationInfo, noCache)

Get fields and default images for a list of products.

#### API Version

64.0

#### Available to Guest Users

64.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.ProductOverviewCollection getProducts(String webstoreId, String effectiveAccountId, List<String\> ids, List<String\> skus, List<String\> fields, Boolean excludeMedia, Boolean includeQuantityRule, Boolean includeProductSellingModels, Boolean includeAttributeSetInfo, Boolean includeGroupByAttributeVariationInfo, String noCache)

#### Parameters

webstoreId

Type: String

ID of the webstore.

effectiveAccountId

Type: String

ID of the buyer account or guest buyer profile for which the request is made.

ids

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

List of product IDs. Specify either a list of up to 20 product IDs or SKUs, but not both.

skus

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

List of skus. Specify either a list of up to 20 SKUs or product IDs, but not both.

fields

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<String>

Comma-separated list of field names to return for each product. If the list is empty or not specified, all fields are returned. You can specify any number of fields.

excludeMedia

Type: Boolean

Specifies whether the media groups and default images of the product are returned (false) or not (true). If unspecified, defaults to false.

includeQuantityRule

Type: Boolean

Specifies whether the quantity rule information for the product is returned (false) or not (true). If unspecified, defaults to false.

includeProductSellingModels

Type: Boolean

Specifies whether product selling models are returned (true) or not (false). The behavior of this parameter depends on whether you turn on the CommerceSubscription permission. If the permission is on, and if you set the parameter to false (or if you omit the parameter), product selling models are returned. If the permission is on, and if you set the parameter to true, product selling models are not returned. If the permission is off, product selling models are not returned, regardless of whether you omit the parameter or provide a value.

includeAttributeSetInfo

Type: Boolean

Specifies whether the attribute set information for the product is returned (true) or not (false). If unspecified, defaults to false.

includeGroupByAttributeVariationInfo

Type: Boolean

Specifies whether the attribute set information for the product is returned (true) or not (false). If unspecified, defaults to false.

noCache

Type: String

Specifies whether to ignore cached data and return the latest response (true) or not (false).

#### Return Value

Type: [ConnectApi.ProductOverviewCollection](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_overview_collection.htm "Collection of product overviews.")