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.
ChangeTierInput Class
Use this class to change the tier for a given loyalty program
member. This class receives the input parameter values for the Change Tier
action.
Namespace
Example
1public void changeTierTest(){
2 //...Create a list with LoyaltyManagement.ChangeTierInput as a datatype
3 List<LoyaltyManagement.ChangeTierInput> changeTierList = new List<LoyaltyManagement.ChangeTierInput>();
4
5 //...Create an instance of the list object and set the input values
6 changeTierList.add(new LoyaltyManagement.ChangeTierInputBuilder()
7 .setLoyaltyProgramMemberId('0lcxx00006000001AAA')
8 .setProgramName('baProgram')
9 .setTierGroupName('QualifyingGroup')
10 .setTargetTierName('Gold')
11 .setChangeReason('Reason for change.')
12 .build());
13
14 //...Pass the list that contains the input values to the LoyaltyResources.changeTier() function.
15 //...Store the output returned by the function in the ChangeTierOutput object
16 List<LoyaltyManagement.ChangeTierOutput> changeTierActionResults = LoyaltyManagement.LoyaltyResources.changeTier(changeTierList);
17 System.debug('Change Tier Successful Operation:'+ changeTierActionResults.get(0).isSuccess());
18}