Loyalty programs basics
There are a lot of ways to encourage existing customers to continue being returning customers, but one of the best and most effective ways to do this is via creating a customer loyalty program. Its most important advantages are increasing Customer Lifetime Value, boosting loyalty, and avoiding churn.
Examples of activities that can be taken into account in the loyalty program are:
- Product page view,
- Product category page view,
- Adding a product to the basket,
- Product purchase,
- Purchase above a certain price,
- Purchase a product from a specific category,
- Newsletter subscription,
- After-sales survey submission,
- Events from ticketing system (customer care),
- Events connected with the external partnerships.
Without any coding, based on Synerise possibilities we can manage to develop rules for calculating points for such activities.
In this use case, we will present a basic schema for building loyalty program, which is the necessary first step you have to make in the beginning if you wish to calculate points for purchased products. We will describe the basic rules, based on which:
- we granted customers with 1 point for every 1 PLN spent,
- we count the points separately for every product in one transaction,
- we multiply the number of points by number of products bought, if the customer has bought more than one item of specific product,
- we round down the number of points (for example, for spending 80,60 PLN, the customer gets 80 points),
- we count the point balance for every customer.
Those rules are the fundamental elements which might be treated as the basic loyalty program as a whole. We use basic conditions, awarding 1 point for every 1 PLN spent, but you can adjust those settings to your business needs. It is worth mentioning that, based on these elements, you can add more rules, exclusions, and requirements, to make your program more complex. For example, you can multiply the number of points awarded for specific products or product categories or opt out of awarding points for them at all. In this use case, we focus on the mechanism of earning points, but Synerise also provides functionalities for spending points.

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.
Prerequisites
account.status
with parameter accountStatus
equal to active
). Such an event with the appropriate status should be sent each time the membership status changes (when the customer joins, resigns, or re-joins).Process
The process of creating the basic loyalty program described in this use case is divided into two main stages:
- Prepare the points schema -
this part of the process consists of the following:
- Create an expression which multiplies the price by the number of products bought (this used only for counting loyalty points, not in the transaction data).
- Create an aggregate which counts the amount of money spent on every product within a transaction.
- Create an expression which calculate how many points a transaction is worth and rounds them down.
- Contact Synerise support to implement the
points.loyalty
event which saves the result of the point calculation as an event in a customer’s profile. A parameter in the event is then used for creating an aggregate.
- Count the points balance -
this part of the process consists of the following procedures:
- Create an aggregate which counts the number of points gained by customer.
- Create an expression which returns the value of the aggregate with the number of points.
Prepare the points schema
In this part of the process, you will create the basic schema of counting points in a loyalty program, in which you grant customer with 1 point for every 1 PLN spent. This includes rounding points down when the amount includes hundredths. For example, for 80,60 PLN the customer gets 80 points.
Create an expression which multiplies price by the number of products bought
In this part, you create an expression which multiplies the price by the number of products bought. Based on this expression, if a customer buys more than one product of a specific kind, the number of points gained will multiply.
- Go to
Analytics > Expressions > New expression.
- Enter the name of the expression.
- Click the Expressions for option and select Event.
- From the dropdown list, choose the product.buy event.
- In the formula of the expression:
- Click Select.
- From the dropdown list, select Event attribute.
- Click Unnamed to display the settings.
- From the Choose parameter dropdown list, select $quantity.
- Click the + button.
- From the dropdown list, select Event attribute.
- Click Unnamed to display the settings.
- From the Choose parameter dropdown list, select $finalUnitPrice.
- Change the mathematical operator between these two parameters to multiplication.
- Click Save.

Create an aggregate counting money spent on every product within transaction
In this step, you create an aggregate which sums the amount of money spent on all products within the one transaction.
-
Go to
Analytics > Aggregates > New aggregate.
-
Enter the name of the aggregate.
-
As the type of the aggregate, select Sum.
-
From the Choose event dropdown list, select the
product.buy
event. -
As the event parameter, select the expression created in the previous step.
-
Click the + where and as the parameter select the
$orderId
.Note: ID of the transaction is necessary for Synerise Team to be able to charge points after every transaction separately. -
As the operator select Equal.
-
Click the icon next to the Equal operator two times, to find dynamic key icon
.
-
In the first box add
orderId
and in the second add any value (in our case it might be1
). -
Define the period from which the aggregate will return products from the event as Lifetime.
-
Click Save.

