Overview
A welcome series is a stream of automated messages initiated by a trigger. These messages can be as simple as a series of weekly touchpoints over two to four weeks. Or they can be more complex, like a dynamic message based on observed behaviors over time. We'll start with a simple series that adjusts based on a purchase.
The initial welcome message will use the event triggered sending method. The subsequent welcome series messages are set up using the recurring message sending method.
In this example, the system will send a message every day to contacts that subscribed to a designated list seven days in the past. We'll then add another rule that removes them from the series if they made a purchase.
Implement the trigger
In order for the welcome message to send, there needs to be data sent to the system that will trigger the automation. In the case of a welcome series, we'll use the trigger of when a contact is added to a list and then filter that with an order event.
This strategy utilizes two primary pieces of data:
1. List attribute
- Purpose: Used to flag a contact as "in" or "out" of a specific segment. For example, a customer joins our list (a newsletter subscription, loyalty program, rewards program, interest group, etc.). The "Date Tracking" feature should be enabled on the list on order to capture the date each contact was added to the list
- Data type: A list is a type of contact attribute. This value is passed as a boolean true/false value.
2. Order
- Purpose: An order can act as a filter to remove customers from the current series. It can also shift them into a new series or append content to the series they are currently on.
- Data type: An order is an object that describes a purchase and is stored in an order collection.
The order collection is the most robust way to store purchase data. You can also achieve the same end goal using a custom event to represent an order, or using a simple date attribute to represent the "last_purchase_date".
Implementation methods
There are two implementations you can use to send the data to Cordial:
- JavaScript listener implementation: JavaScript code placed on your website that sends data to Cordial from the client-side browser. Learn more about setting up the core JavaScript listener v2 code.
- Rest API implementation: a server-side alternative to JavaScript that sends data to Cordial via the API. Learn about updating contact records via the API.
JavaScript listener implementation
Add a contact to a list
When the customer provides their email address and expresses interest in receiving promotional messages via a form or checkout process, run the following function.
This article assumes you have implemented the JavaScript Listener v2. We have included examples applicable to JavaScript Listener v1 in the event you are not using version v2 at this time.
-
var auth_data = { email: 'fred@example.com' } var contact_data = { 'channels': { 'email': { 'subscribeStatus': 'subscribed', } }, 'list_name': true }; crdl('contact', auth_data, contact_data);
-
In JS listener v1, the cordial.identify sets the cookie and the cordial.contact adds or updates the contact record.
cordial.identify(fred@example.com); cordial.contact({ '$list_name': true, 'channels': {'email': {'subscribeStatus': 'subscribed'}} });
Update order info for a contact
In order to filter the message series based on order activity, you will need to pass the order data to Cordial. Learn more about passing order data using the JavaScript listener here.
REST API implementation (server-side alternative to JavaScript)
The REST API implementation is an alternative method to the Embedded JavaScript Listener. This is a server-side approach to sending the same data.
Method to call when subscribing a contact to a list:
- POST v2/contacts (adds a new contact record or updates an existing contact record)
{ "channels": { "email": { "address": "fred@example.com", "subscribeStatus": "subscribed" } }, "$list_name": true }
Method to call when passing order data to Cordial:
- POST v2/orders (adds orders to the orders collection)
{ "email": "fred@example.com", "orderID": "33451", "purchaseDate": "2015-01-09 17:47:43", "items": [{ "productID":"1234abcd", "sku": "ssd-2344-15", "category": "Shirts", "name": "Red Flannel" }] }
Create the automated message
Once the initial welcome message trigger is set up, you can automate a simple recurring email. In this example, our trigger is a customer joining a specific list.
1. From the Cordial Dashboard, navigate to Message Automation > Create New Automation. Provide the necessary information and click Continue.
2. In the left panel under Sending Methods, click Recurring.
3. For Schedule, set the message to Send every day at the preferred time.
4. Create an audience rule that targets customers who joined the initiating list exactly x days in the past. For this example, we're using seven days in the past.
5. Once this is saved and the message content is published, you can Enable the recurring message. As soon as a message is enabled, the automation will run every day and look for people who joined the list exactly seven days ago, which is also seven days since they received the initial trigger.
6. Repeat this process for as many messages as you would like in the series. Be sure to change the number of days in each audience rule to match the desired cadence.
Adjust based on a purchase
You can extend the logic above to adjust for purchase behavior (or any behavior) during the series. Below is an example of removing customers from the subsequent messages if an order has occurred since the welcome series started.
The following is an example of a continuation of the series for people who have purchased since the series began.
In the next article, you can learn how to set up an abandoned cart message.
Comments
0 comments
Please sign in to leave a comment.