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.
BenefitAction
File Suffix and Directory Location
BenefitAction components have the suffix .benefitAction and are stored in the benefitActions folder.
Version
BenefitAction components are available in API version 52.0 and later.
Special Access Rules
To use this metadata type, the Loyalty Management license is required
Fields
| Field Name | Field Type | Description |
|---|---|---|
| benefitActionParameters | BenefitActionParameter[] | The collection of flow input parameters to be used in a benefit action. |
| description | string | The description of the benefit action. |
| flowDefinition | string | The ID of the flow associated with the benefit action. |
| isActive | boolean | Required. Indicates whether the benefit action is active (true) or inactive (false). The default value is false. |
| isBenefitExpirationAllowed | boolean | Indicates whether the benefit action is allowed to expire a benefit (true) or not (false). The default value is false. |
| isBenefitUpdateAllowed | boolean | Indicates whether the benefit action is allowed to update a benefit (true) or not (false). The default value is false. |
| masterLabel | string | Required. The user interface name of the benefit action. |
| memberBenefitVariableName | string | The name of the input variable that stores the member benefit ID in the flow specified for the benefit action. |
| processType | string | Required. The process type of the benefit action. The default value is Loyalty. |
| type | string | Required. The type of the benefit action. |
BenefitActionParameter
| Field Name | Field Type | Description |
|---|---|---|
| dataType | BenefitActionDataType(enumeration of type string) | Required. The data type of the parameter. Possible values are:
|
| masterLabel | string | Required. The user interface name of the parameter. |
| name | string | The name of the parameter. |
| objectName | string | The object associated with the parameter when the data type is record. |
| parameterValues | BenefitActionParameterValue[] | A collection of predefined values for the benefit action parameter. |
| picklistName | string | The name of the picklist fields in the object associated with the parameter. |
BenefitActionParameterValue
| Field Name | Field Type | Description |
|---|---|---|
| parameterValue | string | Required. The predefined value of the parameter. |
Declarative Metadata Sample Definition
The following is an example of a BenefitAction component.
1<?xml version="1.0" encoding="UTF-8"?>
2<BenefitAction xmlns="http://soap.sforce.com/2006/04/metadata">
3 <description>Metadata API Test</description>
4 <flowDefinition>test</flowDefinition>
5 <isActive>true</isActive>
6 <isBenefitExpirationAllowed>true</isBenefitExpirationAllowed>
7 <isBenefitUpdateAllowed>true</isBenefitUpdateAllowed>
8 <masterLabel>Test1</masterLabel>
9 <processType>1</processType>
10 <memberBenefitVariableName>test</memberBenefitVariableName>
11 <benefitActionParameters>
12 <name>test</name>
13 <picklistName>Type</picklistName>
14 <masterLabel>test</masterLabel>
15 <dataType>Picklist</dataType>
16 <objectName>Account</objectName>
17 <parameterValues>
18 <parameterValue>string</parameterValue>
19 </parameterValues>
20 </benefitActionParameters>
21 <type>1</type>
22</BenefitAction>The following is an example package.xml that references the previous definition.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>*</members>
5 <name>BenefitAction</name>
6 </types>
7 <types>
8 <members>test</members>
9 <name>Flow</name>
10 </types>
11 <version>52.0</version>
12</Package>Wildcard Support in the Manifest File
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.