Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
getPromotionTemplates
This method returns the list of promotion templates along with
additional information. The method will search for promotion templates where the
"Display_In_MetadataWizard__c" field is set to true unless the "all" parameter is set to
true.
Input Parameters
Wizards are generated from a metadata JSON structure defining the list of components that
will be part of a wizard along with some additional properties to define the available
actions and the general layout.
| Name | Description |
|---|---|
| all | Boolean. If true, it will display all valid promotion templates. If false or not set, it will return only the templates with the flag "Display_In_MetadataWizard__c" as true. |
Input Sample
1{
2 "class": "NewPromotionWizardCallable",
3 "method": "getPromotionTemplates",
4 "cache": true
5}Response Sample
1[
2 {
3 "NumberOfTacticKPIs": 0,
4 "NumberOfPromotionKPIs": 0,
5 "HasTacticTemplates": true,
6 "ProductDefinitionLevel": "Tactic",
7 "AnchorType": "Customer",
8 "Name": "*BanTest_Tacticlevel",
9 "Id": "a2a2X000004L7wPQAS"
10 },
11 {
12 "NumberOfTacticKPIs": 0,
13 "NumberOfPromotionKPIs": 1,
14 "HasTacticTemplates": true,
15 "ProductDefinitionLevel": "Tactic",
16 "AnchorType": "Customer",
17 "Name": "Customer Promotion",
18 "Id": "a2a2X000004L7xPQAS"
19 }
20]Response Properties
This method will return a list of items with the following properties:
| Name | Description |
|---|---|
| AnchorType | Anchor Type for the Promotion. Possible values are "Customer", "CustomerSet" and null |
| HasTacticTemplates | Boolean value. True if the Promotion Template can have tactics because it has related Tactic Templates. |
| Id | SFDC Id of the Promotion template |
| Name | Description value of the promotion template. |
| NumberOfPromotionKPIs | Number of Editable and Editable Calculated Promotion Level KPI's the template has. |
| NumberOfTacticKPIs | Number of Editable and Editable Calculated Tactic Level KPI's the template has. |
| ProductDefinitionLevel | Product definition level for the template. Valid values are "Promotion" and "Tactic" |