Extra points for purchase from specific category during specific time

Published October 21, 2022
Modules
Difficulty

The pre-Christmas period is a very suitable moment for temporary actions to diversify basic loyalty programs, as it usually works well for your customers who have promised to themselves to buy a gift. You can launch a special time-limited promotion for a selected product category during the weekend right before Christmas for the purchase of which the customer can gain twice as many points.

In this use case, we will present an example of an action that doubles points for the purchase of all products from the Christmas category during the pre-Christmas weekend. Customers who make such a purchase will receive an email with information about doubling of points for the specific purchase and the current points balance.

Prerequisites


  • Create an email account.

  • Implement transaction events using SDK or API.

  • Implement basic loyalty program based on which you granted customers with 1 point for every 1 PLN spent.

  • Create an email template with the information about current point balance.

    Note: To add the current point balance dynamically to your email template, use the expression insert and use the ID of the expression created in the next step. The example usage of the expression insert: Your current loyalty points balance is {% expression %}EXPRESSION ID{% endexpression %} 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. 

Process


  1. Create an aggregate that returns the sum of loyalty points for an individual customer.
  2. Create an expression with points balance.
  3. Create a workflow which doubles the points for every product from the Christmas category purchased during the specific weekend and sends the email with the final point status.

Create an aggregate


Create an aggregate that returns the sum of loyalty points for an individual customer.

  1. Go to Analytics icon Analytics > Aggregates > Create aggregate.
  2. As the aggregate type, select Profile.
  3. Enter a meaningful name of the aggregate.
  4. Set the Analyze profiles by option to Sum.
  5. Click the Choose event dropdown list.
  6. From the dropdown list, select the event that is generated every time the customer is awarded with loyalty points, in this use case it’s the points.loyalty event.
  7. From the + where dropdown list, select the points parameter.
  8. Using the date picker in the lower-right corner, set the time range to Lifetime.
  9. Save the aggregate.
    The aggregate that sums points from the points.loyalty event
    The aggregate that sums points from the points.loyalty event

Create an expression with points balance


In this part of the process, create an expression which will be used to calculate points balance for the customer.

In this use case, the expression is built based on the aggregate that returns the sum of loyalty points gained.

Note: The described expression configuration is just an example. You can define additional conditions such as burned points or points added additionally for completing some other extra activity. It all depends on your business requirements and how your loyalty program is implemented.
  1. Go to Analytics icon Analytics > Expressions > New expression.
  2. Enter a meaningful name of the expression.
  3. Leave the expression type at default (Attribute).
  4. Build the formula of the expression.
    1. Click the Select node.
    2. From the dropdown list, select Profile.
    3. Click the unnamed node that appeared on the canvas.
    4. Scroll down the page and click Choose attribute.
    5. On the dropdown list, select the aggregate for points.loyalty that you created earlier.
    6. Save the expression.
      The configuration of the expression
      The configuration of the expression

Create a workflow


Create a workflow which:

  • doubles the points for the purchase of every product from the Christmas category during the specific weekend,
  • sends the email message with the current point balance
  1. Go to Automation icon Automation > Workflows > New workflow.
  2. Enter the name of the workflow.

Define the Profile Event trigger node

At this stage, we will configure the conditions that launch the workflow. As a trigger, we will use the product.buy event.

  1. As the first node of the workflow, add Profile Event. In the configuration of the node:
  2. From Choose event dropdown menu, choose the product.buy event.
  3. Click the + where button and from the dropdown list, choose category.
  4. From the Choose operator dropdown, select Equal.
  5. In the text field, type the name of the category. In our case it will be Christmas.
  6. Click the + where button and from the dropdown list, choose TIMESTAMP.
  7. From the Choose operator dropdown, choose Custom (Date).
  8. Click Select date range.
  9. Set the time range in which your promotion is active. In this use case, it will be the weekend before Christmas.
  10. Confirm by clicking Apply.
Profile
Profile Event trigger node

Configure the Generate Event node

In this part of the process, you will create a node which generates a points.loyalty event which adds extra loyalty points. This event is created in addition to the regular points.loyalty event. In result, the customer receives points for a purchase from the Christmas category twice:

  1. Points based on the loyalty points schema described as a part of prerequisites.

  2. Extra points through this workflow. The body of the additional event will contain the points parameter calculated by multiplying the value of the $finalUnitPrice and $quantity parameters from the product.buy event.

  3. As the second node of the workflow, add Generate Event.

  4. In the Event name, enter points.loyalty.

  5. In the Label field, add the text which will be visible in the header of the event details on a profile card.

  6. In the Body section, define the parameters of this event, and click Apply.

Example content of Body section:

{
  "points": "{{ event.params.$finalUnitPrice * event.params.$quantity }}",
  "promo": "ChristmasPromo"
}
Note: The event body is an example. You can add more parameters or change the point calculation, perform any mathematical formula according to your business needs.
Generate Event node configuration
Generate Event node configuration

Configure the Event Filter node

At this stage, we make sure the points have beed awarded to the customer before sending an email.

  1. Add the Event Filter node.
  2. Check without limits.
  3. From the Choose event dropdown list, select the points.loyalty event (the same you generated in the previous step.
  4. As the event parameter, select promo (the same parameter as in the body of the Generate Event node).
  5. From the Choose operator dropdown list, select Equal.
  6. As the value, enter ChristmasPromo which is the value of the promo parameter from the body of the Generate Event node. This way you make sure that a customer got extra points for the purchase.
  7. Confirm by clicking Apply.
Event Filter node configuration
Event Filter node configuration

Configure the Send Email node


  1. Add a Send Email node to the matched path.
  2. In the settings of the node:
    1. Define the settings of the Sender details section.
    2. In the Content section, enter the subject of the email and select choose the template of the email you have prepared as a part of the prerequisites.
    3. Optionally define the settings in the UTM & URL parameters and Additional parameters sections.
  3. Click Apply.

Prepare the final settings


  1. After Send Email, add the End node as well as to the NOT MATCHED path.
  2. Optionally, define capping.
  3. Optionally, add titles to each node so the workflow will be more understandable to your colleagues.
  4. Activate the workflow by clicking Save & Run.
The workflow configuration
The workflow configuration

Check the use case set up on the Synerise Demo workspace


You can check the configuration of the:

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


😕

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.

Close modal icon Placeholder alt for modal to satisfy link checker