# Customer.io (Actions) Destination

## Destination Info

* Accepts [Page](/docs/segment/connections/spec/page), [Group](/docs/segment/connections/spec/group), [Identify](/docs/segment/connections/spec/identify), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **Actions Customerio**, **Customer.io Actions**, **Customer.io (Actions)** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)
* This integration is **partner owned.** Please reach out to the partner's support for any issues.

> \[!NOTE]
>
> This page is about the Customer.io (Actions) Destination. See below for information about other versions of the Customer.io destination:
>
> * [Customer.io (Classic)](/docs/segment/connections/destinations/catalog/customer-io)

[Customer.io](https://customer.io/) lets you send automated email, push, SMS, letters, and webhooks based on your customer's activities in your app or product. It makes conversion tracking, optimization and remarketing easier.

## Benefits of Customer.io (Actions) vs Customer.io Classic

**Track an anonymous event**: Track events from users who are not yet known to Customer.io. If you have the Customer.io *event merging* feature enabled, Customer.io associates all incoming events that share an `anonymous_id` received in the last 30 days.

## Getting started

1. From the Segment web app, click **Catalog**, then click **Destinations**.
2. Find the Destinations Actions item in the left navigation, and click it.
3. Select Customer.io (Actions).
4. Click **Configure Actions Customer.io**.
5. Select an existing Source to connect to Customer.io (Actions).
6. Enter the **API Key** and **Site ID**. Find these values on the [Customer.io API Credentials Page](https://fly.customer.io/settings/api_credentials).
7. Select **Quick Setup** to start with pre-populated subscriptions, or **Customized Setup** to configure each action from scratch. Click **Configure Actions**.

## Destination Settings

| Field          | Description                                                                                                                 | Required | Type     |
| -------------- | --------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| Account Region | Learn about \[Account Regions]\(https://customer.io/docs/data-centers/).                                                    | No       | select   |
| API Key        | Customer.io API key. This can be found on your \[API Credentials page]\(https://fly.customer.io/settings/api\_credentials). | Yes      | password |
| Site ID        | Customer.io site ID. This can be found on your \[API Credentials page]\(https://fly.customer.io/settings/api\_credentials). | Yes      | password |

## Available Presets

Customer.io (Actions) has the following presets

| Preset Name             | Trigger                                                                                                                                                                                                                                                                                                                                                                 | Default Action          |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| Create or Update Object | Event type = "group"                                                                                                                                                                                                                                                                                                                                                    | Create or Update Object |
| Report Delivery Event   | Event event = "Report Delivery Event"                                                                                                                                                                                                                                                                                                                                   | Report Delivery Event   |
| Track Event             | Event &#xA;        type = "track"&#xA;        and event != "Relationship Deleted"&#xA;        and event != "User Deleted"&#xA;        and event != "User Suppressed"&#xA;        and event != "User Unsuppressed"&#xA;        and event != "Object Deleted"&#xA;        and event != "Report Delivery Event"&#xA;        and event != "Report Content Event"&#xA;       | Track Event             |
| Create or Update Device | Event event = "Application Installed", Event  event = "Application Opened"                                                                                                                                                                                                                                                                                              | Create or Update Device |
| Report Content Event    | Event event = "Report Content Event"                                                                                                                                                                                                                                                                                                                                    | Report Content Event    |
| Create or Update Person | Event type = "identify"                                                                                                                                                                                                                                                                                                                                                 | Create or Update Person |
| Track Screen View       | Event type = "screen"                                                                                                                                                                                                                                                                                                                                                   | Track Screen View       |
| Track Page View         | Event type = "page"                                                                                                                                                                                                                                                                                                                                                     | Track Page View         |

## Available Actions

Build your own Mappings. Combine supported [triggers](/docs/segment/connections/destinations/actions/#components-of-a-destination-action) with the following Customer.io-supported actions:

> \[!NOTE]
>
> Individual destination instances have support a maximum of 50 mappings.

* [Create or Update Person](#create-or-update-person-1)
* [Track Event](#track-event-38)
* [Create or Update Device](#create-or-update-device)
* [Track Page View](#track-page-view-4)
* [Delete Device](#delete-device)
* [Track Screen View](#track-screen-view)
* [Create or Update Object](#create-or-update-object-1)
* [Delete Relationship](#delete-relationship)
* [Unsuppress Person](#unsuppress-person)
* [Merge People](#merge-people)
* [Delete Object](#delete-object)
* [Suppress Person](#suppress-person)
* [Delete Person](#delete-person)
* [Report Delivery Event](#report-delivery-event)
* [Report Content Event](#report-content-event)

### Create or Update Person

Create a person in Customer.io or update them if they exist.

Create or Update Person is a **Cloud** action. The default Trigger is `type = "identify"`

| Field                   | Description                                                                                                                                      | Required | Type    |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| Person ID               | The ID used to uniquely identify a person in Customer.io. \[Learn more]\(https://customer.io/docs/identifying-people/#identifiers).              | No       | STRING  |
| Anonymous ID            | An optional anonymous ID. This is used to tie anonymous events to this person. \[Learn more]\(https://customer.io/docs/anonymous-events/).       | No       | STRING  |
| Email Address           | The person's email address.                                                                                                                      | No       | STRING  |
| Created At              | A timestamp of when the person was created.                                                                                                      | No       | STRING  |
| Object ID               | The ID used to uniquely identify an object in Customer.io. \[Learn more]\(https://customer.io/docs/object-relationships).                        | No       | STRING  |
| Person Attributes       | Optional attributes for the person. When updating a person, attributes are added or updated, not removed.                                        | No       | OBJECT  |
| Relationship Attributes | Optional attributes for the relationship between the object and the user. When updating an object, attributes are added or updated, not removed. | No       | OBJECT  |
| Timestamp               | A timestamp of when the person was identified. Default is current date and time. Used for ordering updates to the person.                        | No       | STRING  |
| Convert Timestamps      | Convert dates to Unix timestamps (seconds since Epoch).                                                                                          | No       | BOOLEAN |
| Object Type Id          | The ID used to uniquely identify a custom object type in Customer.io. \[Learn more]\(https://customer.io/docs/object-relationships).             | No       | STRING  |
| Enable Batching         | Set as true to ensure Segment sends data to Customer.io in batches.                                                                              | No       | BOOLEAN |
| Batch Size              | Maximum number of events to include in each batch. Actual batch sizes may be lower.                                                              | No       | NUMBER  |

### Track Event

Track an event for a known or anonymous person.

Track Event is a **Cloud** action. The default Trigger is `     type = "track"
    and event != "Relationship Deleted"
    and event != "User Deleted"
    and event != "User Suppressed"
    and event != "User Unsuppressed"
    and event != "Group Deleted"
    and event != "Report Delivery Event"
  `

| Field              | Description                                                                                                                         | Required | Type    |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
| Person ID          | The ID used to uniquely identify a person in Customer.io. \[Learn more]\(https://customer.io/docs/identifying-people/#identifiers). | No       | STRING  |
| Anonymous ID       | An anonymous ID for when no Person ID exists. \[Learn more]\(https://customer.io/docs/anonymous-events/).                           | No       | STRING  |
| Event Name         | The name of the event.                                                                                                              | Yes      | STRING  |
| Event ID           | An optional identifier used to deduplicate events. \[Learn more]\(https://customer.io/docs/api/#operation/track).                   | No       | STRING  |
| Timestamp          | A timestamp of when the event took place. Default is current date and time.                                                         | No       | STRING  |
| Event Attributes   | Optional data to include with the event.                                                                                            | No       | OBJECT  |
| Convert Timestamps | Convert dates to Unix timestamps (seconds since Epoch).                                                                             | No       | BOOLEAN |
| Enable Batching    | Set as true to ensure Segment sends data to Customer.io in batches.                                                                 | No       | BOOLEAN |
| Batch Size         | Maximum number of events to include in each batch. Actual batch sizes may be lower.                                                 | No       | NUMBER  |

### Create or Update Device

Create or update a person's device.

Create or Update Device is a **Cloud** action. The default Trigger is `type = "track" and event = "Application Installed"`

| Field              | Description                                                                                                          | Required | Type    |
| ------------------ | -------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
| Person ID          | The ID of the person that this mobile device belongs to.                                                             | Yes      | STRING  |
| Device ID          | The device token of a customer's mobile device.                                                                      | Yes      | STRING  |
| App Version        | The version of the App                                                                                               | No       | STRING  |
| Platform           | The mobile device's platform. ("ios" or "android")                                                                   | Yes      | STRING  |
| Last Used          | The timestamp for when the mobile device was last used. Default is current date and time.                            | No       | STRING  |
| Event Attributes   | Optional data that you can reference to segment your audience, like a person's attributes, but specific to a device. | No       | OBJECT  |
| Convert Timestamps | Convert dates to Unix timestamps (seconds since Epoch).                                                              | No       | BOOLEAN |
| Enable Batching    | Set as true to ensure Segment sends data to Customer.io in batches.                                                  | No       | BOOLEAN |
| Batch Size         | Maximum number of events to include in each batch. Actual batch sizes may be lower.                                  | No       | NUMBER  |

### Track Page View

Track a page view for a known or anonymous person.

Track Page View is a **Cloud** action. The default Trigger is `type = "page"`

| Field              | Description                                                                                                                         | Required | Type    |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
| Person ID          | The ID used to uniquely identify a person in Customer.io. \[Learn more]\(https://customer.io/docs/identifying-people/#identifiers). | No       | STRING  |
| Anonymous ID       | An anonymous ID for when no Person ID exists. \[Learn more]\(https://customer.io/docs/anonymous-events/).                           | No       | STRING  |
| Event ID           | An optional identifier used to deduplicate events. \[Learn more]\(https://customer.io/docs/api/#operation/track).                   | No       | STRING  |
| Page URL           | The URL of the page visited.                                                                                                        | Yes      | STRING  |
| Timestamp          | A timestamp of when the event took place. Default is current date and time.                                                         | No       | STRING  |
| Event Attributes   | Optional data to include with the event.                                                                                            | No       | OBJECT  |
| Convert Timestamps | Convert dates to Unix timestamps (seconds since Epoch).                                                                             | No       | BOOLEAN |
| Enable Batching    | Set as true to ensure Segment sends data to Customer.io in batches.                                                                 | No       | BOOLEAN |
| Batch Size         | Maximum number of events to include in each batch. Actual batch sizes may be lower.                                                 | No       | NUMBER  |

### Delete Device

Delete a person's device.

Delete Device is a **Cloud** action. The default Trigger is `event = "Application Uninstalled" or event = "Device Deleted"`

| Field           | Description                                                                         | Required | Type    |
| --------------- | ----------------------------------------------------------------------------------- | -------- | ------- |
| Person ID       | The ID of the person that this mobile device belongs to.                            | Yes      | STRING  |
| Device ID       | The device token of a customer's mobile device.                                     | Yes      | STRING  |
| Enable Batching | Set as true to ensure Segment sends data to Customer.io in batches.                 | No       | BOOLEAN |
| Batch Size      | Maximum number of events to include in each batch. Actual batch sizes may be lower. | No       | NUMBER  |

### Track Screen View

Track a screen view for a known or anonymous person.

Track Screen View is a **Cloud** action. The default Trigger is `type = "screen"`

| Field              | Description                                                                                                                         | Required | Type    |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
| Person ID          | The ID used to uniquely identify a person in Customer.io. \[Learn more]\(https://customer.io/docs/identifying-people/#identifiers). | No       | STRING  |
| Anonymous ID       | An anonymous ID for when no Person ID exists. \[Learn more]\(https://customer.io/docs/anonymous-events/).                           | No       | STRING  |
| Event ID           | An optional identifier used to deduplicate events. \[Learn more]\(https://customer.io/docs/api/#operation/track).                   | No       | STRING  |
| Screen name        | The name of the screen visited.                                                                                                     | Yes      | STRING  |
| Timestamp          | A timestamp of when the event took place. Default is current date and time.                                                         | No       | STRING  |
| Event Attributes   | Optional data to include with the event.                                                                                            | No       | OBJECT  |
| Convert Timestamps | Convert dates to Unix timestamps (seconds since Epoch).                                                                             | No       | BOOLEAN |
| Enable Batching    | Set as true to ensure Segment sends data to Customer.io in batches.                                                                 | No       | BOOLEAN |
| Batch Size         | Maximum number of events to include in each batch. Actual batch sizes may be lower.                                                 | No       | NUMBER  |

### Create or Update Object

Create an object in Customer.io or update them if they exist.

Create or Update Object is a **Cloud** action. The default Trigger is `type = "group"`

| Field                   | Description                                                                                                                                            | Required | Type    |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| Object ID               | The ID used to uniquely identify an object in Customer.io. \[Learn more]\(https://customer.io/docs/object-relationships).                              | Yes      | STRING  |
| Created At              | A timestamp of when the object was created.                                                                                                            | No       | STRING  |
| Object Attributes       | Optional attributes for the object. When updating an object, attributes are added or updated, not removed.                                             | No       | OBJECT  |
| Relationship Attributes | Optional attributes for the relationship between the object and the user. When updating an relationship, attributes are added or updated, not removed. | No       | OBJECT  |
| User ID                 | The ID used to relate a user to an object in Customer.io. \[Learn more]\(https://customer.io/docs/identifying-people/#identifiers).                    | No       | STRING  |
| Anonymous ID            | An anonymous ID to relate to an object when no Person ID exists. \[Learn more]\(https://customer.io/docs/anonymous-events/).                           | No       | STRING  |
| Object Type Id          | The ID used to uniquely identify a custom object type in Customer.io. \[Learn more]\(https://customer.io/docs/object-relationships).                   | No       | STRING  |
| Convert Timestamps      | Convert dates to Unix timestamps (seconds since Epoch).                                                                                                | No       | BOOLEAN |
| Enable Batching         | Set as true to ensure Segment sends data to Customer.io in batches.                                                                                    | No       | BOOLEAN |
| Batch Size              | Maximum number of events to include in each batch. Actual batch sizes may be lower.                                                                    | No       | NUMBER  |

### Delete Relationship

Delete a relationship between a person and an object in Customer.io.

Delete Relationship is a **Cloud** action. The default Trigger is `event = "Relationship Deleted"`

| Field           | Description                                                                                                                                | Required | Type    |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------- |
| Person ID       | The ID of the person that this mobile device belongs to.                                                                                   | Yes      | STRING  |
| Anonymous ID    | An optional anonymous ID. This is used to tie anonymous events to this person. \[Learn more]\(https://customer.io/docs/anonymous-events/). | No       | STRING  |
| Object ID       | An object ID used to identify an object.                                                                                                   | Yes      | STRING  |
| Object Type ID  | An object ID type used to identify the type of object.                                                                                     | No       | STRING  |
| Enable Batching | Set as true to ensure Segment sends data to Customer.io in batches.                                                                        | No       | BOOLEAN |
| Batch Size      | Maximum number of events to include in each batch. Actual batch sizes may be lower.                                                        | No       | NUMBER  |

### Unsuppress Person

Unsuppress a person in Customer.io. This will allow the person to receive messages again.

Unsuppress Person is a **Cloud** action. The default Trigger is `event = "User Unsuppressed"`

| Field           | Description                                                                         | Required | Type    |
| --------------- | ----------------------------------------------------------------------------------- | -------- | ------- |
| Person ID       | The ID of the person that this mobile device belongs to.                            | Yes      | STRING  |
| Enable Batching | Set as true to ensure Segment sends data to Customer.io in batches.                 | No       | BOOLEAN |
| Batch Size      | Maximum number of events to include in each batch. Actual batch sizes may be lower. | No       | NUMBER  |

### Merge People

Merge two customer profiles together.

Merge People is a **Cloud** action. The default Trigger is `type = "alias"`

| Field           | Description                                                                                                                                                                           | Required | Type    |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
| Primary User    | The person that you want to remain after the merge, identified by id, email or cio\_id. This person receives information from the secondary person in the merge.                      | Yes      | STRING  |
| Secondary User  | The person that you want to delete after the merge, identified by id, email or cio\_id. This person's information is merged into the primary person's profile and then it is deleted. | Yes      | STRING  |
| Enable Batching | Set as true to ensure Segment sends data to Customer.io in batches.                                                                                                                   | No       | BOOLEAN |
| Batch Size      | Maximum number of events to include in each batch. Actual batch sizes may be lower.                                                                                                   | No       | NUMBER  |

### Delete Object

Delete an object in Customer.io.

Delete Object is a **Cloud** action. The default Trigger is `event = "Object Deleted"`

| Field           | Description                                                                         | Required | Type    |
| --------------- | ----------------------------------------------------------------------------------- | -------- | ------- |
| Object ID       | An object ID used to identify an object.                                            | No       | STRING  |
| Object Type ID  | An object ID type used to identify the type of object.                              | No       | STRING  |
| Enable Batching | Set as true to ensure Segment sends data to Customer.io in batches.                 | No       | BOOLEAN |
| Batch Size      | Maximum number of events to include in each batch. Actual batch sizes may be lower. | No       | NUMBER  |

### Suppress Person

Suppress a person in Customer.io. This will prevent the person from receiving any messages.

Suppress Person is a **Cloud** action. The default Trigger is `event = "User Suppressed"`

| Field           | Description                                                                         | Required | Type    |
| --------------- | ----------------------------------------------------------------------------------- | -------- | ------- |
| Person ID       | The ID of the person that this mobile device belongs to.                            | Yes      | STRING  |
| Enable Batching | Set as true to ensure Segment sends data to Customer.io in batches.                 | No       | BOOLEAN |
| Batch Size      | Maximum number of events to include in each batch. Actual batch sizes may be lower. | No       | NUMBER  |

### Delete Person

Delete a person in Customer.io.

Delete Person is a **Cloud** action. The default Trigger is `event = "User Deleted"`

| Field           | Description                                                                         | Required | Type    |
| --------------- | ----------------------------------------------------------------------------------- | -------- | ------- |
| Person ID       | The ID of the person that this mobile device belongs to.                            | Yes      | STRING  |
| Enable Batching | Set as true to ensure Segment sends data to Customer.io in batches.                 | No       | BOOLEAN |
| Batch Size      | Maximum number of events to include in each batch. Actual batch sizes may be lower. | No       | NUMBER  |

### Report Delivery Event

Report delivery metrics for a message sent from the Customer.io Journeys product.

Report Delivery Event is a **Cloud** action. The default Trigger is `event = "Report Delivery Event"`

| Field           | Description                                                                                                                                                                                                           | Required | Type     |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| Delivery ID     | The CIO-Delivery-ID from the message that you want to associate the metric with.                                                                                                                                      | Yes      | STRING   |
| Metric          | The metric you want to report back to Customer.io. Not all metrics are available for all channels. Please refer to the \[documentation]\(https://customer.io/docs/api/track/#operation/metrics) for more information. | Yes      | STRING   |
| Recipient       | Information about who the message was delivered to. For email, SMS and mobile push this is the email address, phone number and device token, respectively.                                                            | No       | STRING   |
| Reason          | For metrics indicating a failure, this field provides information for the failure.                                                                                                                                    | No       | STRING   |
| Href            | For click metrics, this is the link that was clicked.                                                                                                                                                                 | No       | STRING   |
| Action Name     | For In-App messages, this is the name of the action that was clicked.                                                                                                                                                 | No       | STRING   |
| Action Value    | For In-App messages, this is the value of the action that was clicked.                                                                                                                                                | No       | STRING   |
| Timestamp       | A timestamp of when the metric event took place. Default is when the event was triggered.                                                                                                                             | No       | DATETIME |
| Enable Batching | Set as true to ensure Segment sends data to Customer.io in batches.                                                                                                                                                   | No       | BOOLEAN  |
| Batch Size      | Maximum number of events to include in each batch. Actual batch sizes may be lower.                                                                                                                                   | No       | NUMBER   |

### Report Content Event

Report a Viewed or Clicked Content event.

Report Content Event is a **Cloud** action. The default Trigger is `event = "Report Content Event"`

| Field              | Description                                                                         | Required | Type    |
| ------------------ | ----------------------------------------------------------------------------------- | -------- | ------- |
| Anonymous ID       | ID for the anonymous user.                                                          | No       | STRING  |
| Action Type        | The type of content event.                                                          | Yes      | STRING  |
| Timestamp          | A timestamp of when the event took place. Default is current date and time.         | No       | STRING  |
| Event Attributes   | Optional data to include with the event.                                            | No       | OBJECT  |
| Convert Timestamps | Convert dates to Unix timestamps (seconds since Epoch).                             | No       | BOOLEAN |
| Enable Batching    | Set as true to ensure Segment sends data to Customer.io in batches.                 | No       | BOOLEAN |
| Batch Size         | Maximum number of events to include in each batch. Actual batch sizes may be lower. | No       | NUMBER  |

## Migration from Customer.io classic

Keep the following in mind if you plan to move to Customer.io (Actions) from the classic Customer.io destination.

### Customer-io settings mappings

#### CONNECTION SETTINGS

* **API Key** (CLOUD, DEVICE-WEB):
  * Set the API key as a connection setting during initial configuration, or on the Settings tab.
* **Customer.io Datacenter** (CLOUD, DEVICE-WEB):
  * Select the Account Region in Connection Settings.
* **Site ID** (CLOUD, DEVICE-WEB):
  * Set the Site ID as a connection setting during initial configuration, or on the Settings tab.
* **Connection Mode** (CLOUD, DEVICE-WEB):
  * Customer.io (Actions) supports cloud-mode.

## Convert timestamps

When you map some actions, you'll see a **Convert Timestamps** setting. This setting is on by default, and converts traits containing ISO-8601 timestamps to Unix timestamps (seconds since epoch). Segment recommends that you leave this setting enabled. While Segment does support ISO-8601 timestamps in liquid, you must use Unix timestamps to take advantage of timestamp conditions when segmenting your audience in Customer.io.

For example, if you send an event with a `purchase_time` trait of `2006-01-02T18:04:07Z`, Customer.io converts it to `1136253847`. If the timestamp is *not* in ISO-8601 format, Customer.io doesn't convert it. This avoids inadvertently converting values like phone numbers or IDs.

Customer.io makes an exception for the `created_at` trait, converting ISO-8601 timestamps or any values supported by JavaScript `Date` objects to Unix timestamps.

## Device token collection

Segment does not automatically collect push notification tokens. These parameters are required by Customer.io, requiring logic to be implemented to collect these values. As an example, you can use [this plugin](https://github.com/segmentio/analytics-react-native/tree/master/packages/plugins/plugin-device-token) to collect the Firebase Cloud Messaging device token for React Native.

## In-app messaging

The Customer.io Actions destination is built and maintained by Segment's partner Customer.io, and does not currently support [in-app messaging](https://customer.io/docs/journeys/in-app-getting-started/#javascript-snippet). Segment recommends reaching out to them to express your interest in using in-app messaging with the Segment integration.
