---
schema_version: "1"
id: f92a6cd7b7b2b741e5770ba442a2b1152c12c7b86e9f642f4f01b0e6f460afae
title: productsExpand(scope, products, expand)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_ConnectAPI_OMSAnalytics_productExpand.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_OMSAnalytics_productExpand.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 24eb21c42bb4c95863f935350fb6d56444a3896e962923054edee24049505125
description: Fetches expanded details of a product that aren’t found in the sObject. The expanded variable fields, such as return reasons, are added as output. This method supports an extensibility framework that lets the context user override the existing implementation so they can fetch the data from third-party apps. The application doesn’t require two separate APIs to get return reasons.
---
# productsExpand(scope, products, expand)

Fetches expanded details of a product that aren’t found in the sObject. The expanded variable fields, such as return reasons, are added as output. This method supports an extensibility framework that lets the context user override the existing implementation so they can fetch the data from third-party apps. The application doesn’t require two separate APIs to get return reasons.

## API Version

59.0

## Requires Chatter

No

## Signature

public static ConnectApi.ProductsListOutputRepresentation productsExpand(String scope, List<String\> products, List<ConnectApi.ProductExpandType> expand)

## Parameters

scope

Type: String

The scope for the extensibility framework. Requires a web store ID.

products

Type: List (String)

A list of IDs to fetch details for.

expand

Type: List (String)

Output representation for expand feature.

## Return Value

Type: [ConnectApi.ProductsListOutputRepresentation](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_product_list.htm "Output representation of products with product data along with expand details.")

## Example

String scope = 'webstoreId eq ' + ws.Id;
        ConnectApi.ProductsListOutputRepresentation output = ConnectApi.OMSAnalytics.productsExpand(scope, productIds, new List <ConnectApi.ProductExpandType> {
        ConnectApi.ProductExpandType.ReturnReasons
        });