Predicting the likelihood of offline visit

Published August 05, 2022
Modules
Difficulty

We can predict the likelihood of offline visit for customers with their push notifications enabled. They may be a great target for promotions, so you may want to send them push notifications with promotions at the best time. You can automate sending mobile push notifications to promote products and boost the value of in-store visits by sending promo coupons to customers who are predicted to visit our offline store.

This use case describes a workflow that sends a mobile push notification with a promotional code to customers who are predicted to visit an offline store. In this case, we consider transactions made in an offline store as a visit. However, depending on your business, you can take any other event that will be equal to a customer’s presence in your offline store, for example scanning a mobile application at the entrance. The workflow is triggered by the snr.prediction.score event with the high score and sends a mobile push at the time they are most likely to visit in the next seven days.

Prerequisites


Note: In this case, we consider an offline transaction as a visit to the store, but if necessary, you can implement a different event that will mean visiting the offline store, such as a custom event for scanning the mobile application.
Tip: For promo codes, you can use our Voucher pools, which allows you to assign a unique coupon from a specified pool for each customer.

Process


In this use case, you will go through the following steps:

  1. Create a segmentation of customers who have made transaction in an offline store.
  2. Create an expression.
  3. Create a segmentation of customers for whom the prediction is made.
  4. Create a prediction.
  5. Create a workflow.

Create a segmentation


In this step, we create a group of customers who have made transaction in an offline store. This segmentation will be used in an expression in the next step.

  1. Go to Analytics iconAnalytics > Segmentations V2 > New segmentation.
  2. Enter the name of the segmentation.
  3. From the Add condition dropdown list, select the transaction.charge event.
  4. Click the + where button, from the Choose parameter dropdown menu, choose $offline.
  5. From the Choose operator dropdown, choose Boolean, and then select Is true.
  6. Using the date picker in the lower-right corner, set the time range to Relative time range > Lifetime. Confirm by clicking Apply.
  7. Save the segmentation.
The view of the segmentation configuration
Segmentation configuration

Create an expression


In this part of the process, create an expression that will serve as the target for the prediction model. The expression will return 1 if a customer belongs to the previously defined segmentation and 0 if they don’t.

  1. Go to Analytics icon Analytics > Expressions > New expression.
  2. Enter the name of the expression.
  3. From the Expressions for dropdown list, select Attribute.
    Predictions work only with attribute expressions.
  4. In the formula creator, click the Select node and from the drop-down list select Function > If.
  5. As the first argument, select the segmentation you created earlier:
  6. As the second argument, select Constant with a value of 1.
  7. As the third argument, select Constant with a value of 0.
  8. Save the expression.
The view of the expression configuration
Expression configuration

Create a segmentation of customers for whom the prediction is made


In this step, we create a group of customers who have visited our online store in the last 7 or 14 days. This segmentation will be used as an audience for the prediction.

  1. Go to Analytics iconAnalytics > Segmentations V2 > New segmentation.
  2. Enter the name of the segmentation.
  3. From the Add condition dropdown list, select the Visited page event.
  4. Using the date picker in the lower-right corner, set the time range to Relative time range > More > Last 7 days. Confirm by clicking Apply.
  5. Click Add segment.
  6. From the Add condition dropdown list, select the Visited page event.
  7. Using the date picker in the lower-right corner, set the time range to Relative time range > Custom > Last 14 days. Confirm by clicking Apply.
  8. Save the segmentation.
The view of the segmentation configuration
Segmentation configuration

Create a prediction


In this step, we will calculate the prediction, create a segmentation of customers who will be analyzed while making a prediction. The output of the prediction is a snr.prediction.score event that will appear on the customers’ profiles. The event contains a score.label parameter which determines the probability of a customer’s visit to your store. The workflow configuration will be based on this parameter. We will select customers who have the highest probability to visit our store.

  1. Go to Image presents the Prediction icon > New prediction.
  2. Enter a name for the prediction.
  3. In the Prediction type section, click Define.
  4. Select Classification and click Apply.

Select the audience

In this section you decide which group of the customers will be taken into account while making a prediction. For every individual in the segmentation, Synerise produces a single prediction.

Segmentations can be very complex and the possibilities of building the conditions are practically unlimited. In this example, a simple segmentation will include customers who have made a transaction in the last week or two weeks.

  1. In the Audience section, click Define.
  2. Click Choose segmentation.
  3. Enter the name of the segmentation you’ve created in the previous step. ./8. Click Apply.

Select prediction target

  1. In the What would you like to predict? section, click Define.
  2. Click Select expression and select the expression created earlier.
  3. Click Apply.

Select inputs

In this section, you set up input features based on which the prediction model will be trained.

It is possible to select feature inputs manually, but we recommend using the automatic selection, as explained below. Our algorithms evaluate feature relevance in context of the prediction target and are, in most cases, more effective than manual selection.

  1. In the Model inputs section, click Define.
  2. Click Add feature > Automatically.
    Result: The list is populated with input features.
  3. Click Apply.

Configure additional settings

The additional settings define how often re-calculations are made and the content of events produced by the prediction.

  1. In the Settings section, click Define.
  2. From the How many days in advance do you want to make a prediction list, select 30 days.
  3. For the purposes of this example, select One-time calculation checkbox.
  4. In the Prediction start section, select Immediately.
  5. In How would you like to display results, select 5-point scale.
    The algorithm detects the importance of a prediction.
  6. In the Define the value of the score name parameter section, enter a user-friendly name for the prediction score. The name is shown as the value of the scoreName parameter in the snr.prediction.score event.
  7. Click Apply.
  8. To finish and calculate the prediction, click Save & Calculate.

Result:
The prediction results are saved as snr.prediction.score events in customer profiles.

Create a workflow


As the final part of the process, create a workflow that manages the push notifications. The snr.prediction.score event with the high score triggers the start of the workflow. The push notification will be sent to customers with the high prediction score to visit offline store on the day they are most likely to visit.

  1. Go to Automation > Workflows > New workflow.
  2. Enter the name of the workflow.

Define the Profile Event trigger node

  1. As the first node of the workflow, add Profile Event. In the node settings:

    1. Click Choose filter and from the dropdown list, select the snr.prediction.score event.
    2. For the event parameter, click the + where button and select modelId.
    3. As the logical operator, select Equal.
    4. Enter the ID of the custom prediction created in the previous step.
    5. Click the + and where button and select score_label.
    6. As the logical operator, select Equal.
    7. Type High.
    The screenshot presents Profile Event node configuration
    Profile Event node configuration
  2. Confirm by clicking Apply.

Configure the Optimize Time node

The time of sending the push message for each customer is adjusted to their snr.prediction.score value.

  1. Add an Optimize Time node.
  2. In the configuration of the node:
    1. Select the Mobile mode you created as a part of the prerequisites.
    2. Select Next 7 days.
    3. Confirm by clicking Apply.

Configure the Send Mobile Push node

  1. Add a Send Mobile Push node.
  2. In the configuration of the node:
    1. In the Template type, select the mobile push type according to your business needs.
    2. Select proper push template that you created earlier.
    3. Confirm by clicking Apply.
  3. Add the End node.
  4. In the upper right corner, click Save & Run.
The view of Workflow
The final workflow configuration

Check the use case set up on the Synerise demo workspace


You can check all configurations directly in Synerise Demo workspace:

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