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.
MemberPointBalanceInput Class
Use this class to retrieve loyalty points balance for a given loyalty
program member. This class receives the input parameter values for the Get Member Points
action.
Namespace
Example
1public void pointsBalanceTest(){
2 //...Create a list with LoyaltyManagement.MemberPointsBalanceInput as a datatype
3 List<LoyaltyManagement.MemberPointBalanceInput> memberPointsBalanceList = new List<LoyaltyManagement.MemberPointBalanceInput>();
4
5 //...Create an instance of the list object and set the input values
6 memberPointsBalanceList.add(new LoyaltyManagement.MemberPointBalanceInputBuilder()
7 .setLoyaltyProgramMemberId('0lMRM0000002BD12AM')
8 .setProgramName('LP01')
9 .setProgramCurrencyName('Miles')
10 .build());
11
12 //...Pass the list that contains the input values to the LoyaltyResources.getPointsBalance() function.
13 //...Store the output returned by the function in the MemberPointsBalanceOutput object
14 List<LoyaltyManagement.MemberPointBalanceOutput> pointBalanceActionResults = LoyaltyManagement.LoyaltyResources.getPointsBalance(memberPointsBalanceList);
15 System.debug('Get Member Point Balance Successful Operation:'+ pointBalanceActionResults.get(0));
16 System.debug('Points balance : ' + pointBalanceActionResults.get(0).getPoints());
17}