LoyaltyResources Class

A class that executes a loyalty action and returns a result. Takes the input classes as input and returns the objects of output classes.

Namespace 

LoyaltyManagement

LoyaltyResources Methods 

The following are methods for LoyaltyResources.

Methods in the LoyaltyResources class support processing up to 200 records per invocation. This class predates the Invocable.Action Apex wrapper, which supports up to 2000 records per invocation and is the recommended approach for invoking loyalty actions.

Note

changeTier(changeTierList) 

Use this method to change the tier for a loyalty program member.

Signature 

public static List<LoyaltyManagement.ChangeTierOutput> changeTier(List<LoyaltyManagement.ChangeTierInput> changeTierList)

Parameters 

changeTierList

Type: List<LoyaltyManagement.ChangeTierInput>

Set of inputs to change the tier for a loyalty program member.

Return Value 

Type: List<LoyaltyManagement.ChangeTierOutput>

creditPoints(creditPointsList) 

Use this method to credit loyalty points to a loyalty program member’s balance.

Signature 

public static List<LoyaltyManagement.CreditPointsOutput> creditPoints(List<LoyaltyManagement.PointsInput> creditPointsList)

Parameters 

creditPointsList

Type: List<LoyaltyManagement.PointsInput>

Set of inputs to credit points to a loyalty program member’s balance.

Return Value 

Type: List<LoyaltyManagement.CreditPointsOutput>

debitPoints(debitPointsList) 

Use this method to debit loyalty points from a loyalty program member’s balance.

Signature 

public static List<LoyaltyManagement.DebitPointsOutput> debitPoints(List<LoyaltyManagement.PointsInput> debitPointsList)

Parameters 

debitPointsList

Type: List<LoyaltyManagement.PointsInputt>

Set of inputs to debit points from a loyalty program member’s balance.

Return Value 

Type: List<LoyaltyManagement.DebitPointsOutput>

getLoyaltyPromotionBasedOnSalesforceCDP(loyaltyPromotionInputList) 

Use this method to retrieve promotions that are eligible for a member based on the member’s market segment.

Signature 

public static List<LoyaltyManagement.CdpBasedLoyaltyPromotionOutput> getLoyaltyPromotionBasedOnSalesforceCDP(List<LoyaltyManagement.CdpBasedLoyaltyPromotionInput> loyaltyPromotionInputList)

Parameters 

loyaltyPromotionInputList

Type: List<LoyaltyManagement.CdpBasedLoyaltyPromotionInput>

Set of inputs to retrieve promotions for a member based on the member’s market segment.

Return Value 

Type: List<LoyaltyManagement.CdpBasedLoyaltyPromotionOutput>

getLoyaltyPromotions(loyaltyPromotionInputList) 

Use this method to retrieve active promotions that are eligible for a transaction journal. The action can process accrual or redemption transactions.

Signature 

public static List<LoyaltyManagement.LoyaltyPromotionOutput> getLoyaltyPromotions(List<LoyaltyManagement.LoyaltyPromotionInput> loyaltyPromotionInputList)

Parameters 

loyaltyPromotionInputList

Type: List<LoyaltyManagement.LoyaltyPromotionInput>

Set of inputs to retrieve active promotions for a transaction journal.

Return Value 

Type: List<LoyaltyManagement.LoyaltyPromotionOutput>

getPointsBalance(memberPointBalanceList) 

Use this method to retrieve the loyalty points balance for a loyalty program member.

Signature 

public static List<LoyaltyManagement.MemberPointBalanceOutput> getPointsBalance(List<LoyaltyManagement.MemberPointBalanceInput> memberPointBalanceList)

Parameters 

memberPointBalanceList

Type: List<LoyaltyManagement.MemberPointBalanceInput>

Set of inputs to get the loyalty points balance for a loyalty program member’s balance.

Return Value 

Type: List<LoyaltyManagement.MemberPointBalanceOutput>

getTier(memberTierList) 

Use this method to retrieve the current tier for a loyalty program member.

Signature 

public static List<LoyaltyManagement.MemberTierOutput> getTier(List<LoyaltyManagement.MemberTierInput> memberTierList)

Parameters 

memberTierList

Type: List<loyalty_management.MemberTierInput>

Set of inputs to retrieve the current tier for a given loyalty program member.

Return Value 

Type: List<loyalty_management.MemberTierOutput>

issueVoucher(issueVoucherList) 

Use this method to issue a voucher for a loyalty program member.

Signature 

public static List<LoyaltyManagement.IssueVoucherOutput> issueVoucher(List<LoyaltyManagement.IssueVoucherInput> issueVoucherList)

Parameters 

issueVoucherList

Type: List<loyalty_management.IssueVoucherInput>

Set of inputs to issue a voucher.

Return Value 

Type: List<loyalty_management.IssueVoucherOutput>

transferMemberPointsToGroups(transferMemberPointsToGroupsList) 

Use this method to transfer points from an individual member or a corporate member to the member’s associated group.

Signature 

public static List<LoyaltyManagement.LoyaltyActionResult> transferMemberPointsToGroups(List<LoyaltyManagement.TransferMemberPointsToGroupsInput> transferMemberPointsToGroupsList)

Parameters 

transferMemberPointsToGroupsList

Type: List<loyalty_management.TransferMemberPointsToGroupsInput>

Set of inputs to transfer points from an individual member or a corporate member.

Return Value 

Type: List<loyalty_management.LoyaltyActionResult>

updateProgressForCumulativePromotionUsage(updateCumulativeUsageCompletedInputList) 

Use this method to update the progress made by a loyalty program member towards attaining a Cumulative type promotion.

Signature 

public static List<LoyaltyManagement.UpdateCumulativeUsageCompletedOutput> updateProgressForCumulativePromotionUsage(List<LoyaltyManagement.UpdateCumulativeUsageCompletedInput> updateCumulativeUsageCompletedInputList)

Parameters 

updateCumulativeUsageCompletedInputList

Type: List<LoyaltyManagement.UpdateCumulativeUsageCompletedInput>

Set of inputs to update the progress for a Cumulative type promotion.

Return Value 

Type: List<LoyaltyManagement.UpdateCumulativeUsageCompletedOutput>