Manage loyalty points expiration with rolling logic
In many loyalty programs, points remain valid only for a limited period of time. To manage this process effectively, it is important to accurately calculate when points expire and update customer balances accordingly.
There are two common approaches to handling point expiration. The first is rolling cancellation, where each points-earning event has its own expiration date calculated from the moment the points were awarded. The second is batch expiration, where points are removed periodically for the entire customer base according to predefined rules.
In this use case, we focus on the more flexible rolling expiration model, in which points expire individually after a defined validity period. This approach allows you to maintain accurate point balances, monitor expiring points continuously, easily modify point expiration rules, and proactively inform customers about upcoming point reductions.
Use case assumptions
The expiration mechanism can be configured in many different ways depending on business requirements. For the purpose of this use case, we assume the following setup:
- Loyalty points are awarded through the
points.loyaltyevent based on thetransaction.chargeevent which generates the points. Optionally, you can implement other loyalty point-earning events for different actions (such as completing a survey, newsletter subscription, fast order pickup etc). - Points can be spent on rewards through the
client.activatePromotionevent. - The default retention of the two above mentioned events is set to 30 days, however we recommend to change it to infinite.
- Each point-earning event can have its own configurable expiration time, however in this case we assume that points which have not been redeemed expire after 6 months (182 days) from the moment they are awarded.
- Expired points are recorded with the
points.expireevent generated by workflow and later used in expressions calculating the current balance. - The expiration process runs daily.
Prerequisites
Integrate mechanism for awarding loyalty points. With the help of Synerise support implement the points.loyalty and client.activatePromotion events, as well as necessary custom loyalty events.
Security configuration
Before you start working with this hub, 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 an aggregate summing collected points.
- Create an aggregate summing expired points.
- Create an aggregate summing points redeemed on promotions.
- Create an aggregate summing all points are to potentially expire.
- Create an expression summing aggregates with all lost points
- Create an expression calculating current point balance
- Create an expression calculating points to expire
- Create a segmentation of customers with points to expire
- Create a workflow
Create an aggregate summing collected points
Start with creating an aggregate which returns the sum of points for the points.loyalty event. We recommend setting the analyzed period to Lifetime. The result of the aggregate will be used in an expression calculating current point balance.
- Go to
Behavioral Data Hub > Live Aggregates > Create aggregate. - As the aggregate type, select Profile.
- Enter the name of the aggregate.
- Click Analyze profiles by and select Sum.
- Select the
points.loyaltyevent. - As a parameter, choose
points. - Set the analyzed period to Lifetime.
- Click Save.
Create an aggregate summing expired points
In this part of the process, create an aggregate which returns the sum of expired points based on the points.expire event. We recommend setting the analyzed period to Lifetime. The result of the aggregate will be used in an expression calculating all lost points.
- Go to
Behavioral Data Hub > Live Aggregates > Create aggregate. - As the aggregate type, select Profile.
- Enter the name of the aggregate.
- Click Analyze profiles by and select Sum.
- Select the
points.expireevent. - As a parameter, choose
points. - Set the analyzed period to Lifetime.
- Click Save.
Create an aggregate summing points redeemed on promotions
In this stage of the process, create an aggregate that counts the sum of redeemed points based on client.activatePromotion event. We recommend setting the analyzed period to Lifetime. The result of the aggregate will be used in an expression calculating all lost points.
- Go to
Behavioral Data Hub > Live Aggregates > Create aggregate. - As the aggregate type, select Profile.
- Enter the name of the aggregate.
- Click Analyze profiles by and select Sum.
- Select the
client.activatePromotionevent. - As the event parameter, select
promotionRequireRedeemedPoints. - Set the analyzed period to Lifetime.
- Click Save.
Create an aggregate summing all points that are to potentially expire
In this step, create an aggregate that returns the total number of loyalty points awarded more than 182 days ago based on the points.loyalty event. These points may have reached the expiration threshold and could potentially expire at the time of calculation.
The analyzed time range is set from 20 years ago up to 182 days before today. This allows the aggregate to include all historical point-earning events that are old enough to be considered for expiration. Since the system does not allow setting an infinite time range, 20 years is safe to use instead of lifetime.
The result of this aggregate will be used later in an expression that calculates how many points should expire.
- Go to
Behavioral Data Hub > Live Aggregates > Create aggregate. - As the aggregate type, select Profile.
- Enter the name of the aggregate.
- Click Analyze profiles by and select Sum.
- Select the
points.loyaltyevent. - As a parameter, choose
points. - Set the analyzed period to last 20 years before 182 days.
- Click Save.
Create an expression summing aggregates with all lost points
In this part of the process, prepare an expression which is a sum of two aggregates created in the previous steps: aggregate summing expired points and aggregate summing redeemed points.
- Go to
Behavioral Data Hub > Expressions > New expression. - From the Expressions for dropdown list, select Attribute.
- Build the following formula of the expression:
Formula of an expression summing up aggregates with all lost points - Save the expression.
Create an expression calculating current point balance
In this part of the process, prepare a current point balance expression by substracting lost points (the sum of aggregate summing expired points and aggregate summing redeemed points) from all points gathered (aggregate summing collected points).
- Go to
Behavioral Data Hub > Expressions > New expression. - From the Expressions for dropdown list, select Attribute.
- Build the following formula of the expression:
Formula of an expression calculating the current point balance - Save the expression.
Create an expression calculating points to expire
In this part of the process, we create a formula that will tell how many points should be counted as expired, taking into account that some of them may already have been used on rewards. The result of this expression will be used in the segmentation of customers whose points should expire.
This expression is based on the condition that if the number of collected points returned by the [aggregate summing all points that reached the expiration threshold](#create-an-aggregate-summing-all-points-that-are-to- potentially-expire) is equal to or lower than the results of the expression summing aggregates with all lost points which includes all points already deducted from the balance up to this moment (in this case, up to 6 months ago), then we assume that all points eligible for expiration have already been redeemed or expired. In this case, the expression returns 0.
Otherwise, we subtract the value of the expression summing aggregates with all lost points from the result of the [aggregate summing all points that reached the expiration threshold](#create-an-aggregate-summing-all-points-that-are-to-potentially- expire). The returned value equals the number of points that should expire.
- Go to
Behavioral Data Hub > Expressions > New expression. - From the Expressions for dropdown list, select Attribute.
- Build the following formula of the expression:
Formula of an expression calculating points to expire - Save the expression.
Create a segmentation of customers with points to expire
In this step, create a segment of users who have loyalty points eligible for expiration. This segment will serve as the audience for the daily workflow responsible for generating the points.expire event.
The segmentation is based on the following conditions:
-
The user received loyalty points at least 182 days ago. In this simplified example, we check the occurrence of the
points.loyaltyevent. If your loyalty program awards points through multiple events, you can include them using the OR operator. -
The result of the expression calculating points to expire is greater than 0.
- Go to
Decision Hub > Segmentations > New segmentation. - Enter the name of the segmentation.
- Choose Add condition.
- From the dropdown list, choose the
points.loyaltyevent. - As a parameter, choose
points. - Select the More than operator.
- In the left field, leave the # icon and enter
0in the value field. - Using the date picker in the lower-right corner, set the time range to Last 24 hours before 182 days.
- Choose Add condition once again.
- From the dropdown list, choose the expression calculating points to expire you have created in the previous part of the process.
- Select the More than operator.
- In the left field, leave the # icon and enter
0in the value field. - Save the segmentation.
Create a workflow
In this part of the process, you will create a simple workflow that runs daily, preferably shortly after midnight.
- Go to
Automation Hub > Workflows > New workflow. - Enter the name of the workflow.
Define the trigger node
The workflow is triggered for customers who belong to the segmentation created in the previous step every day at a defined time.
- As the first node, add the Audience node.
- In the configuration of the node, set the Schedule option to Repeat runs.
- Select the correct time zone.
- Set the interval to 1 per day.
- Choose the day and time when the process starts. We recommend scheduling it a few seconds (5–10) after midnight.
- In Define audience, choose Segments, click Select segments and select the segmentation created in the previous step.
- Click Apply.
Define the Generate Event node
-
Add the Generate Event node. In the node settings:
- In the Event name, enter
points.expire. - In the Body section, use the following Jinjava, entering the UUID of the expression calculating points to expire which allows to dynamically generate events with points number personalized for each user.
{ "points": " {% expression %} a7d340ac-906d-49af-83a1-fbe4015bc76f {% endexpression %} ", }The result of such action will be such an event:
The view of the points.expire event on customer's profile - In the Event name, enter
-
Click Apply.
Add the finishing node
- Add the End node.
- In the upper right corner, click Save & Run.
What’s next
Once the rolling expiration mechanism is configured, you can extend this setup with additional communication scenarios.
For example, you can create a campaign that informs customers in advance about points that will expire soon. Sending a notification a few days or weeks before the expiration date helps customers use their points before they disappear.
Such communication can include personalized information about the number of points that will expire and highlight rewards or promotions where those points can be redeemed. This approach not only improves the customer experience but also increases engagement with the loyalty program and can boost the number of transactions.
Check the use case set up on the Synerise Demo workspace
You can check all the analytics directly in the Synerise Demo workspace:
- Aggregate returning the sum of collected loyalty points
- Aggregate returning the sum of expired loyalty points
- Aggregate returning the loyalty points redeemed on promotions
- Aggregate returning the sum of points that are potentially to expire
- Expression returning the sum of aggregates with all lost points
- Expression calculating current point balance
- Expression calculating points to expire
- Segmentation of customers with points to expire
- Workflow for expiring points
If you’re our partner or client, you already have automatic access to the Synerise Demo workspace (1590), where you can explore all the configured elements of this use case and copy them to your workspace.
If you’re not a partner or client yet, we encourage you to fill out the contact form to schedule a meeting with our representatives. They’ll be happy to show you how our demo works and discuss how you can apply this use case in your business.
Read more
Check our other loyalty use cases