getAccounts

This method returns the list of accounts valid for the target promotion. Target promotion timeframe is calculated by the difference in days between the original promotion date and the new date.

Input Parameters 

NameTypeRequiredDescription
promotionIdStringYESID of the promotion.
inStoreDateFromStringYESNew start date of the promotion.

Input Sample 

1"source": {
2    "class": "CopyPromotionWizardCallable",
3    "method": "getAccounts",
4    "cache": true,
5    "params": {
6        "promotionId": "{! promotionId }",
7        "inStoreDateFrom": "{! promoDateFrom }"
8    }
9}

Response Sample 

1[
2    {
3        "Name": "*Kroger Atlanta",
4        "Id": "0012X000023GAClQAO"
5    },
6    {
7        "Name": "*Kroger Store #201",
8        "Id": "0012X000023GACxQAO"
9    },
10    {
11        "Name": "*Safeway South-East",
12        "Id": "0012X000023GAC5QAO"
13    },
14    {
15        "Name": "+Kroger Detroit",
16        "Id": "0012X000023GACWQA4"
17    }
18]

Response Properties 

NameDescription
IdID of the Account.
NameName of the Account.