Create Tasks in Salesforce from your Customer.io messages
UpdatedYou can send message information to Salesforce—the emails you send, whether or not people click them, and so on. In Salesforce, you’ll typically record these events as Tasks. When you send message events to Salesforce, you’ll need to map a few fields to make sure that Salesforce processes your message activity tasks properly.
Set up an action to create tasks in Salesforce
You must use Salesforce’s Contact ID as people identifiers in Customer.io
You must associate each task with a person (typically a contact) in Salesforce by their Contact ID or Lead ID. We’re working on a way to make this easier, but for now, you cannot send tasks to Salesforce if you don’t use the same identifiers in Customer.io that you use in Salesforce. Generally, this means that you sync your Salesforce contacts to Customer.io and use the Contact IDs as their IDs in Customer.io.
You may want to set up different actions for different kinds of events, depending on the data you want to associate with people. But typically, you can set up a single action to send all message events to Salesforce as tasks.
- Go to your Salesforce integration’s Actions tab and click Add Action.
- In the Action dropdown, select Custom Object.
- In the Trigger step, make sure Any conditions are true.
- Set the first condition to Track Event Name is
Email Sent
. - (Optional) Click Add Condition and repeat the previous step but set the event name for each message event you want to capture.
- For the Operation, select Create new record.
- Scroll down and set the Salesforce Object to
Task
. - Next to Other Fields, click Add Key/Value and map the following fields. Note that when you map fields, any values that contain a
$
are variables! You’ll need to type them in the drop-down Variables box when you select a field rather than directly in the text field.Field Value Description TaskSubtype Email
Salesforce has a limited number of task subtypes, but this is the one that best reflects messages. Subject $.event
:$.properties.subject
This is what your tasks will show in Salesforce. For example: Email Sent: Subject Line
. We type a plain:
value in between the event and the subject line to make it easier to read in Salesforce.Priority Normal
Other available values are High
andLow
.Status Completed
Message events occur after the event, so the status is always completed. OwnerId This is the Salesforce User you want to associate with this task. You’ll find this in the URL of a user in Salesforce. For example: User/003TH000004n83lYAA/view
. See Finding your Owner ID for more information.WhoId $.properties.userId
This is the Salesforce Contact ID of the person your messages are for. ActivityDate $.timestamp
This is the date and time of the event.
Find your Owner ID
Salesforce tasks reference two people: the Contact or Lead that the task is for (represented by the WhoId
field) and the Salesforce user who is responsible for the task. This is the OwnerId
field that you’ll set when you set up your action.
The message events that we send to Salesforce to create tasks follow a specific format. While they contain a value representing the WhoId
of the person your messages are for, they don’t contain a value for the OwnerId
, and there’s no way to pass this value in the events.
That means that you’ll set a static OwnerId
for all of the tasks coming from Customer.io—all your tasks are owned by the same Salesforce user. It may help to create a new Salesforce user to act as the owner of all your Customer.io tasks.
In Salesforce, you’ll find a UserID in the URL when you look at a user’s profile—for example, User/003TH000004n83lYAA/view
.


