There are several ways to make a loyalty program an engaging experience for users. One way is to include personalized and frequently updated content, along with special promotions and attractive rewards. Another method can include gamification, which we will explore more deeply in this use case.
In Synerise, you can create gamification scenarios based on various user actions collected within the profile history like transactions, consents, form submissions, watching videos, rating products, and more. However, scenarios based on transaction events are the most popular. These scenarios involve completing quests that lead to rewards such as promotions, free products, extra loyalty points, or access to premium content.
In this use case, we will guide you through the process of building a renewable quest. This quest allows customers to earn 1000 loyalty points by purchasing 10 products from a specific category within a set timeframe.
Prerequisites
Implement transaction events using SDK or API. Make sure that you implement category parameter in the transaction events and quantity of products.
Integrate mechanism for awarding loyalty points. Find more in the Loyalty programs basics use case.
Security configuration
Before you start working with this module, if you are a Synerise customer or partner, consider reading the section about denylisting events. This natively accessible configuration will allow you to manage the restrictions in points management that may help you prevent fraud.
Process
In this use case, you will go through the following steps:
Create a document with all necessary data conected with this loyalty scenario
Create a quest.renewableComplete event
In this part of the process, create a quest.renewableComplete event, which will be later generated in the workflow when the customer completes the quest. In addition, this event must contain a parameter that contains the name of the completed quest to facilitate identification of the quest. In our case, we use the gameName parameter.
Go to Data Management > Events > Add event.
In the Name field, enter quest.renewableComplete.
In the API and SDK, the name parameter is usually called action or action name.
Optionally, define a human-friendly display name that will be shown in the Data Managament and Analytics modules.
Optionally, in the Description field, enter the description of the event.
Enable the Make this event available to anonymous profiles without JWT toggle.
Click Apply.
In the list of events, find the event you just created.
On the right side of the screen, click Add property.
In the Source parameter field, enter gameName.
In the Property name field, enter a human-readable label for display in the Synerise platform.
Optionally, in the Description field, you can add an explanation about the purpose of this parameter.
In Property type and Link fields, leave the default string and -.
To complete the process, click Save.
Create an aggregate that returns the timestamp of the last finished quest
In this step, we create an aggregate that provides the timestamp of the most recently completed quest. The timeframe for the quest begins on the day it starts and continues until the expected completion time.
Go to Analytics > Aggregates > Create aggregate.
As the aggregate type, select Profile.
Enter the name of the aggregate as [UC] Timestamp of last finished quest.
Click Analyze profiles by and select Last.
From the Choose event dropdown, select the questRenewableComplete event, that you created in the previous step.
As the event parameter, choose TIMESTAMP.
From the Choose parameter dropdown list, select the gameName parameter.
From the Choose operator dropdown list, select Equal.
Enter the name of the quest. In our case, it’s Towel's quest.
Set the period for the aggregate to Custom and specify the desired data range. In this scenario, we will select the following time range 02.06.2023 - 30.05.2024.
To save the aggregate, click Save.
Create an aggregate that returns the number of products purchased from the defined product category
In this part of the process, create an aggregate that will calculate the number of products that were purchased from the Paper_towels category after the last quest was completed.
Go to Analytics > Aggregates > Create aggregate.
As the aggregate type, select Profile.
Enter the name of the aggregate as [UC]Number of products purchased after last finished quest.
Click Analyze profiles by and select Sum.
From the Choose event dropdown, select the product.buy event.
As the event parameter, choose $quantity.
Click the + where button and from the Choose parameter dropdown menu, choose category parameter.
From the Choose operator dropdown menu, select Equal.
Type the name of the product category - Paper_towels.
Click the + where button and from the Choose parameter dropdown menu, choose TIMESTAMP parameter.
From the Choose operator dropdown menu, select More than number operator.
Click the (Choose value icon).
From the Choose value dropdown list, select the aggregate you created earlier in the process.
Set the period for the aggregate to Lifetime.
Save the aggregate.
Create an expression with the number of products required to complete the quest
In this step, create an expression that determines the number of products needed to complete the quest. Based on the assumptions of this use case, the assumed requirement for purchase is 10 units.
Go to Analytics > Expressions > New expression.
Enter the name of the expression as [UC]Target amount.
Leave the Expression option at default (Attribute).
Click the Select button.
Choose # Constant.
Open the settings of Constant value by clicking 0.
In the field below, type 10
Click Save.
Did this article answer your question?
😕
We are sorry to hear that
Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.
😉
Awesome!
Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.