Create an expression which adds points for money spent
In this part, you create an expression which adds 1 point for every 1 PLN spent and additionally rounds down to full units (for example, for spending 80,60 PLN, the customer gets 80 points).
- Go to
Analytics > Expressions > New expression.
- Enter the name of the expression.
- As a type of expression, select Attribute.
- Click the Select button and select Function.
- From the dropdown list, select Floor.
This function rounds down the results of expressions (for example 4.99 will be rounded down to 4). - Click the Select button.
- From the dropdown list, select Profile.
- Click Unnamed to display the settings.
- Click the Choose attribute button and select the aggregate created in the previous step.
- Click + button and select Constant.
- As the value of the Constant, add
1
This way, you define that for every 1 PLN spent, the customer will get 1 point. - Change the mathematical operator between these two parameters to multiplication.
- Click Save.

Contact Synerise to enable loyalty points
Once you prepare all the above analytics, contact the Synerise Support Team to configure the materialization of loyalty points. You need to send links or IDs of those analytics and let our Support Team launch your loyalty program. After such configuration, every time loyalty points are assigned to a customer, the points.loyalty
event will be generated in a customer’s profile with information about the number of loyalty points they received after a transaction (the points
parameter).
Count the points balance
In this part of the process, you will create analytics which counts the points balance for each customer. It is important to have that information in one place so it can be used in further communication with customers.
Create an aggregate counting the number of points
In this step, you create an aggregate which counts the number of points in a loyalty program.
- Go to
Analytics > Aggregates > New aggregate.
- Enter the name of the aggregate.
- As the type of the aggregate, select Sum.
- From the Choose event dropdown list, select the points.loyalty event.
- As the event parameter, select points.
- Define the date filter as Lifetime.
- Click Save.

Create an expression which returns the number of points gained by customer
In this part, you create an expression which counts the number of points for a specific customer.
- Go to
Analytics > Expressions > New expression.
- Enter the name of the expression.
- As a type of expression, select Attribute.
- Click the Select button and select Profile.
- Click Unnamed to display the settings.
- Click the Choose attribute button and select the aggregate created earlier.
- Click Save.

What’s next
You can use the created expression with the points balance as an insert and use it on the website, display it in personalized dynamic content campaigns, send it in a push message, SMS, or email campaign with the information about current points balance.
Also, you can use it as a part of the dedicated promotions for users with a specific number of points and take into account the number of points gained by a customer in the conditions of promotions displayed, for example, in your mobile application.
The expression is also available as a profile attribute, so you can use it in analytics, for example to create a segmentation of customers depending on their collected points, and then use that segmentation as an Automation audience.
In this article, we described the fundamental requirements for a basic loyalty program, but we encourage you to develop it and make it more personalized and adjusted to your business needs. Here are a few examples to help you in adding more complex elements and options to your loyalty program:
- Learn how to manage the expired and burned points.
- Learn how to add points for custom events.
- Learn how to transfer the points between customers.
- Learn how to create promotion for joining loyalty program.
Check the use case set up on the Synerise Demo workspace
You can check the configuration of all described analytics directly in Synerise Demo workspace:
- Preparation of points schema:
- Expression which multiplies the price by the number of products bought.
- Aggregate which counts the amount of money spent on every product within one transaction.
- Expression which adds 1 point in loyalty program for every 1 PLN spent.
- Counting the point balance:
- Aggregate which counts the total number of points gained by a customer.
- Expression which return the value of the aggregate with the number of points.
If you don’t have access to the Synerise Demo workspace, please leave your contact details in this form, and our representative will contact you shortly.
Read more
Check our loyalty use cases:
- Award loyalty points for reaching a specific number of transactions
- Promotion for the first transaction after joining the loyalty program
- Promotion triggered by basket value
- Rewarding customers in loyalty program for custom activities
- Send mobile push notifications with birthday promotion
- Transfer loyalty points between customers