Send emails 14 days before a customer's birthday

Published March 31, 2022
Modules
Difficulty

Birthday discounts and offers are a perfect chance to surprise your customers. One of the ideas for a birthday campaign may be sending a happy birthday message two weeks prior to a customer’s birthday. This way, not only do you remind them about the celebration day, but can also provide a birthday discount and offer a range of personalized products a customer can treat themselves to for their upcoming birthday. However you choose to wish your customers a happy birthday, it’s a great opportunity to show them how much they mean to your business.

In this use case, you will create a dynamic attribute which will be assigned to the customers whose birthday is in 14 days. In the further part of the process, you will use this attribute to group those customers and prepare a workflow which sends an email to them.

Note: You can also check our other use cases for the birthday campaigns.

Prerequisites


  • Implement a tracking code into your website.
  • Customers’ profiles must be supplied with the birthdate (ISO timestamp format).
  • Configure an email account.
  • Optionally, you can create a voucher pool.

Process


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

  1. Create expressions.
  2. Create an email template.
  3. Create a workflow.

Create expressions


In the first part of the process, you create four expressions. The first three expressions will be components of the last expression, which returns information whether a customer’s birthday is in 14 days.

Return the day of birthday

Create an expression which returns only the day of the birthday as a number.

  1. Go to Analytics icon Analytics > Expressions > New expression.

  2. As the name of the expression, enter Month day of birthday.

  3. Leave the Expressions for option at default (Attribute).

  4. In the formula of the expression:

    1. Click Select.
    2. From the dropdown list, select Function > Day of month.
    3. Click the Select button in the brackets.
    4. From the dropdown list, select Customer.
    5. Click the unnamed node.
    6. At the bottom of the page, click Choose attribute.
    7. From the dropdown list, select the attribute which indicates birthday formatted as an ISO timestamp (Birthdate attribute label).
  5. Click Save.

    The configuration of the expression that returns the day of birthday
    The configuration of the expression that returns the day of birthday

Return the month of birthday

Create an expression which returns only the month of the birthday as a number (for example, 8 stands for August).

  1. Go to Analytics icon Analytics > Expressions > New expression.
  2. As the name of the expression, enter Month of birthday.
  3. Leave the Expressions for option at default (Attribute).
  4. In the formula of the expression:
    1. Click Select.
    2. From the dropdown list, select Function > Month.
    3. Click the Select button in the brackets.
    4. From the dropdown list, select Customer.
    5. Click the unnamed node.
    6. At the bottom of the page, click Choose attribute.
    7. From the dropdown list, select the attribute which indicates birthday formatted as an ISO timestamp (Birthdate attribute label).
  5. Click Save.
    The configuration of the expression that returns the month of birthday
    The configuration of the expression that returns the month of birthday

Return the date 14 days ahead

Create an expression that returns the date 14 days ahead (including the current day).

In the formula of the expression, you add the product of multiplying 86400000 by 14 to the current date. 86400000 is 24 hours in milliseconds and 14 stands for the 14 days.

The expression returns the timestamp of the date in 14 days in ISO 8601. For example, if the current date is March 23, 2022, 15:00, the expression will return 2022-04-05T15:00:00.000Z

  1. Go to Analytics icon Analytics > Expressions > New expression.
  2. As the name of the expression, enter Date 14 days ahead.
  3. Leave the Expressions for option at default (Attribute).
  4. On the dashboard, build the following formula of the expression:
    The configuration of the expression that returns the date 14 days ahead
    The configuration of the expression that returns the date 14 days ahead
    Click to see the video tutorial

  5. Click Save.

Identify customers whose birthday is in 14 days

Create an expression that informs if a customer’s birthday is in 14 days. In the formula of the expression, you compare the day of the month and the month of birthday with the date 14 days ahead from now. If they are the same, the expression returns true, if not, false.

  1. Go to Analytics icon Analytics > Expressions > New expression.
  2. Enter the name of the expression.
  3. Leave the Expressions for option at default (Attributes).
  4. Optionally, you can enable the Show in profile card toggle, so the result of the expression is visible in the profile of a customer.
  5. On the dashboard, build the following expression formula using the expressions you created in the previous steps:
    The configuration of the expression that returns information whether customer has birthday in 14 days
    The configuration of the expression that returns information whether customer has birthday in 14 days
    Click to see the video tutorial

  6. Click Save.

Create an email template


In this part of the process, create an email template with a birthday discount code for the customers who will celebrate their birthday in 14 days.

  1. Go to Image presents the Communication icon Communication > Email.
  2. On the left pane, click Templates.
  3. Select the wizard:
    • Drag&drop builder - use ready-made components to build an email template.
    • Code editor - use HTML, CSS and JS to build an email template from scratch.
  4. Build a template.
    Tip: Insert a voucher in an email template. You can use other inserts as well.
  5. Save the template.

Create a workflow


In this part of the process, create a workflow that will be targeted at customers who have birthday in 14 days from today. The workflow will be launched automatically every day.

  1. Go to Automation icon Automation > Workflow > New workflow.
  2. Enter the name of the workflow.
  3. Set capping to 1 email in 12 months.
    This configuration means that the capping remains in effect for a customer for 360 days since the day of the workflow launch for this customer (12 months multiplied by 30 days, in context of capping, a month always equals 30 days).
  4. As the first node, add Audience.
  5. In the configuration of the Audience node:
    1. As the Run trigger option, select repeatable.
    2. Set the interval to 1 day.
    3. In the Begin at field, select the date.
      Note: It can’t be the past date.
    4. From the Timezone dropdown list, select the time zone consistent with the time zone of your workspace.
    5. In the Define audience section, click New audience.
    6. Click Choose filter.
    7. Select the Clients tab.
    8. Select the previously created expression which checks if a customer’s birthday is in 14 days.
    9. Click the Boolean icon.
    10. Select Is true.
      Filter settings in the Define audience section
      Filter settings in the Define audience section
    11. Confirm by clicking Apply.
  6. As the second node, add Profile Filter.
  7. In the configuration of the Profile Filer node:
    1. Select newsletter_agreement.
    2. As the logical operator, select Equal.
    3. In the text field, enter enabled.
      Filter settings in the Profile Filter node
      Filter settings in the Profile Filter node
    4. Confirm by clicking Apply.
  8. At the matched path of the profile filter node, add a Send Email node.
  9. In the configuration of the Send Email node:
    1. In the Sender details section:
      1. Select the account from which the email will be sent.
      2. Confirm by clicking Apply.
    2. In the Content section:
      1. Enter the email subject which will be visible in the customer’s inbox.
      2. Select the email template you created earlier.
      3. Confirm by clicking Apply.
    3. In the URL & UTM parameters section:
      • If you don’t want to add the parameters, click Skip this step.
      • If you want to add the parameters, click Define and define the parameters.
  10. Add the End nodes to the not matched path of Profile Filter node and after the Send Email node.
  11. Click Save & Run.
The final configuration of a workflow that sends an email 14 days before birthday
The final configuration of a workflow that sends an email 14 days before birthday

Check the use case set up on the Synerise Demo workspace


You can check described expressions below:

Check also the created workflow that will be targeted at customers who have birthday in 14 days from today.

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