Introduction to Referral Marketing
CommunicationChannelType
Flow for Referral Marketing
IndustriesReferralMarketingSettings
LoyaltyProgramSetup
Previous Versions
Represents the configuration of a loyalty program process including its parameters and rules. Program processes determine how new transaction journals are processed. When new transaction journals meet the criteria and conditions for a program process, actions that are set up in the process are triggered for the transaction journals.
Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.
Important
This type extends the Metadata metadata type and inherits its fullName field.
LoyaltyProgramSetup components have the suffix loyaltyProgramSetup and are stored in the loyaltyProgramSetups folder.
LoyaltyProgramSetup components are available in API version 54.0 and later for Loyalty Management and in API version 59.0 and later for Referral Marketing.
To use this metadata type, your org must have either B2C - Loyalty, B2C - Loyalty Plus, Loyalty Management - Growth, Loyalty Management - Advanced, or Referral Marketing license enabled.
Field Type: string
Description: Name of the loyalty program that the program process is associated with. If a loyalty program or referral program with the specified name doesn’t exist, a new LoyaltyProgram record is created. The name of a program must contain at least one alphanumeric character.
Field Type: LoyaltyProgramProcess[]
Description: Collection of loyalty program processes associated with a loyalty program or a referral program.
Represents a collection of fields relating to a loyalty program process.
Field Type: string
Description: The description of the loyalty program process.
Field Type: LoyaltyPgmProcExecutionType (enumeration of type string)
Description: The mode of processing transaction journals by the loyalty program process.
Possible values are:
BatchBatchAndRealTimeRealTimeField Type: string
Description: The subtype of transaction journals processed by the loyalty program process.
Field Type: string
Description: The type of transaction journal processed by the loyalty program process.
Possible values for loyalty program:
AccrualRedemptionPossible value for referral program:
ReferralField Type: string
Description: The tier group of a loyalty program. This field is available in API version 56.0 and later. This field isn’t applicable for referral programs.
Field Type: LoyaltyProgramProcessParameter[]
Description: The parameters associated with the loyalty program process.
Field Type: string
Description: Required. The name of the loyalty program process.
Field Type: string
Description: Required. The type of records processed by the loyalty program process. For referral programs, the process type is TransactionJournal.
Field Type: LoyaltyProgramProcessRule[]
Description: The rules associated with the loyalty program process.
Field Type: LoyaltyPgmProcStatus (enumeration of type string)
Description: The status of the loyalty program process.
Possible values are:
ActiveDraftInactiveOnly active program processes can process transaction journals.
Note
Represents a collection of fields relating to a parameter that’s associated with the program process. Parameters are dynamic or fixed values that are used in rule. You can define the value of a parameter based on its type and data type.
Field Type: LoyaltyProgramProcessCondition
Description: The filter condition that decides which records are stored in the parameter.
Field Type: LoyaltyPgmProcParmDataType (enumeration of type string)
Description: The data type of the parameter. Determines the type of value that can be stored in the parameter.
Possible values are:
BooleanDateDateTimeNumericSobjectTextField Type: int
Description: The number of decimal places supported by the parameter when it is of the type Variable and data type Numeric.
Field Type: string
Description: The description of the parameter.
Field Type: boolean
Description: Indicates whether the parameter can store multiple values when it is of the type Variable.
Field Type: boolean
Description: Indicates whether a parameter can be used as an input outside the loyalty program process.
Field Type: boolean
Description: Indicates whether a parameter can be used as an output outside the loyalty program process.
Field Type: string
Description: Name of the object whose records are stored by the parameter when it is of the type Variable and data type sObject.
Field Type: string
Description: Required. The name of the parameter.
Field Type: LoyaltyPgmProcParmType (enumeration of type string)
Description: The type of value the parameter can store.
Possible values are:
ConstantFormulaVariableField Type: string
Description: The value of the parameter when it is of the type Variable or Formula and isn’t of the data type sObject.
Represents a collection of fields relating to a condition. Conditions filter records that parameters store or check whether child actions must be triggered for a transaction journal.
Field Type: string
Description: Required. The criteria that determine when the condition is met by a record or by a transaction journal.
Field Type: LoyaltyProgramProcessConditionFilterCriteria[]
Description: The filter criteria that determines which records or transaction journals are filtered.
Field Type: string
Description: Required. The name of the condition.
Field Type: LoyaltyPgmProcRuleType (enumeration of type string)
Description: Specifies the type of condition in the loyalty program process.
Values:
ConditionActionConditionGroupDefaultPathRepresents a collection of fields relating to a filter criteria that’s part of a condition. Multiple filter criteria can be added for a condition. Filter criteria determine which records are filtered by related condition.
Field Type: LoyaltyPgmProcCondOperator (enumeration of type string)
Description: Required. The operator of the filter criteria.
Possible values are:
ContainsDoesNotContainEqualsGreaterThanGreaterThanOrEqualsIsNotNullIsNullLessThanLessThanOrEqualsNotEqualsField Type: int
Description: Required. The sequence number of the filter criteria within a condition.
Field Type: string
Description: Required. The name of the field used in the filter criteria.
Field Type: string
Description: The value of the filter criteria.
Field Type: LoyaltyPgmProcCondType (enumeration of type string)
Description: Required. The type of value specified in the filter criteria.
Possible values are:
FormulaLiteralLookupParameterRepresents a collection of fields relating to a rule. A rule consists of a set of conditions and actions.
Field Type: LoyaltyProgramProcessAction[]
Description: The actions associated with the rule.
Field Type: LoyaltyProgramProcessCondition[]
Description: The conditions associated with the rule.
Field Type: string
Description: The description of the rule.
Field Type: date
Description: The date until which the rule processes transaction journals.
Field Type: boolean
Description: Indicates whether the rule is used to determine eligibility for processing the loyalty program process (true) or not (false). When set to true, the rule is evaluated as a process eligibility rule. When set to false, the rule is evaluated as a standard program process rule.
Field Type: string
Description: The rule that processes new transaction journals before the current rule. The current rule is triggered when the previous rule completes processing transaction journals.
Field Type: string
Description: The promotion associated with the rule. When a promotion is associated with a rule, the start date, end date, and status of the promotion determines the corresponding fields of the rule.
Field Type: string
Description: Required. The name of the rule.
Field Type: date
Description: The date from which the rule starts processing transaction journals.
Field Type: LoyaltyPgmProcRuleStatus (enumeration of type string)
Description: The status of the rule.
Possible values are:
ActiveDraftInactiveField Type: LoyaltyProgramProcessRuleStepMapping[]
Description: The list of step mappings associated with rule.
Represents a collection of fields relating to an action.
Field Type: string
Description: Required. The name of the action.
Field Type: LoyaltyProgramProcessActionParameter[]
Description: The parameters of the action.
Field Type: LoyaltyPgmProcActionType (enumeration of type string)
Description: Required. The type of action.
Possible values are:
These values are used in Loyalty Management:
AssignParameterValues— Assigns values to parameters.AssignBadgeToMember—Assigns a badge to a loyalty program member. This value is available in API version 56.0 and later.Crud—Creates or updates records in the target object. This value is available in API version 56.0 and later.CheckMemberBadgeAssignment— Checks whether a badge is assigned to a loyalty program member. This value is available in API version 56.0 and later.ChangeMemberTier—Changes the tier of a loyalty program member. This value is available in API version 56.0 and later.CreditPoints—Credits points to the loyalty program member associated with the transaction journal that’s processed by the rule.DebitPoints—Debits points from the points balance of the loyalty program member associated with the transaction journal that’s processed by the rule.GetMemberAttributesValues— Gets the details of a loyalty program member’s attribute value for the selected engagement attribute. This value is available in API version 55.0 and later.GetMemberPartnerLinkageStatus —Gets the partner linkage status of the loyalty program member associated with the transaction journal that’s processed by the rule.GetMemberPointBalance—Gets the points balance of a loyalty program member.GetMemberPromotions—Get promotions of a loyalty program member. This value is available in API version 56.0 and later.GetMemberTier—Gets the tier details of a loyalty program member.GetOutputsFromDecisionTable —Gets outputs provided by a decision table. This value is available in API version 56.0 and later.IncreaseUsageForCumulativePromotion —Increases a loyalty program member’s usage for a cumulative promotion.IssueVoucher—Issues a voucher to the loyalty program member associated with the transaction journal that’s processed by the rule.RedeemVoucher—Redeems a voucher for the loyalty program member associated with the transaction journal that’s processed by the rule. This value is available in API version 58.0 and later.RunFlow—Runs a flow.RunProgramProcess—Runs an active loyalty program process as a subprocess. This value is available in API version 56.0 and later.SendMail—Sends emails to the loyalty program member for whom the process is run. This value is available in API version 59.0 and later.UpdateCurrentValueForMemberAttribute —Updates the loyalty program member’s current attribute value for the selected engagement attribute. This value is available in API version 55.0 and later.UpdatePointBalance—Updates the points balance of the loyalty program member associated with the transaction journal that’s processed by the rule.UpdateUsageForCumulativePromotion —Updates a loyalty program member’s usage for a cumulative promotion.These values are used in Referral Marketing:
AssignParameterValues— Assigns values to parameters.Crud—Creates or updates records in the target object.GetMemberAttributesValues— Gets the details of an advocate’s attribute value for the selected engagement attribute.GetMemberPromotions—Gets the promotions of an advocate.GetOutputsFromDecisionTable —Gets outputs provided by a decision table.IssueExtendedReward—Issues an extended reward to an advocate or a referred friend. This value is available in API version 64.0 and later.IssueVoucher—Issues a voucher to an advocate or a referred friend.RedeemVoucher—Redeems a voucher for an advocate or a friend.SendMail—Sends emails to a referral program’s advocates and referrals.UpdateCurrentValueForMemberAttribute —Updates an advocate’s current attribute value for the selected engagement attribute.These values are reserved for internal use:
GetCustomerPromotionAttrValue —This value is available in API version 64.0 and later.UpdateCustomerPromotionAttrValue —This value is available in API version 64.0 and later.Field Type: LoyaltyPgmProcCrudActType (enumeration of type string)
Description: The type of operation to perform on target object records by the action. This field is available from API version 56.0 and later.
This field is required when the actionType field value is CRUD.
Note
Possible values are:
createupdateField Type: string
Description: The decision that’s invoked by the action for the transaction journal that’s processed by the rule.
Field Type: string
Description: The dataset link associated with the selected decision table.
Field Type: string
Description: The API name of the target object. This field is available from API version 56.0 and later.
This field is required when the actionType field value is CRUD.
Note
Field Type: string
Description: The flow that’s run by the action for the transaction journal that’s processed by the rule. The selected flow must be of the type LoyaltyManagementFlow.
Field Type: string
Description: The subprogram processes that’s run by the action. This field is available from API version 56.0 and later.
This field is required when the actionType field value is RunProgramProcess.
Note
Represents a collection of fields relating to an action parameter. A parameter is either an input or an output for the action. Input parameters store the values used by the action. Output parameters store the result of the action.
Field Type: LoyaltyPgmProcActParamOper (enumeration of type string)
Description: The type of operator used in the action. This field is available in API version 56.0 and later.
Possible value is:
EqualsField Type: string
Description: Required. The name of parameter. The parameter name must be the same as the input or the output field that’s supported depending on the associated action’s type.
Field Type: int
Description: The sequence number of the parameter in the action. This field is available in API version 56.0 and later.
Field Type: string
Description: Required. The value of the parameter.
Field Type: LoyaltyPgmProcActParamType (enumeration of type string)
Description: The type of value to provide in the parameter. This field is available in API version 56.0 and later.
Possible values are:
Literal—A constant value.Parameter—A runtime value passed using a parameter.Represents a collection of fields relating to a step mapping. Map conditions with child actions or map an action without a parent step.
Field Type: string
Description: Required. The action that’s associated with the mapping.
Field Type: string
Description: The condition that contains one or more child actions.
Field Type: int
Description: Required. The sequence number of the mapping within a rule.
The following is an example of a LoyaltyProgramSetup component.
1<?xml version="1.0" encoding="UTF-8"?>
2<LoyaltyProgramSetup xmlns="http://soap.sforce.com/2006/04/metadata">
3 <label>Cloud Kicks Inner Circle</label>
4 <programProcesses>
5 <executionType>RealTime</executionType>
6 <parameters>
7 <dataType>Numeric</dataType>
8 <decimalPlaces>0</decimalPlaces>
9 <isCollection>false</isCollection>
10 <isInput>false</isInput>
11 <isOutput>false</isOutput>
12 <parameterName>VoucherValue</parameterName>
13 <parameterType>Constant</parameterType>
14 <value>50</value>
15 </parameters>
16 <processName>Issue Vouchers</processName>
17 <processType>Transaction Journal</processType>
18 <rules>
19 <isProcessEligibilityRule>false</isProcessEligibilityRule>
20 <actions>
21 <actionName>Issue High Transaction Value Voucher</actionName>
22 <actionParameters>
23 <operator>Equals</operator>
24 <parameterName>VoucherDefinitionName</parameterName>
25 <sequenceNumber>1</sequenceNumber>
26 <value>Voucher for High Value Transactions</value>
27 <valueType>Literal</valueType>
28 </actionParameters>
29 <actionParameters>
30 <operator>Equals</operator>
31 <parameterName>VoucherCode</parameterName>
32 <sequenceNumber>2</sequenceNumber>
33 <value>{!TransactionJournal.Order.Id}</value>
34 </actionParameters>
35 <actionParameters>
36 <operator>Equals</operator>
37 <parameterName>VoucherEffectiveDate</parameterName>
38 <sequenceNumber>3</sequenceNumber>
39 <value>DATEVALUE("2021-11-21 00:00:00")</value>
40 </actionParameters>
41 <actionParameters>
42 <operator>Equals</operator>
43 <parameterName>VoucherExpirationDate</parameterName>
44 <sequenceNumber>4</sequenceNumber>
45 <value>DATEVALUE("2022-01-01 00:00:00")</value>
46 </actionParameters>
47 <actionParameters>
48 <operator>Equals</operator>
49 <parameterName>VoucherFaceValue</parameterName>
50 <sequenceNumber>5</sequenceNumber>
51 <value>{!VoucherValue}</value>
52 </actionParameters>
53 <actionType>IssueVoucher</actionType>
54 </actions>
55 <conditions>
56 <conditionCriteria>1</conditionCriteria>
57 <conditionFilterCriteria>
58 <operator>GreaterThanOrEquals</operator>
59 <sequence>1</sequence>
60 <sourceFieldName>TransactionJournal.TransactionAmount</sourceFieldName>
61 <value>100</value>
62 <valueType>Literal</valueType>
63 </conditionFilterCriteria>
64 <conditionName>New Condition</conditionName>
65 <conditionType>Condition</conditionType>
66 </conditions>
67 <endDate>2022-01-01</endDate>
68 <ruleName>Issue Voucher for Transactions Above $100</ruleName>
69 <startDate>2021-11-21</startDate>
70 <status>Draft</status>
71 <stepMappings>
72 <associatedStep>New Condition</associatedStep>
73 <sequence>1</sequence>
74 </stepMappings>
75 <stepMappings>
76 <associatedStep>Issue High Transaction Value Voucher</associatedStep>
77 <parentStep>New Condition</parentStep>
78 <sequence>1</sequence>
79 </stepMappings>
80 </rules>
81 <status>Draft</status>
82 </programProcesses>
83</LoyaltyProgramSetup>The following is an example package.xml that references the previous definition.
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 ~ Copyright 2020 Salesforce, Inc.
4 ~ All Rights Reserved
5 ~ Company Confidential
6-->
7<Package xmlns="http://soap.sforce.com/2006/04/metadata">
8 <types>
9 <members>*</members>
10 <name>LoyaltyProgramSetup</name>
11 </types>
12 <version>54.0</version>
13</Package>To retrieve metadata specific to any loyalty program, mention the loyalty program name in the <members> tag. The generated file contains all the information regarding that loyalty program.
Note
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.