BenefitAction
Represents details of an action that can be triggered
automatically for a benefit.This type extends the Metadata
metadata type and inherits its fullName field.
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.
<?xml version="1.0" encoding="UTF-8"?>
<BenefitAction xmlns="http://soap.sforce.com/2006/04/metadata">
<description>Metadata API Test</description>
<flowDefinition>test</flowDefinition>
<isActive>true</isActive>
<isBenefitExpirationAllowed>true</isBenefitExpirationAllowed>
<isBenefitUpdateAllowed>true</isBenefitUpdateAllowed>
<masterLabel>Test1</masterLabel>
<processType>1</processType>
<memberBenefitVariableName>test</memberBenefitVariableName>
<benefitActionParameters>
<name>test</name>
<picklistName>Type</picklistName>
<masterLabel>test</masterLabel>
<dataType>Picklist</dataType>
<objectName>Account</objectName>
<parameterValues>
<parameterValue>string</parameterValue>
</parameterValues>
</benefitActionParameters>
<type>1</type>
</BenefitAction>
The following is an example package.xml that references the previous definition.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>*</members>
<name>BenefitAction</name>
</types>
<types>
<members>test</members>
<name>Flow</name>
</types>
<version>52.0</version>
</Package>