--- title: "Dynamic Rewards" slug: "dynamic-rewards" updated: 2026-06-10T15:17:28Z published: 2026-06-10T15:17:28Z canonical: "docs.xtremepush.com/dynamic-rewards" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.xtremepush.com/llms.txt > Use this file to discover all available pages before exploring further. # Dynamic Rewards 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: 1. Select the dynamic icon next to the reward 2. Select the user attribute that will be used to calculate the dynamic reward amount. 3. 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: ![](https://cdn.document360.io/b056e88b-f6c1-4bd2-b5b8-08e9336a17c9/Images/Documentation/7d3c739e23e9a1e2d1f41b27ba1ecea998bd5893faa601747deff9b513217c8e-Screenshot_2026-03-24_at_11.20.15(1).png?sv=2026-02-06&spr=https&st=2026-10-28T06%3A45%3A39Z&se=2026-10-28T07%3A45%3A39Z&sr=c&sp=r&sig=T1%2F%2FY8ckhTuSjzLXc6WzYtXXmMq6GErQM7caigx5xQs%3D) - **Raw Expression**: Use `math.js` to 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)` ![](https://cdn.document360.io/b056e88b-f6c1-4bd2-b5b8-08e9336a17c9/Images/Documentation/70eb0958e9c15fa537485dc7d96d9de428929a08b85deb202f1acf58c1f25b93-47(1).png?sv=2026-02-06&spr=https&st=2026-10-28T06%3A45%3A39Z&se=2026-10-28T07%3A45%3A39Z&sr=c&sp=r&sig=T1%2F%2FY8ckhTuSjzLXc6WzYtXXmMq6GErQM7caigx5xQs%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* ![](https://cdn.document360.io/b056e88b-f6c1-4bd2-b5b8-08e9336a17c9/Images/Documentation/77a92d59b600cc72b1438123d465f34227c3c8b2c571c5563254b68cec059a1a-48(1).png?sv=2026-02-06&spr=https&st=2026-10-28T06%3A45%3A39Z&se=2026-10-28T07%3A45%3A39Z&sr=c&sp=r&sig=T1%2F%2FY8ckhTuSjzLXc6WzYtXXmMq6GErQM7caigx5xQs%3D) - **Expression**: `config[userAttributes["attribute.tier"]]`**Config**: `{"bronze": 1, "silver": 2, "gold": 3} ` > [!TIP] > If you require assistance creating complex custom logic, reach out to the Xtremepush Onboarding team.