Merge Memberships Action

Merges two active loyalty program member records that belong to the same loyalty program. Out of the two memberships, one is source membership and the other is the target membership. After the merge is complete, the status of the source membership is changed to Merged and the status of the target membership remains active.

By default, all the transaction journals and points of the source member are transferred to the target member after the merge. Optionally, you can:

  • Transfer all the vouchers of source member to the target member.
  • Assign the higher current tier between the source and target members to the target member.

For more information about how the mergeLoyaltyProgramMembership action merges loyalty program memberships, see Merge Memberships in Salesforce Help.

This action is available in API version 56.0 and later for users in orgs where Loyalty Management is enabled.

Supported REST HTTP Methods 

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

Formats: JSON, XML

HTTP Methods: POST

Authentication: Authorization: Bearer token

Inputs 

InputTypeDescription
reasonForMergingMembershipsStringRequired. The reason why the source loyalty program member is to be merged with the target loyalty program member.
shouldSetHigherCurrentTierForTargetMemberBooleanIndicates whether the tier for the target record is set to the source record’s tier when the source tier is higher than the target record’s current tier across all groups (true) or not (false). The default value is false.
shouldTransferVouchersBooleanIndicates whether all vouchers that belong to the source loyalty program member must be transferred to the target loyalty program member (true) or not (false). The default value is false.
sourceLoyaltyProgramMemberIdIDRequired. The ID of the loyalty program member record to be merged with the target loyalty program member record. The status of the source loyalty program member record is set to Merged after the merge is complete.
targetLoyaltyProgramMemberIdIDRequired. The ID of the loyalty program member record to remain active for the member after the merge is complete. The qualifying and non-qualifying points accrued by the source member are added to the respective points balances of the target member record.

Outputs 

OutputTypeDescription
errorsList<String>A list of error messages if the operation fails.
isSuccessBooleanIndicates whether the operation is successful or not.

Examples 

Sample Request

1{
2   "inputs": [ {
3      "reasonForMergingMemberships": "Test Merge",
4      "shouldSetHigherCurrentTierForTargetMember": true,
5      "shouldTransferVouchers": true,
6      "sourceLoyaltyProgramMemberId":"0lMT100000001JnMAK",
7      "targetLoyaltyProgramMemberId":"0lMT100000001JnMAI"
8   } ]
9}

Sample Response

1[ {
2  "actionName" : "mergeLoyaltyProgramMembership",
3  "errors" : null,
4  "isSuccess" : true
5} ]

See Also