Newer Version Available
LoyaltyProgramSetup
File Suffix and Directory Location
LoyaltyProgramSetup components have the suffix loyaltyProgramSetup and are stored in the loyaltyProgramSetups folder.
Version
LoyaltyProgramSetup components are available in API version 54.0 and later.
Special Access Rules
To use this metadata type, your org must have either B2C - Loyalty, B2C - Loyalty Plus, Loyalty Management - Growth, or Loyalty Management - Advanced license enabled.
Fields
| Field Name | Description |
|---|---|
| label |
|
| programProcesses |
|
LoyaltyProgramProcess
Represents a collection of fields relating to a loyalty program process.
| Field Name | Description |
|---|---|
| description |
|
| executionType |
|
| journalSubType |
|
| journalType |
|
| loyaltyTierGroup |
|
| parameters |
|
| processName |
|
| processType |
|
| rules |
|
| status |
|
LoyaltyProgramProcessParameter
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 Name | Description |
|---|---|
| condition |
|
| dataType |
|
| decimalPlaces |
|
| description |
|
| isCollection |
|
| isInput |
|
| isOutput |
|
| objectName |
|
| parameterName |
|
| parameterType |
|
| value |
|
LoyaltyProgramProcessCondition
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 Name | Description |
|---|---|
| conditionCriteria |
|
| conditionFilterCriteria |
|
| conditionName |
|
LoyaltyProgramProcessConditionFilterCriteria
Represents 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 Name | Description |
|---|---|
| operator |
|
| sequence |
|
| sourceFieldName |
|
| value |
|
| valueType |
|
LoyaltyProgramProcessRule
Represents a collection of fields relating to a rule. A rule consists of a set of conditions and actions.
| Field Name | Description |
|---|---|
| actions |
|
| conditions |
|
| description |
|
| endDate |
|
| previousRule |
|
| promotion |
|
| ruleName |
|
| startDate |
|
| status |
|
| stepMappings |
|
LoyaltyProgramProcessAction
Represents a collection of fields relating to an action.
| Field Name | Description |
|---|---|
| actionName |
|
| actionParameters |
|
| actionType |
|
| crudActionType |
|
| decisionTable |
|
| decisionTableDatasetLink |
|
| entityApiName |
|
| flowDefinition |
|
| loyaltyProgramProcess |
|
LoyaltyProgramProcessActionParameter
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 Name | Description |
|---|---|
| operator |
|
| parameterName |
|
| sequenceNumber |
|
| value |
|
| valueType |
|
LoyaltyProgramProcessRuleStepMapping
Represents a collection of fields relating to a step mapping. Map conditions with child actions or map an action without a parent step.
| Field Name | Description |
|---|---|
| associatedStep |
|
| parentStep |
|
| sequence |
|
Declarative Metadata Sample Definition
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 <actions>
20 <actionName>Issue High Transaction Value Voucher</actionName>
21 <actionParameters>
22 <operator>Equals</operator>
23 <parameterName>VoucherDefinitionName</parameterName>
24 <sequenceNumber>1</sequenceNumber>
25 <value>Voucher for High Value Transactions</value>
26 <valueType>Literal</valueType>
27 </actionParameters>
28 <actionParameters>
29 <operator>Equals</operator>
30 <parameterName>VoucherCode</parameterName>
31 <sequenceNumber>2</sequenceNumber>
32 <value>{!TransactionJournal.Order.Id}</value>
33 </actionParameters>
34 <actionParameters>
35 <operator>Equals</operator>
36 <parameterName>VoucherEffectiveDate</parameterName>
37 <sequenceNumber>3</sequenceNumber>
38 <value>DATEVALUE("2021-11-21 00:00:00")</value>
39 </actionParameters>
40 <actionParameters>
41 <operator>Equals</operator>
42 <parameterName>VoucherExpirationDate</parameterName>
43 <sequenceNumber>4</sequenceNumber>
44 <value>DATEVALUE("2022-01-01 00:00:00")</value>
45 </actionParameters>
46 <actionParameters>
47 <operator>Equals</operator>
48 <parameterName>VoucherFaceValue</parameterName>
49 <sequenceNumber>5</sequenceNumber>
50 <value>{!VoucherValue}</value>
51 </actionParameters>
52 <actionType>IssueVoucher</actionType>
53 </actions>
54 <conditions>
55 <conditionCriteria>1</conditionCriteria>
56 <conditionFilterCriteria>
57 <operator>GreaterThanOrEquals</operator>
58 <sequence>1</sequence>
59 <sourceFieldName>TransactionJournal.TransactionAmount</sourceFieldName>
60 <value>100</value>
61 <valueType>Literal</valueType>
62 </conditionFilterCriteria>
63 <conditionName>New Condition</conditionName>
64 <conditionType>Condition</conditionType>
65 </conditions>
66 <endDate>2022-01-01</endDate>
67 <ruleName>Issue Voucher for Transactions Above $100</ruleName>
68 <startDate>2021-11-21</startDate>
69 <status>Draft</status>
70 <stepMappings>
71 <associatedStep>New Condition</associatedStep>
72 <sequence>1</sequence>
73 </stepMappings>
74 <stepMappings>
75 <associatedStep>Issue High Transaction Value Voucher</associatedStep>
76 <parentStep>New Condition</parentStep>
77 <sequence>1</sequence>
78 </stepMappings>
79 </rules>
80 <status>Draft</status>
81 </programProcesses>
82</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>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.