Message event triggers
You’ll set up your action to create tasks in Salesforce for the different kinds of “message events” you want to capture. The process above works for all message events, but you’ll need to set up your action’s trigger with all the different message events that you want to capture in Salesforce. These are the available message events in Customer.io:
Name | Description |
---|---|
Email Drafted | Customer.io successfully rendered a message and populated liquidA syntax that supports variables, letting you personalize messages for your audience. For example, if you want to reference a person’s first name, you might use the variable {{customer.first_name}} . for an individual recipient. The message is ready to send. |
Email Attempted | An email that couldn’t be sent to the delivery provider will be retried. |
Email Deferred | An email that the delivery provider couldn’t send will be retried by the delivery provider. |
Email Sent | An email was sent from Customer.io to the delivery provider. |
Email Delivered | The delivery provider reported the email was delivered to an inbox. |
Email Opened | An email was opened. |
Email Link Clicked | A tracked link in an email was clicked. |
Email Converted | A person matched a conversion goal attributed to an email. |
Email Unsubscribed | A person unsubscribed via a particular email. |
Email Bounced | The delivery provider was unable to deliver the email. |
Email Dropped | An email wasn’t sent because it was addressed to a person who was suppressed. |
Email Marked as Spam | An email was marked as spam by the recipient. |
Email Failed | An email couldn’t be sent to the delivery provider. |
Push Drafted | Customer.io successfully rendered a push notification and populated liquidA syntax that supports variables, letting you personalize messages for your audience. For example, if you want to reference a person’s first name, you might use the variable {{customer.first_name}} . for an individual recipient. The message is ready to send. |
Push Attempted | A push notification that couldn’t be sent to the delivery provider will be retried. |
Push Sent | A push notification was sent from Customer.io to the delivery provider. |
Push Delivered | A push notification was delivered to a recipient. You must use our SDKs or report delivered metrics to us using the API. |
Push Opened | The app on a person’s device reported the push notification was opened. You must use our SDKs or report opened metrics to us using the API. |
Push Link Clicked | A tracked link in a push notification has been clicked. Note that we do not track Clicked metrics or enable link tracking for push notifications by default. When a person taps a push notification, the message is marked as Opened. If you want to track links specifically, you’d need to send this metric back to us through the metric reporting API. |
Push Converted | A person matched a conversion goal attributed to a push notification. |
Push Bounced | The delivery provider reported at least one invalid device token. |
Push Dropped | A push notification wasn’t sent because at least one device token previously bounced. |
Push Failed | A push notification couldn’t be sent to the delivery provider. |
Push Undeliverable | A push notification was undeliverable, likely because it hit a message limit. |
SMS Drafted | Customer.io successfully rendered an SMS message and populated liquidA syntax that supports variables, letting you personalize messages for your audience. For example, if you want to reference a person’s first name, you might use the variable {{customer.first_name}} . for an individual recipient. The message is ready to send. |
SMS Attempted | An SMS that couldn’t be sent to the delivery provider will be retried. |
SMS Sent | An SMS was sent from Customer.io to the delivery provider. |
SMS Delivered | The delivery provider reported the SMS was delivered. |
SMS Link Clicked | A tracked link in an SMS has been clicked. |
SMS Converted | A person matched a conversion goal attributed to an SMS. |
SMS Bounced | The delivery provider was unable to deliver the SMS. |
SMS Failed | An SMS couldn’t be sent to the delivery provider. |
SMS Undeliverable | An SMS message was undeliverable, likely because it hit a message limit. |
Slack Drafted | Customer.io successfully rendered a slack message and populated liquidA syntax that supports variables, letting you personalize messages for your audience. For example, if you want to reference a person’s first name, you might use the variable {{customer.first_name}} . for an individual recipient. The message is ready to send. |
Slack Attempted | A slack message that couldn’t be sent will be retried. |
Slack Sent | A slack message was sent from Customer.io to slack. |
Slack Link Clicked | A tracked link in a slack message has been clicked. |
Slack Failed | A slack message couldn’t be sent to slack. |
Slack Undeliverable | A Slack message was undeliverable, likely because it hit a message limit. |
Webhook Drafted | Customer.io successfully populated a webhook with liquidA syntax that supports variables, letting you personalize messages for your audience. For example, if you want to reference a person’s first name, you might use the variable {{customer.first_name}} . and is ready to send it. |
Webhook Attempted | A webhook that couldn’t be sent will be retried. |
Webhook Sent | A webhook was sent from Customer.io to the specified Webhook URL. |
Webhook Link Clicked | A tracked link in a webhook payload has been opened. |
Webhook Failed | A webhook couldn’t be sent to the specified Webhook URL. |
In-App Drafted | Customer.io successfully rendered an in-app message and is ready to send it. |
In-App Attempted | An in-app that couldn’t be sent will be retried. |
In-App Sent | An in-app was sent. |
In-App Opened | An in-app was opened. |
In-App Clicked | A tracked response in an in-app was clicked. |
In-App Converted | A person matched a conversion goal attributed to an in-app. |
In-App Failed | An in-app couldn’t be sent. |