--- title: "Sync loyalty attributes to Xtremepush" slug: "sync-attributes" updated: 2026-11-17T14:53:15Z published: 2026-11-17T14:53:15Z canonical: "docs.xtremepush.com/sync-attributes" --- > ## 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. # Sync loyalty attributes to Xtremepush Every profile attribute you create in Xtremepush also appears in the Loyalty Hub as a user attribute with the same name. When the Loyalty Hub itself changes the value of that attribute, for example through an automation, it writes the new value to the user's Xtremepush profile. You do not need to configure anything else for this to happen. Loyalty system attributes, such as a user's current level, token balance, or number of completed quests, do not sync to Xtremepush by themselves. See [Manage Loyalty Attributes](/documentation/docs/manage-loyalty-attributes) for more information on the system attributes. To use these system attributes in Xtremepush segments, journeys, and campaigns, you must: 1. Create a matching attribute in the Xtremepush CDP for the loyalty system attribute. 2. Add an attribute automation in the Loyalty Hub that sets the new Xtremepush CDP attribute to the same value as the loyalty system attribute, and updates it whenever the system attribute changes. ## Steps to sync a system attribute This example shows how to sync a user's loyalty level. The steps sync the `level.current` system attribute, which represents the user's current loyalty level, to a new `level` attribute in Xtremepush. You can use the same steps for other system attributes. 1. In Xtremepush, go to **Data** > **Data Manager** and create a number tag named `level` with **Profile Attribute** enabled. The `level` attribute then appears in the Loyalty Hub under **Users** > **Attributes**. 2. In the Loyalty Hub, add an automation that updates `level` every time the user's loyalty level changes: 1. Go to **Users** > **Attributes**, select `level`, click **Manage**, and then click **Add Automation**. 2. Select **Event-based** trigger type, then select `level.current` under **Event**. This triggers the automation every time the user's loyalty level changes. 3. Enter `event.body.value` as the expression and click **Submit**. The `level.current` event includes the level the user just reached, and `event.body.value` reads that value. This sets `level` to the user's new level each time it changes. ![](https://cdn.document360.io/b056e88b-f6c1-4bd2-b5b8-08e9336a17c9/Images/Documentation/step4-modifier-expression.png?sv=2026-02-06&spr=https&st=2026-12-01T19%3A24%3A47Z&se=2026-12-01T20%3A24%3A47Z&sr=b&sp=r&sig=B0uwZ9F1iL2uVpsiaSrSnfdBulW4ubttN5jtlyP77uE%3D) 3. Add a one-off automation to fill in `level` for existing users. The automation from step 2 only runs when a user's level changes, so existing users have an empty `level` until their level next changes. Until then, you cannot target them by level in Xtremepush. To fill in their current level, create a one-off schedule-based automation that runs once for all matching users. 1. Go to **Users** > **Attributes**, select `level`, click **Manage**, and then click **Add Automation**. 2. Select **Schedule-based** and enter any cron expression. A new schedule-based automation runs at the next full hour, whatever the cron expression says. 3. Under **User Filters**, add `level` **empty** and the system **Level** ≥ `1`. The first filter limits the automation to users who do not have a synced level yet. The second filter makes sure the automation reads each user's actual level instead of the starting level. 4. Enter `userAttributes["level.current"]` as the expression and click **Submit**. A scheduled automation has no triggering event, so this expression reads each user's current level directly from their attributes. ![](https://cdn.document360.io/b056e88b-f6c1-4bd2-b5b8-08e9336a17c9/Images/Documentation/step5-backfill-schedule-automation.png?sv=2026-02-06&spr=https&st=2026-12-01T19%3A24%3A47Z&se=2026-12-01T20%3A24%3A47Z&sr=b&sp=r&sig=a%2FEXb%2Bj%2FzVKrwkuGsgXa1eop0PQBv8O1Uk9VxHBwsIE%3D) 5. After the next full hour, wait for the automation to finish, and check under **Users** > **All Users** that no users have an empty `level`. 6. Delete the one-off automation you added in step 3. You only need it once, to catch up existing users. The automation from step 2 keeps future changes in sync. 7. Check that the value has reached Xtremepush. Go to **Data** > **Users** > **Profiles**, open the profile of a user whose loyalty level you know, and go to the **Data** tab. Under **Attributes**, *level* should show the same number as the user's level in the Loyalty Hub. To sync another system attribute, repeat these steps with that attribute in place of `level.current` in the event, the user filter, and the one-off expression. For example, to sync a user's token balance, create a `token_balance` attribute and use `balance.token`. To sync the number of completed quests, create a `quests_completed` attribute and use `quest.completionsTotal`. > [!TIP] > In the user filter, use a value that every user meets: `≥ 1` works for level, because every user starts at level 1. For other attributes like token balance and completed quests, use `≥ 0`, because a user can have 0 of either.