> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hightouch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer.io

> Deliver exceptional engagement campaigns using the freshest customer data from your warehouse

## Overview

You want to provide relevant, timely interactions to your customers. Doing so means that data in your Customer.io account needs to be as accurate and fresh as possible. By syncing customer data directly from your data warehouse into Customer.io, you no longer need to worry about data consistency.

## Supported syncing

| Sync Type | Description | Supported Sync Modes |
| - | - | - |
| **Customers** | Sync data from any source to customer objects | Upsert, Update |
| **Events** | Sync data from any source as customer events | Insert |
| **Segments** | Sync data from any source to new or existing segments | Insert |
| **Objects** | Sync data from any source to custom objects | Upsert, Update |

## Connect to Customer.io

To give Hightouch access to Customer.io, you need to enter:

* tracking site ID
* tracking API key
* app API key
* the region of your Customer.io account

Follow the instructions in the [following sections](#retrieve-tracking-site-id-and-api-key) to retrieve your site ID and API keys.

If you restrict access to your Customer.io workspaces by IP address, you need to add the [Hightouch IP Addresses](https://docs.hightouch.com/security/networking#ip-addresses) to your **IP Address Allowlist**.

![IP Allowlist](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-customerio-ip-allowlist.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=494984c6884df0e1bb268ac9857342da)

If you see "**Any IP address is currently able to access the App API for all workspaces.**" in your Customer.io configuration, it means you can skip this step.

### Retrieve tracking site ID and API key

1. Navigate to your [Account Settings](https://fly.customer.io/settings) and [Manage API Credentials](https://fly.customer.io/settings/api_credentials?keyType=tracking) page.
2. Under **Tracking API Keys**, copy a pre-created **Site ID** and **API Key**, or create a new one to use for Hightouch.

![Tracking Credentials Page](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-customerio-tracking-api-key.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=bb137c24ec0884101c020351d5b5f4a5)

### Retrieve app API key

1. Navigate to your [Account Settings](https://fly.customer.io/settings) and to the App API Keys tab under the [Manage API Credentials](https://fly.customer.io/settings/api_credentials?keyType=app) page.
2. Create an **App API Key** and assign it to the appropriate workspace, for example "Hightouch."

![App Credentials Page](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destination-customerio-app-api-key.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=18531b59d5f58db8133ca7854a5ccdc9)

## Syncing data

### Customers

Sync data from any source to [customer objects](https://www.customer.io/docs/api/#tag/Track-Customers).

#### Record matching

You can match rows in your model with users in Customer.io on the following fields:

* Customer.io External ID
* Email
* CIO ID

#### Field mapping

You can sync columns from your source to Customer.io customer attributes. If the customer attribute doesn't exist, Hightouch creates it.

#### Delete behavior

In **Upsert** mode, you have the following options for how Hightouch should handle rows leaving your query results:

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the customer in Customer.io |
| **Clear Fields** | Clear the mapped fields but keep the customer record |
| **Delete Destination Record** | Delete the customer record from Customer.io completely |

In **Update** mode, you have the following options for how Hightouch should handle rows leaving your query results:

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the customer in Customer.io |
| **Clear Fields** | Clear the mapped fields but keep the customer record |

### Objects

Sync data from any source to [custom objects](https://docs.customer.io/api/track/#section/Identify-object).

#### Record matching

You can match rows in your model with objects in Customer.io on the `Object ID` field

#### Field mapping

You can sync columns from your source to Customer.io object attributes. If the object attribute doesn't exist, Hightouch creates it.

#### Relationships

You can create relationships from each object synced to a customer in Customer.io. You can create relationships to the following fields:

* Customer.io External ID
* Email
* CIO ID

#### Delete behavior

You have the following options for how Hightouch should handle rows leaving your query results:

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the object in Customer.io |
| **Delete destination record** | Delete the object record from Customer.io completely |

#### Record matching

You can match rows in your model with users in Customer.io on the following fields:

* Customer.io External ID
* Email
* CIO ID

### Events

You can sync the following [customer event](https://www.customer.io/docs/api/#operation/track) types:

* **Track event**
* **Track page views**
* **Track mobile screen views**

> [!WARNING]
>
> To ensure syncs send each event, your event model must use a truly unique [primary key](https://docs.hightouch.com/getting-started/concepts.md#unique-primary-key-requirement). See the [events syncs](https://docs.hightouch.com/syncs/types-and-modes.md#event-syncs) documentation for more information.

#### Event name

Provide an event name. This is how you can reference the event in Customer.io campaigns or segments.

#### Event ID (optional)

Event ID is an identifier Customer.io uses to de-duplicate events. If provided and an event has the same value as previously synced event, Hightouch doesn't process the duplicate event.

#### User ID

A User ID is a unique value representing a user. You may identify a user by ID, email address, or Customer.io ID.

If you wish to sync the events as [*anonymous*](https://www.customer.io/docs/api/#operation/trackAnonymous), you can skip providing a User ID and provide an Anonymous ID instead.

#### Event timestamp

Provide a timestamp of when the event occurred. If this field is empty, Hightouch uses the time the event arrives at the server.

Any `DateTime` value provided from your source is converted to Unix timestamp as expected by Customer.io.

#### Field mapping

You can sync columns from your source to Customer.io customer attributes. If the customer attribute doesn't exist, Hightouch creates it.

### Segments

Sync data from any source to [new or existing segments](https://www.customer.io/docs/api/#tag/Track-Segments).

#### User identifiers

You can match rows in your model with users in Customer.io on the following fields:

* Customer.io External ID
* Email
* CIO ID

#### Create a segment

* To create a new mailing list, select `Create a new segment`.
* You can provide a name for this segment, or Hightouch use the name of the model used to create the sync.

#### Use an existing segment

* To use an existing mailing list, select `Use existing segment`.
* You can select any of your existing Customer.io segments from the drop-down select menu.

## Tips and troubleshooting

To see the exact API requests and responses from each sync run, use the [live debugger](https://docs.hightouch.com/syncs/debugger.md). To get notified by Slack, PagerDuty, SMS, or email when a sync fails, set up [sync alerts](https://docs.hightouch.com/syncs/alerting.md). If you run into an issue this page doesn't cover, [contact support](#pylon-chat).
