What are Rewards?
Rewards let you give users something when they hit a milestone, and let them choose when to claim it. A reward is awarded automatically when a user meets one of its triggers, for example unlocking an achievement or reaching a streak length. It is only fulfilled when it is redeemed, which you do by calling the redeem endpoint when the user claims it in your product. Awarding a reward never changes a user’s points balance on its own.Reward Types
There are two types of reward.Points Rewards
Points rewards grant a set number of points from a points system when they are redeemed. Points are granted at the reward’s points value at the time of redemption, and respect any boosts and the points system’s maximum. If the maximum would be exceeded part way through redeeming several awards, the awards that fit are redeemed and the rest stay unredeemed so they can be retried.Custom Rewards
Custom rewards do nothing inside Trophy when they are redeemed apart from sending thereward.redeemed webhook. Use them when you want to fulfill the reward yourself.
Rewards or Points Triggers?
Rewards and points triggers can both give users points when something happens, but they work differently.Use Cases
Claimable bonuses
Award users bonus points for hitting a milestone, but let them tap a ‘Claim’ button in your product to receive them. The claim moment is a natural place for a celebration screen or animation.Prizes and perks
Use custom rewards to hand out things that live outside Trophy, like a discount code, a free month or a physical prize. Trophy tells you when the reward is awarded and redeemed, and your system handles the rest.Creating Rewards
To create a reward, head to the rewards page and follow the steps below.1
Click New Reward
Give the reward a name and a unique key. The key is what you’ll use to reference the reward in APIs, and can’t be changed after the reward is created.
2
Choose a reward type
Choose between a points reward and a custom reward.
3
Configure the reward
For a points reward, choose the points system and the number of points to grant when the reward is redeemed. You can also add a description which is returned from APIs to be displayed in your application.
4
Set a redemption limit (Optional)
Limit how many times each user can be awarded the reward. See redemption limits.
5
Add user filters (Optional)
Restrict the reward to users with specific custom user attributes. See user filters.
6
Add triggers and activate
Add one or more triggers and then change the reward’s status to active to make it live.
Reward Triggers
Rewards are awarded through triggers. You can add as many triggers as you like to a reward, and each can be activated and deactivated independently.Triggers work independently of each other. Each active trigger can award the reward on its own, so a user does not need to meet all of a reward’s triggers. For example, a reward with a streak trigger and an achievement trigger is awarded when the user reaches the streak length, and again when they complete the achievement. Any redemption limit applies across all of a reward’s triggers combined.
Types of Triggers
Metric Triggers
The reward is awarded every time the user’s total for a metric grows by the threshold you set, for example “award every 10 tasks completed”. Counting starts from when the trigger was activated. Activating the trigger again, or changing its metric, threshold or event attributes, starts a new count.Streak Triggers
The reward is awarded every time the user’s current streak grows by the streak length you set, for example “award every 7 days”. The period the trigger was activated in counts as the first period, and changing the streak length starts a new count. A streak that ended before the trigger was activated, or broke after it, does not offset the count.Achievement Triggers
The reward is awarded once, when the user completes a specific achievement. Users who completed the achievement before the trigger existed are not awarded.Leaderboard Triggers
The reward is awarded to the user who finishes a leaderboard run at exactly the rank you set. For leaderboards with breakdown attributes, the user at that rank in each segment is awarded.Creating Triggers
To add a trigger, open the reward from the rewards page and follow the steps below.1
Click New Trigger
Choose a trigger type.
2
Set up the trigger
- For a Metric trigger, choose the metric and the threshold.
- For a Streak trigger, set the streak length.
- For an Achievement trigger, choose the achievement.
- For a Leaderboard trigger, choose the leaderboard and the rank.
3
Add attribute filters (Optional)
- To limit a Metric trigger to events with specific custom event attributes, add one or more filters in the Event Attributes section. When you set multiple event attribute filters, all of them must match.
- To limit any trigger to users with specific custom user attributes, add attributes and the desired values in the User Attributes section.
4
Click save, then activate
Once you’re happy the trigger will behave as expected, change its status to active to make it live.
When Rewards Are Not Awarded
Rewards are only awarded for things users do after a trigger is active. This means:- Existing achievement completions don’t award rewards. If a user completed an achievement before you added an achievement trigger, they aren’t awarded the reward.
- Backdated achievements don’t award rewards. When you activate or edit an achievement, or set a user’s
signUpDate, Trophy completes achievements for users who already qualify. These silent completions don’t award rewards. - Past progress doesn’t count. Metric and streak triggers count from when the trigger was activated, so progress users made before then isn’t awarded.
Redemption Limits
Set a redemption limit on a reward to cap how many times each user can be awarded it. Once a user reaches the limit they stop being awarded the reward.User Filters
Add user attribute filters to a reward, or to individual triggers, to control who can be awarded. A user must match the reward’s filters and the trigger’s filters to be awarded.Tracking a User’s Rewards
Rewards Awarded by an Event
When a metric event or an achievement completion awards a reward, the response includes it in therewards array. This is the same shape as the response from the user rewards endpoint. Replaying an event with the same idempotency key returns an empty array.
Use this to show a “You earned a reward” message the moment it happens.
Response
reward.awarded webhook or the user rewards endpoint to find them.
Listing a User’s Rewards
Use the user rewards endpoint to list the rewards a user has been awarded. Filter byredeemed to show only rewards waiting to be claimed, and by date range to page through history.
Response
Redeeming Rewards
When a user claims a reward in your product, call the redeem endpoint with the reward’s key and the user’s ID.redemptions. For points rewards, the response also includes the combined points granted and any leaderboards the user’s rank changed on.
Response
404if the user was never awarded the reward.409if every award has already been redeemed.
Webhooks
Trophy sends two webhooks for rewards:reward.awardedfires when a user is awarded a reward. Nothing has been applied yet.reward.redeemedfires when the reward is redeemed, once for each award. For custom rewards, this is your cue to fulfill the reward.
Webhook reward.awarded — request body
Webhook reward.redeemed — request body
Rewards and Points
Points granted by redeeming a reward behave like any other points:- They show up in the user’s points history and points summary.
- They update points leaderboards for that points system.
- They are not included in the
pointsreturned from metric events and achievement completions, since nothing is granted until redemption.
Rewards Analytics
Each reward in the Trophy dashboard has built-in analytics including:- Awards over time
- Redemptions over time
- Awards broken down by trigger type
- For points rewards, an estimate of the points awarded and the points actually redeemed (including boosts and the points maximum)