この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

Get Global Account Product List

取引先の顧客のボリュームおよび指標に基づいて、グローバル取引先商品リストから取引先商品を取得します。
商品がグローバルリストに含まれるのは、次のいずれかの条件が満たされた場合です。
  • 商品のボリュームレコードまたは条件レコードが存在している。
  • 顧客用に作成されたプロモーションに商品が含まれている。
「取引先商品リストについて」を参照してください。
リソース
1GET_GLOBAL_ACCOUNT_PRODUCT_LIST
使用可能なバージョン
55.0
要求パラメータ
名前 説明 必須か省略可能
accountId String Salesforce からの取引先レコードの ID。 必須
Apex 要求の例
1// Logical endpoint name
2String endpointName = 'GET_GLOBAL_ACCOUNT_PRODUCT_LIST';
3// name of the salesorg for which the API must be scheduled
4String salesOrg = '0001';
5<namespace>.OffplatformCallout callout = new <namespace>.OffplatformCallout(endpointName, salesOrg);
6
7// Log Transaction Id
8String txId = <namespace>.TransactionHandler.getTransactionIdentifier();
9
10// Account Id for which the products in the global apl should be retrieved
11Id accountId = '001B000001Q48yMIAR'; // Kroger Atlanta
12
13Map<String, String> urlParameters = new Map<String,String>();
14urlParameters.put('accountid', accountId);
15
16String payload = null;
17
18<namespace>.OffplatformCalloutResponse response = callout.execute(txId, urlParameters, payload);
19
20if (response.status != 200) {
21   // Handle error and return error info to caller
22  
23} 
24// Fetch the list from the response
25Set<Id> accountproducts = new Set<Id>();
26String aplListString = (String) response.Result;
27if (!String.isEmpty(aplListString)) {
28    Map<String, Object> mapAccountProductList = (Map<String, Object>) JSON.deserializeUntyped(
29        aplListString
30    );
31    List<Object> listAccountProductListIds = (List<Object>) mapAccountProductList.get(
32    'accountproducts'
33    );
34    for (Object obj : listAccountProductListIds) {
35    accountproducts.add((Id) obj);
36    }
37}