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.

TransferMemberPointsToGroupsInput Class

Use this class to transfer points from an individual member or a corporate member to the member's associated group. This class receives the input parameter values for the Transfer Member Points To Groups action.

Namespace

LoyaltyManagement

Example

1public static void transferPointsToGroupsTest(){
2
3   //Create a list with LoyaltyManagement.TransferMemberPointsToGroupsInput as a datatype
4   List<LoyaltyManagement.TransferMemberPointsToGroupsInput> transferPointsList = 
5      new List<LoyaltyManagement.TransferMemberPointsToGroupsInput>();
6
7   //Create an instance of transferPointsList to set the transaction journal ID as input
8   transferPointsList.add(new LoyaltyManagement.TransferMemberPointsToGroupsInputBuilder()
9      .setJournalId('0lVT10000008CnlMAE')
10      .build());
11
12   //Pass the list to the LoyaltyResources.transferMemberPointsToGroups() interface.
13   //Store the output returned by the interface in an instance of the 'LoyaltyActionResult' object
14   List<LoyaltyManagement.LoyaltyActionResult> transferResults = 
15      LoyaltyManagement.LoyaltyResources.transferMemberPointsToGroups(transferPointsList);
16
17   //Return the status of the Apex call
18   System.debug('Transfer points to groups is successful:'+ transferResults.get(0).isSuccess());
19}