Birthday and Anniversary Campaigns
UpdatedIntroduction
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 a yearly 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
Do not send zero as a value for your date field
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:
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.
- From Campaigns, click Create Campaign.
- Click Choose trigger.
- Select Important date as the trigger type.
- Pick
anniversary_date
from the date attribute dropdown. - Set the desired time of day to trigger the campaign. Click Save.
We recommend setting this to midnight in the user’s timezone
If someone just signed up and their
anniversary_date
is a timestamp today at 11am and your campaign triggers at 12pm, then that person would enter your anniversary campaign. This may be desired if it’s a birthday campaign! But wouldn’t make sense for an anniversary campaign that’s meant to be sent yearly. Midnight in the user’s timezone ensures the trigger time will most likely have passed when the person signs up and will schedule them for NEXT year’s occurrence. - Scroll down to Frequency on the trigger panel. Choose Yearly from the dropdown so this campaign sends yearly on your customer’s anniversary date. Click Save.
- If you set the trigger to midnight in a user’s timezone, then drag a Time Window onto your workflow. Set this to the time of day you want to reach your audience.
- Drag a message block into your workflow and add your content. Remember to update the sending behavior to Send automatically so you don’t have to manually send drafts.
- Review and start your campaign.
Wrap Up
This recipe covered the basics, but you can also:
- 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 a countdown workflow leading up to a date. Follow this same recipe, but 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!