Recommend last seen items through email

Published September 15, 2023
Modules
Difficulty

Boost your sales and strengthen customer relationships by providing personalized product recommendations based on customers’ browsing history. By suggesting last seen items, you can enhance the shopping experience and drive engagement with a simple email.

This example explains how to create a set of product recommendations with recently seen items for customers who have visited a page and have not made a purchase within the last 48 hours and send these recommendations through email. In this use case, we will use a ready-made email template and show you how to use HTML block in this template to make the whole process of creation easier.
Scenario described in this use case refers only to WEB integration.

It’s worth noting that in this use case, the aggregate returns recently viewed products, but it can also be any other interactions, such as recently added to the cart, recently purchased, and so on. This predefined HTML block will work well regardless of the logic of the aggregate. Thanks to the HTML block, you can benefit from both the drag-and-drop builder, which allows you to create a creative and personalized email layout from scratch. At the same time, it simplifies the process of enriching such an email with dynamic elements, such as ready-to-use product frames, which already have built-in logic for how and what should be displayed. All you need to configure here is the aggregate responsible for selecting products for the customer. Everything is designed so that you can fully customize the email and display products according to your business needs.

Last seen products in email message

Prerequisites


Process


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

  1. Create an aggregate returning the ID of the last visited product, it will be used in the template configuration.
  2. Prepare an email template with the usage of the predefined template and predefined HTML block.
  3. Create an aggregate which counts the number of products visited by customer.
  4. Prepare a workflow which sends an email to users.

Create an aggregate


In this part of the process, create an aggregate that returns the IDs of the last 3 product a customer has visited.

  1. Go to Analytics iconAnalytics > Aggregates > New aggregate.
  2. Enter the name of the aggregate.
  3. As the type of the aggregate, select Last Multi.
  4. Select the Consider only distinct occurrences of the event parameter radio button.
  5. From the Choose event dropdown list, select the Visited page event.
  6. As the event parameter, select product:retailer_part_no.
  7. Click the + where button.
  8. From the Choose parameter dropdown list, select the product:retailer_part_no parameter.
  9. From the Choose operator dropdown list, select Is true (Boolean).
  10. Using the date picker in the lower-right corner, set the time range to Last 48 hours. Confirm your choice with the Apply button.
  11. Click Save.
The view of the aggregate configuration
Configuration of the aggregate returing the ID of the last seen product

Prepare an email template


In this part of the process, create an email template. You can use a predefined template or create your own template from scratch. In this case, we will use a predefined template. You will also use a specific HTML block which will let you configure the section with context recommendations in an easy way. In the configuration, we will use the aggregate created in the previous steps.

  1. Go to Image presents the Communication icon Communication > Email.
  2. On the left pane, click Templates and from the list of template folders, select Predefined simple templates.
  3. Select any template that mostly fits the campaign assumptions.
    Result: You are redirected to the code editor.
  4. Edit the template according to your needs.

Add the HTML block


  1. From the Content section, click HTML block and add pull it to the chosen place in your template.

    Email context preview
    Email context preview
  2. Click the Configure button.

  3. Choose the Predefined blocks folder where you will find the list of all predefined templates. In this case choose Products with recent interactions 1.

Note: You can edit the template in two ways, by editing the code of the template in the HTML tab and/or by filling out the form in the Config tab. In this use case, we will use the capabilities of the predefined Config tab.

Edit the form in the Config tab


The form in the Config tab is already filled in with default values. You can keep them or change them to fit your business needs.

  1. In the Aggregate ID with recently interacted products, add the Aggregate that returns SKUs of recently interacted products. Use the aggregate created in the previous step. You can find it by typing its name or ID in the search box.

  2. In the Catalog name add the name of the main catalog with your product feed.

    Note: If the catalog you’re using has a custom structure, you’ll need to change the attribute names in the code.
  3. Change the Mail width or leave it at default values.

  4. Change Number of product in row or leave it at default values (recommended amount is 3 or less).

  5. Define the style settings if you need (Product title font color, Button background color, Button font color and Button border radius).

  6. In the Button text field, enter the text that will be displayed on the button.

  7. Optionally, you can add more options to your block using HTML tab.

  8. After you make changes to the template, you can check the preview.

    1. On the upper left side, click the Preview Contexts button.
    2. Enter the ID of a customer and define the product context.
    3. Click Apply.
  9. If the template is ready, in the upper right corner, click the arrow next to Next, and from the dropdown select Save as.

  10. On the pop-up:

    1. In the Template name field, enter the name of the template.
    2. From the Template folder dropdown list, select the folder where the template will be saved.
    3. Confirm by clicking Save.

