Create dynamic rewards that differ based on user attribute values
Dynamic rewards allow you the reward different reward amount based on user's attribute value. For example, a user is given a dynamic token reward for completing a weekly deposit quest. The dynamic reward could be 5% of the total_deposit attribute.
To configure a dynamic reward:
Select the dynamic icon next to the reward
Select the user attribute that will be used to calculate the dynamic reward amount.
Specify the Reward Condition:
Percentage: This makes the reward a percentage of the user attribute. Using the deposit example, if you enter 5, the reward is 5% of the _total_deposit _attribute.
Percentage by Level: This option lets you give a different percentage reward for each level. This ensures that users on different levels receive different reward amounts. For example, Level 1 Segment gets 5% of the total_deposit whereas Level 2 gets 10% as shown below:
.png?sv=2026-02-06&spr=https&st=2026-07-08T17%3A14%3A20Z&se=2026-07-08T17%3A25%3A20Z&sr=c&sp=r&sig=%2BQytBDmic073B2JQ6KUD8DuqTKOV2CtuigdZwafoEnE%3D)
Raw Expression: Use
math.jsto create custom logic for reward distribution. Some examples include:If you want to award one perk for every 1,000 units deposited, enter the following expression as shown in the image below:
floor(event.body.origin.body.amount / 1000).png?sv=2026-02-06&spr=https&st=2026-07-08T17%3A14%3A20Z&se=2026-07-08T17%3A25%3A20Z&sr=c&sp=r&sig=%2BQytBDmic073B2JQ6KUD8DuqTKOV2CtuigdZwafoEnE%3D)
You can assign a different number of quests based on the value of a user attribute. For example, if a user has a tier attribute set to gold, they could be assigned more quests than a user set to bronze
Expression:
config[userAttributes["attribute.tier"]]Config:{"bronze": 1, "silver": 2, "gold": 3}
.png?sv=2026-02-06&spr=https&st=2026-07-08T17%3A14%3A20Z&se=2026-07-08T17%3A25%3A20Z&sr=c&sp=r&sig=%2BQytBDmic073B2JQ6KUD8DuqTKOV2CtuigdZwafoEnE%3D)
If you require assistance creating complex custom logic, reach out to the Xtremepush Onboarding team.