Skip to main content

Gift activity

The gift activity allows one user to give some of their points to another user or give them one of the gift rewards defined in the platform. This can be used as a form of accolade where users can recognise each other's efforts and contributions. Each gift can have a reason associated to it which will let the receiving user know why they received the gift.

When the source user gifts the target user with points, the following changes will take place:

  • Source user: the source user will have their point balance decreased by the number of points associated to the gift
  • Target user: the target user will have their point balance and total increased by the number of points associated to the gift
note
  • The gifted activity requires that the points being used be giftable
  • The gifted activity requires that the reward being used is of the gift type

Example

Here's an example of a gift activity data that sends points to another user:

JSON

In this example:

  • The source user is identified by the email 'john@doe.com'
  • The target user is identified by the email 'friend@doe.com'
  • The reason field provides context for why the gift is being sent
  • The points array specifies which point type(s) to transfer and how many
  • Optionally, a rewardId can be specified to send a gift reward as well