Below you can find an example of the preview for the HTML block with the last seen products.

Email context preview
Email context preview

Final settings


  1. Add final elements to your email template.
  2. After you make changes to the template, you can check the preview of the whole template.
    1. On the upper left side, click the Preview Contexts button.
    2. Enter the ID of a customer.
    3. Click Apply.
  3. If the template is ready, in the upper right corner, click the arrow next to Next, and from the dropdown select Save as.
  4. On the pop-up:
    1. In the Template name field, enter the name of the template.
    2. From the Template folder dropdown list, select the folder where the template will be saved.
    3. Confirm by clicking Save.

Create an aggregate


In this step you will create an aggregate which counts the number of products visited by customer. It will be used later in the workflow.

  1. Go to Analytics icon Analytics > Aggregates > New aggregate.
  2. Enter the name of the aggregate.
  3. As the type of the aggregate, select Count.
  4. From the Choose event dropdown list, select the page.visit event.
  5. As the event parameter, select product:retailer_part_no.
  6. From the Choose operator dropdown list, select Is true (Boolean).
  7. Using the date picker in the lower-right corner, set the time range to Lifetime. Confirm your choice with the Apply button.
  8. Click Save.
The view of the configuration of the metric returning the number of all page visits
Configuration of the metric returning the number of all page visits

Prepare a workflow


The workflow will be triggered by the session.end event. The delay is set to 48 hours, after this time customer will receive an email with 3 last seen products.

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

Define the trigger node


  1. As the first node, add the Profile Event. In the settings of the node, select the session.end event.
  2. Click Apply.

Configure the Delay node


  1. Add the Delay node. In the node settings:

    1. In the Delay field, type 48.
    2. From the Unit dropdown list, choose Hour.
  2. Click Apply.

    The Profile Filter node configuration
    The Trigger node configuration

Configure the Profile filter node


As this step, add the Profile Filter node, to check two conditions:

  • if the customer competed a transaction within the last 48 hours,
  • if the customer has browsed at least three different products.
    Only customers who fulfill both criteria will be sent an email featuring the last products they looked at. Customers with fewer product views will not receive tailored recommendations because of the lack of data.
  1. Add Profile Filter node.

  2. In the settings of the node select transaction.charge event.

  3. Set the time range as the last 48 hours.

  4. Change the condition to “Profiles not matching funnel”.

  5. From the Choose filter dropdown list select the aggregate created in this part of the process.

  6. From the Choose operator dropdown list, select More or equal to.

  7. On the input field type 3.

  8. Click Apply.

    The Profile Filter node configuration
    The Profile Filter node configuration
  9. To the Matched path, add a Send Email node.

Configure the Send Email node


  1. Add the Send Email node. In the node settings:
    1. In the Sender details section, choose the email account from which the email will be sent.
    2. In the Content section, in the Subject field, enter the subject of the email and from the Template dropdown, select the template you have prepared in the previous step.
    3. In the UTM & URL parameters section, you can define the UTM parameters added to the links included in the email.
    4. In the Additional parameters section, you can optionally assign parameters. which will be added to every event generated by this communication.
  2. Click Apply.

Add the finishing nodes and set capping

  1. Add the End nodes after Send Email node and to the Not matched path after the Profile Filter node.
  2. In the upper right corner, click Set Capping and define the limit of workflows a profile can start.
  3. Confirm by clicking Apply.
The view of the workflow configuration
Workflow configuration

Check the use case set up on the Synerise Demo workspace


On Synerise Demo workspace, you can check:

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