Debit Points

Debit loyalty points from a specified loyalty program member’s balance. You can debit loyalty points to redeem for a service or upgrade the member to a higher tier.

This action updates the point balance in the LoyaltyProgramMemberCurrency table in your Salesforce org.

Note

This action is available in API version 51.0 and later for users with Loyalty Management license.

Supported REST HTTP Methods 

URI: /services/data/vXX.X/actions/standard/debitPoints

Formats: JSON, XML

HTTP Methods: POST

Authentication: Authorization: Bearer token

Inputs 

InputTypeDescription
AdditionalNotesStringAdditional information about the transactions performed by the loyalty program members.
CorrelationIdIDID of any Salesforce entity.
FlowIdIDID of the flow associated with the debit points action.
JournalIdIDRequired. ID of the transaction journal.
LoyaltyProgramMemberIdIDRequired. ID of the loyalty program member to whom the points must be deducted.
PointsFloatRequired. The points available for the loyalty program member.
ProgramCurrencyNamestringRequired. The name of the loyalty program currency.
ProgramNamestringRequired. The name of the loyalty program.
LoyaltyProgramCurrencySubtypeNamestringRequired when ProgramCurrencyName uses the Activity with Mixed Subcurrencies expiration mode. The name of the loyalty program currency subtype that is used to debit points from the member.

Outputs 

OutputTypeDescription
JournalIdIDID of the transaction journal.
LoyaltyProgramMemberIdstringID of the loyalty program member.
PointsBalanceIntegerThe total points available for the loyalty program member.
ProgramCurrencyNamestringThe name of the program currency.
ProgramNamestringThe name of the loyalty program.

Example 

Sample Request

1{
2   "inputs":[{
3      "LoyaltyProgramMemberId": "0lMxx0000A000001EAA",
4      "ProgramCurrencyName": "Avios",
5      "ProgramName": "baLoyaltyProgram",
6      "Points": 500.0,
7      "CorrelationId": "0lcxx00004000002AAA",
8      "JournalId": "0lcxx00204000001AAA",
9      "AdditionalNotes": "Any additional Information"
10   }]
11}

Sample Response

1[ {
2  "actionName" : "debitPoints",
3  "errors" : null,
4  "isSuccess" : true,
5  "outputValues" : {
6    "JournalId" : "0lcxx00204000001AAA",
7    "PointsBalance" : 130.0,
8    "ProgramCurrencyName" : "exclusive points",
9    "LoyaltyProgramMemberId" : "0lMxx0000A000001EAA",
10    "ProgramName" : "sample program"
11  }
12} ]