Transactional Campaigns
UpdatedYou can use a campaign to send a transactional message. This can be helpful if you want to send non-email transactional messages or you want to perform multiple actions in response to a transactional event.
How it works
A transactional message is a message that your audience expects to receive even if they’ve opted out of marketing messages—like purchase receipts, password reset requests, shipping updates, etc.
In most cases, we suggest that you use our transactional API to send transactional messages. But, if you need to send a transactional message over a channel other than email, or you want to perform additional actions—like attribute changes, etc—you may need to set up a transactional campaign.
In this case, you’ll send an event to trigger your campaign—and set up your workflow to send a transactional message and perform other downstream actions. For example, here’s a password reset request example, in which we update a user’s attributes and send two messages—one providing instructions or a magic password link, and another confirming the password change.
password reset b->>c: send
transactional event a->>c: person enters campaign rect rgb(181, 255, 239) note over a,c: The Campaign Workflow c->>a: send password reset request email c->>c: set new attributes
on person c->>c: wait until user changes password
i.e. password-changed event a->>b: person sets a new password b->>c: send "password-changed" event c->>a: send password reset confirmation end c->>a: person exits campaign
Make sure you follow transactional message regulations
Transactional messages are typically intended for people regardless of their subscription preference—like shipping updates or purchase receipts. So, when you set up a “transactional” campaign, you may need to send messages to unsubscribed users, but make sure that you abide by the appropriate regulations (CAN-SPAM, GDPR, CASL) and don’t violate your audience’s subscription preferences.
How is this different from using the transactional API?
The transactional API has guard rails in place to make sure that you stay within FCC, CAN-SPAM, and other strict messaging regulations. It’s limited to a single message per API call. Transactional messages don’t go through a campaign/journey workflow, so they take less processing power and tend to send faster than a campaign-based transactional message.
A campaignA series of actions that you perform for each person who matches criteria. Campaigns typically send people a series of messages, but you can also use campaigns to send webhooks, update attributes, etc. lets you perform a complete workflow in response to an event—including multiple messages and other actions, like attributeA key-value pair that you associate with a person or an object—like a person’s name, the date they were created in your workspace, or a company’s billing date etc. Use attributes to target people and personalize messages. Attributes are analogous to traits in Data Pipelines. updates. You can also send non-email messages (push, SMS, in-app, etc). This makes a campaign more flexible than the transactional API, but it lacks the safety of the transactional API.
If you use a campaign to send transactional messages using a campaign, you must make sure that you abide by appropriate regulations.
Set up your transactional campaign
A transactional campaign is basically an event-triggered campaign, where the event represents your audience’s action and your campaign performs the expected response—messages, attribute updates, etc.
1. Send an event
Before you create a campaign, you should send an event representing your transaction. That way you’ll have all your event information ready when you create your campaign.
You can send events using our JavaScript snippet, the API or one of our libraries.
For this recipe, we’ll send a purchase
event into our workspace.
curl -i https://track.customer.io/api/v1/customers/:id/events \
-X POST \
-u YOUR-SITE-ID-HERE:YOUR-SECRET-API-KEY-HERE \
-d name=purchase \
-d data[price]=13.45 \
-d data[product]=socks
We can confirm that this event appears in our workspace by going to the Activity Log and filtering for events. A purchase
event should appear for the customer corresponding to the id
in the request.
2. Create an event-triggered campaign
After you verify that your event appears in your workspace, go to Campaigns > Create Campaign. Give your campaign a name that makes its purpose clear so you can track it later (in this case, we used Order Confirmation).
Select When someone performs an event option for your campaign. In the Define the trigger event field, find the event you sent in earlier steps.
This means that a person will enter your campaign when they perform this event—i.e. when someone makes a purchase—defined by our purchase
event—they’ll enter the campaign and go through the workflow.
If your campaign is truly transactional (it does not contain marketing content and your audience implicitly expects to receive the message), you should set Send to unsubscribed people to Yes.
3. Build your workflow
Click Save to continue to the next step. In the Workflow Builder, you have full control over the content and schedule of your messages. A campaign can be simple and include one message—a receipt for the purchase.
For our example, we’re going to send a message and add some customer attributes:
- An attribute update to keep an internal order count for the customer
- A transactional email receipt, framed as a thank you message
- A T/F branch to determine if this purchase is the customer’s first purchase
- Another attribute update; if the purchase is the customer’s first, we’ll set an attribute to trigger a downstream campaign that offers the customer a coupon for a follow-up purchase.
These options can turn simple transactional messages into powerful campaigns that build customer loyalty through automated, yet personalized, messages.
4. Set a Goal and Exit Conditions (optional)
Because transactional messages are intended to be purely informational, and expected by your audience, you may not need to set a goal or exit conditions.
But, if you want to make sure that your transactional messages resonate with your audience, you might set a goal—like a follow up purchase, or someone clicking related items in your message. Learn more about goals and exit conditions here.
5. Review and Activate your campaign
Before you activate your campaign, you should check for errors or missing workflow actions. Make sure that you’re comfortable with your campaign’s timing, email names, and sending behaviours. When you’re satisfied, click Start, and that’s it! Go to the campaign’s overview page after the emails start sending to see how your campaign performs.
If you set your emails’ sending behavior to draft so that you can make sure that your messages perform normally, remember you’ll have to change to Send Automatically to reach your customers.
Wrap Up
Transactional messages are an essential part of any business and are often underutilized by product and marketing teams. Good transactional emails are timely, personalized, and provide value to your audience (and company).
We hope this guide provides both instruction and inspiration for your transactional messages! If you have any questions about the process or how to apply it to your business, please send us a message!