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 for more information on the system attributes.
To use these system attributes in Xtremepush segments, journeys, and campaigns, you must:
Create a matching attribute in the Xtremepush CDP for the loyalty system attribute.
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.
In Xtremepush, go to Data > Data Manager and create a number tag named
levelwith Profile Attribute enabled.The
levelattribute then appears in the Loyalty Hub under Users > Attributes.In the Loyalty Hub, add an automation that updates
levelevery time the user's loyalty level changes:Go to Users > Attributes, select
level, click Manage, and then click Add Automation.Select Event-based trigger type, then select
level.currentunder Event. This triggers the automation every time the user's loyalty level changes.Enter
event.body.valueas the expression and click Submit. Thelevel.currentevent includes the level the user just reached, andevent.body.valuereads that value. This setslevelto the user's new level each time it changes.
Add a one-off automation to fill in
levelfor existing users.The automation from step 2 only runs when a user's level changes, so existing users have an empty
leveluntil 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.Go to Users > Attributes, select
level, click Manage, and then click Add Automation.Select Schedule-based and enter any cron expression.
A new schedule-based automation runs at the next full hour, whatever the cron expression says.
Under User Filters, add
levelempty 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.
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.

After the next full hour, wait for the automation to finish, and check under Users > All Users that no users have an empty
level.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.
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.
In the user filter, use a value that every user meets:
≥ 1works 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.