Lookup peer member
Lookup Peer MemberΒΆ
Description
Loads a peer member into the engine execution context using LoyaltyID or MemberID. Sets Context.peer for use by subsequent actions.
What is a Peer Member?
A peer member is another member within the same loyalty program who can be identified and loaded during an activity transaction to perform point operations on their account.
When processing an activity for one member, you can look up a peer member using their Loyalty ID or Member ID, and then add or redeem points on the peer member's account.
Parameters
| Parameter | Type | Description |
|---|---|---|
| Value | String | Member ID or Loyalty ID of the peer to look up |
JavaScript API
Outputs
The action populates Context.peer with the peer member object returned from the member lookup service.
Events Triggered
No events are generated by this action.
Possible Errors
| Error Code | Error Message | Description |
|---|---|---|
| 4002 | No member found with memberId "%s" in program "%s" | The provided ObjectId doesn't resolve to a member in the current program. |
| 4002 | No member found with loyaltyID "%s" in program "%s" | The provided loyalty ID doesn't resolve to a member in the current program. |
| 2145 | The target member must not be same as the source member | The provided value resolves to the context member. |
Additional Considerations
- The peer is only stored on
Context.peer; it doesn't affect the primary activity or member objects. - Loading the peer alone does not persist any changes to it. A subsequent peer action (such as Add Points To Peer or Redeem Points From Peer) is required to write changes back.
- This action is typically followed by Add Points To Peer or Redeem Points From Peer.