The Data Operation block in Journeys allows for the dynamic assignment of loyalty points based on accumulated wager values or other scenarios. This enables automated loyalty point allocation to a customers account without requiring manual intervention or external systems.
This approach uses one journey with a real-time trigger and a data operation to assign loyatly points dynamically.
Setup:
-
Trigger: A real-time trigger set to fire on journey accumulated wagers greater than 0 with unlimited participation. (Mechanics: every wager triggers the journey and if enough wagers have been accumulated since the start of the journey, loyalty points are granted).
-
Data Operation Block: Assigns a 10 points for every 100 units of accumulated wager value to a numeric-based custom attribute (LoyaltyPoints), based on the accumulated wager value event using the following expression:
Expression: Floor(@EventValue / 100) * 10
⚠️ Floor(x) is a math function that rounds a number down to the nearest whole integer. Note that the keyword Floor is case sensitive.
‼️ Since loyalty points are calculated based on the total accumulated wagers within a journey, the process includes all wagers placed since the journey’s inception. To ensure accuracy, use the 'Replace' option in the data operation to update the existing loyalty points value with the latest calculation.
-
Outcome: 10 points assigned per 100 wager units. Example:
Accumulated Wager | Points |
---|---|
99 | 0 |
100 | 10 |
199 | 10 |
275 | 20 |
380 | 30 |
To keep customers informed and engaged, consider running a weekly campaign or automated journey that targets users with a positive loyalty point balance, showcasing their accumulated points directly in the email content.
To calculate loyalty points from the beginning of a customer’s lifetime rather than from the start of a specific journey, use On Lifetime triggers instead of On Journey Accumulated. On Lifetime events reflect a customer’s total values for each event type. Based on the loyalty point setup described above, using On Lifetime ensures all wagers placed since the account was opened are included, allowing loyalty points to be awarded on a pro rata basis.
✅ Suggested read: Applying Mathematical Calculations with Data Operation Blocks