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.

MemberTierInput Class

Use this class to retrieve the current tier for a specified loyalty program member. This class receives the input parameter values for the Get Member Tier action.

Namespace

LoyaltyManagement

Example

1public void getTierTest(){
2   //...Create a list with LoyaltyManagement.MemberTierInput as a datatype
3   List<LoyaltyManagement.MemberTierInput> memberTiersList = new List<LoyaltyManagement.MemberTierInput>();
4
5   //...Create an instance of the list object and set the input values 
6   memberTiersList.add(new LoyaltyManagement.MemberTierInputBuilder().setLoyaltyProgramMemberId('0lMRM0000002BD12AM')
7      .setProgramName('LP01')
8      .setTierGroupName('TG1')
9      .build());
10
11   //...Pass the list that contains the input values to the LoyaltyResources.getTier() function.
12   //...Store the output returned by the function in the MemberTierOutput object
13   List<LoyaltyManagement.MemberTierOutput> memberTierActionResults = LoyaltyManagement.LoyaltyResources.getTier(memberTiersList);
14   System.debug('Get Member Tier Successful Operation:'+ memberTierActionResults.get(0));
15   System.debug('Member Tier : '+ memberTierActionResults.get(0).getMemberTier());
16}