Send an email with promotions labeled with a specific tag

Published October 25, 2024
Modules
Difficulty

This use case describes the process of sending promotions through the email channel. The email template contains a predefined HTML block with promotions which retrieves a Synerise promotion you indicate in the configuration of this block.

The promotions can be easily adapted for different communication channels, but in this scenario, we will focus on email campaigns. Our target audience consists of active users who have made at least one purchase in the past year. The campaign will dynamically deliver the list of active promotions available for a specific user, presenting only offers with a specific tag. This approach is especially important when managing multiple active promotions from different areas but intending to send only those that are tagged with the home label within your campaign.

With the power of dynamic HTML blocks, we can seamlessly integrate these promotions into the email templates, ensuring that each recipient receives relevant offers.

Prerequisites


Process


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

  1. Create promotions with specific tag.
  2. Create a segmentation of customers who have made a transaction last year, this group will be the recipients of the email campaign.
  3. Create an email template.
  4. Create an email campaign.

Create promotions


In this part of the process, create a promotion (or more) which you will insert in the email template. You can create a promotion with the following scopes:

  • For selected items - you can select items to which you want to apply a discount
  • For entire basket - you can reduce the value of the whole shopping cart if its value matches the fixed price limit, Regardless of the selected promotion scope, in the configuration of the promotion, in the Content section, find the Add tag field and add a home tag.
Example of tag
Example of tag

Create a segmentation


In this part of the process, we will create a group of customers who have made a transaction during the last year. This group will serve as the recipients of an email campaign. It’s important to clarify that these customers will receive the email, rather than being the target audience for a promotion. Additionally, ensure that the conditions set for the Audience in the promotion do not conflict with those of the Audience for the email recipients, to avoid any discrepancies between the two groups.

  1. Go to Analytics iconAnalytics > Segmentations > New segmentation.
  2. Enter the name of the segmentation.
  3. Click Add condition.
  4. From the dropdown list, select the product.buy event.
  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 > Last 365 days. Confirm by clicking Apply.
  7. Save the segmentation.
The view of the segmentation configuration
Segmentation configuration

Create an email template


To distribute the promotions, you need to prepare an email template that includes the promotion created in the previous step of the process. This step involves incorporating Jinjava code into the email template to fetch the details of the promotion labeled with the home tag for which an email recipient is eligible. The instructions for this step include the necessary code.

  1. Go to Communication > Emails > Templates > Drag&drop builder.

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

  3. Click the Configure button.

  4. Choose the Predefined blocks folder where you will find the Promotions block.

  5. You must edit the template of the predefined block. It already contains a universal reference to a promotion, but we need to narrow down the promotion scope to those which are labeled with the home tag. The following changes must be added to the code of the block in the HTML section: - to {% set fieldsVar = ["code", "params", "name", "status", "images", "params", "description", "headline"] %}, add , "tags" - replace {%- if count < noOfItems -%} with {%- if count < noOfItems && i.tags|selectattr("name", "equalto", "home")|length > 0 -%} and if you’re using other tag than home, replace "home" with the name of your tag


    Below, you can compare the code before and after changes:

     
    {% set fieldsVar = ["code", "params", "name", "status", "images", "params", "description", "headline", "tags"] %}
    {% promotions fields=fieldsVar %} 
    {% set count = 0 %} {%- for i in promotions_result -%}
    {%- if count < noOfItems && i.tags|selectattr("name", "equalto", "home")|length > 0 -%}
    1. When you finish customizing the block, to use proceed to saving changes in templates, click Next.
      If you want to save the block for future use, click Save as, in Block name, enter the name of the block and in Block folder, select the folder in which your block will be saved.
    2. Save the template by clicking Save as.
    3. In Template name, enter the name of the template.
    4. In Template directory, select the folder in which the template will be saved.
Screenshot presenting email template for anniversarie coupon
Prepare an email template

Create an email campaign


In this part of the process, you will create an email campaign with the list of the promotions available for the recipient.

  1. Go to Image presents the Communication icon Communication > Email campaign > Create new.

  2. In the Audience section, choose the segmentation created in the previous step.

    Note: Please remember that the predefined HTML block with promotions works for a given customer only if they are in the audience of at least one promotion. If none of the selected promotions are available for the user, the email will not be sent.
  3. To confirm you choice, click Apply.

  4. Configure the Content section.

    1. In *From email address, select the email account from which you want to send your message.
    2. In From name, enter the sender name that is displayed in the mailbox.
    3. In the Subject field, enter your message subject.
    4. Click Create message and choose an email template created in the previous step.
    5. Apply changes.
  5. In the Schedule section, specify the time when you want to send your communication.

  6. You can optionally define UTM & URL parameters.

  7. Confirm by clicking Apply.

Check the use case set up on the Synerise Demo workspace


On our Demo account, 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