Birthday and Anniversary Campaigns

Introduction

Sending messages on birthdays, anniversaries, and other recurring dates is a great way of keeping customers engaged with your company throughout the year. Customer.io makes this simple. Let’s get started sending your customers a birthday discount, celebrating their time as a customer, or reminding them of something that reccurs on a long time scale.

This recipe documents an anniversary campaign, but the same steps work for any type of date.

Ingredients

  • A date of each person’s anniversary stored in an attribute on their profile

 IMPORTANT

Ensure that your system does not send zero (0) or other false default values for people when you do not have an actual date for them. Incorrect date values may still be interpreted by our system and may cause your campaign to send messages you do not want to send.

For example, zero (0), as a timestamp, is equal to January 1, 1970, 0:00:00 which will cause yearly campaigns to trigger every January 1st and monthly campaigns to trigger on the first of every month.

Method

Storing the attribute

If you already have the date attribute stored on the people in your account, then you can skip this step.

When you create a new person in Customer.io, you can store their anniversary or birthday date as one of their attributes. This is an example of how you might do that with the _cio.identify() function in the JavaScript snippet:

<script type="text/javascript">
    _cio.identify({
        id: '1899', // must be unique per customer
        email:      'john@example.com',
        created_at: 1743259962,
        
        // Custom user attributes
        first_name:  'John',
        plan_name:  'free',
        anniversary_date: 1481067323
    });
</script>

Here, I’ve used anniversary_date but you can name this date attribute however you like. Note, we are using UNIX timestamps in this recipe, but it will also work with the ISO 8601 date format.

 The date format you choose is important!

Unix timestamps are fine for triggering message campaigns. But, if you want to use date values in message templates or for segmentation, we strongly recommend that you use ISO 8601 formatted data. ISO date-times still support common comparison operators such as “<”, “>” and “=” and you can transform these values in message templates using liquid.

Attempting to use negative timestamps (dates prior to 12:00:00 AM on January 1st, 1970 UTC) in message templates or for segmentation may produce unpredictable results.

Once the anniversary_date attribute has been added, when you check out this person in Customer.io, their attributes look like this:

image.png
image.png

Create the campaign

You will use this anniversary_date attribute as the trigger for your campaign. Customer.io will use the month and day from this attribute to trigger the campaign once per year.

  1. From the Campaigns section of the app, pick Create Campaign
  2. Select “A particular date” as the trigger
  3. Choose “Every year” as the recurrence interval
  4. Pick anniversary_date as the attribute
  5. Set the desired time of day and time zone to define when the campaign will trigger
recipe_anniversary
recipe_anniversary

 WARNING: Attributes updated on the same day as the campaign

When you set the Person’s attribute value on the same month and day as the month and day specified as the trigger, if it is set before the specified trigger time for the campaign, it will fire for THIS year since the month and day parts of the attribute match the criteria and the trigger time has not passed yet.

You can prevent this by setting the trigger time to midnight (in whatever timezone you are using for your trigger attribute values
so that the trigger time will have already passed when the person’s attribute value is added. That will cause them to be scheduled for the NEXT occurrence of the month+day+time. To control message timing, you can use a time window in the beginning of the workflow to determine when the message is sent.)

 Bonus: Send in the recipients’s time zone

If you’re using the timezone attribute (as described here), you can choose “the user’s time zone” to automatically adapt the trigger time for each individual person.

Save these settings then add a message to your campaign workflow with your birthday or anniversary content. Once you start the campaign, Customer.io will automatically match each user when their anniversary date occurs.

Wrap Up

This recipe covered the basics, but there are several other capabilities you have when setting up this sort of campaign:

  • Choose to send the campaign a certain number of days before or after the anniverary date. For instance, if you want to give 3 days of notice for a promotion they can use on their anniversary.
  • Build countdown workflow leading up to a date. Follow this same recipe, then use Delays in your workflow to create a drip of messages.
  • Send messages for events that occur monthly (rather then yearly. In this case, Customer.io will use only the day of the month as the recurrence criteria.

If you need any additional help setting up your campaign, please get in touch and we’ll be happy to help!

Copied to clipboard!