---
schema_version: "1"
id: f520ab24dee8b6d27773c8a7f36e0068596e40242f5a4ee10e6a20f6dab4d6fe
title: Get Global Account Product List
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/retail_api/cgtpm_get_global_account_prod_list.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/cgtpm_get_global_account_prod_list.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9fe6bda03c888933c3359e3a1e6c1e36bb8ecee7739f418eae84d4e4d9f80fe5
description: Retrieves the account products from the global account product list based on the volumes and measures for the customer for the account.
---
# Get Global Account Product List

Retrieves the account products from the global account product list based on the volumes and measures for the customer for the account.

A product is included in a global list if one of these criteria is met.

- Volume or condition record exists for the product.
- The product is included in a promotion that's created for the customer.

## Resource

GET\_GLOBAL\_ACCOUNT\_PRODUCT\_LIST

## Available version

55.0

## Request Parameters

| Name | Type | Description | Required or Optional |
| --- | --- | --- | --- |
| accountId | String | ID of the account record from Salesforce. | Required |

## Apex Request Example

// Logical endpoint name
String endpointName = 'GET\_GLOBAL\_ACCOUNT\_PRODUCT\_LIST';
// name of the salesorg for which the API must be scheduled
String salesOrg = '0001';
<namespace>.OffplatformCallout callout = new <namespace>.OffplatformCallout(endpointName, salesOrg);
// Log Transaction Id
String txId = <namespace>.TransactionHandler.getTransactionIdentifier();
// Account Id for which the products in the global apl should be retrieved
Id accountId = '001B000001Q48yMIAR'; // Kroger Atlanta
Map<String, String\> urlParameters = new Map<String,String\>();
urlParameters.put('accountid', accountId);
String payload = null;
<namespace>.OffplatformCalloutResponse response = callout.execute(txId, urlParameters, payload);
if (response.status != 200) {
   // Handle error and return error info to caller
} 
// Fetch the list from the response
Set<Id> accountproducts = new Set<Id>();
String aplListString = (String) response.Result;
if (!String.isEmpty(aplListString)) {
    Map<String, Object\> mapAccountProductList = (Map<String, Object\>) JSON.deserializeUntyped(
        aplListString
    );
    List<Object\> listAccountProductListIds = (List<Object\>) mapAccountProductList.get(
    'accountproducts'
    );
    for (Object obj : listAccountProductListIds) {
    accountproducts.add((Id) obj);
    }
}