Customer.io
Overview
Customer.io is an automated messaging platform that supports strengthens the relationship between subscription businesses and their customers by sending meaningful messages at the time they're most likely to be engaged.
Connect Customer.io and Lytics to improve the precision and personalization of your email marketing. Lytics combines historical email data with rich behavioral data from your other marketing tools. This unified data helps you create audiences to make your next email campaign personal and powerful.
Authorization
If you haven't already done so, you will need to setup a Customer.io account before you begin the process described below. In order to authorize Customer.io, you will be required to provide a Site ID and API Key which Lytics uses to send data to your account. To obtain your Site ID and API key please refer to the Customer.io documentation.
If you are new to creating authorizations in Lytics, see the Authorizations documentation for more information.
- Select Customer.io from the list of providers.
- Select the API Key method for authorization.
- Enter a Label to identify your authorization.
- (Optional) Enter a Description for further context on your authorization.
- In the Site ID text box, enter your Site ID credential.
- In the API Key text box, enter your API Key credential.
- Click Save Authorization.
Import Webhook Events
In order to import data from Customer.io, you need to setup the webhook to send event data to Lytics. This webhook sends behavioral events from Customer.io to Lytics in real-time. This activity data can then be used as targeting criteria for campaigns using Lytics audiences.
Integration Details
- Implementation Type: Server-side Integration.
- Implementation Technique: Webhook Integration.
- Frequency: Real-time Integration.
- Resulting Data: New or existing User Profiles containing Customer.io activity data as User Fields.
Before running the import webhook events job, it is expected that webhooks are set up in Customer.io to send event data to Lytics. Events will come in to a data stream called customerio
. Lytics will do some additional processing on these events and they will be added to a stream customerio_events
. From there, if the import job has been run, the incoming events will be mapped as user fields.
Fields
The following fields are included in the default mapping of the customerio_events
stream:
Source Field | Conditional | Lytics User Field | Description | Type |
---|---|---|---|---|
customer_id | cio_customer_id unique id | Customer.io ID | string | |
email(email) | email unique id | Email Address | string | |
epochms() | IF (eq(object_type, "email") AND eq(metric, "bounced")) | cio_email_last_bounced_ts | Customer.io Email Last Bounced Date | date |
epochms() | IF (eq(object_type, "email") AND eq(metric, "clicked")) | cio_email_last_clicked_ts | Customer.io Email Last Clicked Date | date |
epochms() | IF (eq(object_type, "email") AND eq(metric, "opened")) | cio_email_last_open_ts | Customer.io Email Last Open Date | date |
epochms() | IF (eq(object_type, "email") AND eq(metric, "sent")) | cio_email_last_send_ts | Customer.io Email Last Sent Date | date |
epochms() | IF (eq(object_type, "in-app") AND eq(metric, "bounced")) | cio_inapp_last_bounced_ts | Customer.io In-App Last Bounced Date | date |
epochms() | IF (eq(object_type, "in-app") AND eq(metric, "clicked")) | cio_inapp_last_clicked_ts | Customer.io In-App Last Clicked Date | date |
epochms() | IF (eq(object_type, "in-app") AND eq(metric, "opened")) | cio_inapp_last_open_ts | Customer.io In-App Last Open Date | date |
epochms() | IF (eq(object_type, "in-app") AND eq(metric, "sent")) | cio_inapp_last_send_ts | Customer.io In-App Last Sent Date | date |
epochms() | IF (eq(object_type, "push") AND eq(metric, "bounced")) | cio_push_last_bounced_ts | Customer.io Push Last Bounced Date | date |
epochms() | IF (eq(object_type, "push") AND eq(metric, "clicked")) | cio_push_last_clicked_ts | Customer.io Push Last Clicked Date | date |
epochms() | IF (eq(object_type, "push") AND eq(metric, "opened")) | cio_push_last_open_ts | Customer.io Push Last Open Date | date |
epochms() | IF (eq(object_type, "push") AND eq(metric, "sent")) | cio_push_last_send_ts | Customer.io Push Last Sent Date | date |
epochms() | IF (eq(object_type, "slack") AND eq(metric, "failed")) | cio_slack_last_bounced_ts | Customer.io Slack Last Failed Date | date |
epochms() | IF (eq(object_type, "slack") AND eq(metric, "clicked")) | cio_slack_last_clicked_ts | Customer.io Slack Last Clicked Date | date |
epochms() | IF (eq(object_type, "slack") AND eq(metric, "sent")) | cio_slack_last_send_ts | Customer.io Slack Last Sent Date | date |
epochms() | IF (eq(object_type, "sms") AND eq(metric, "bounced")) | cio_sms_last_bounced_ts | Customer.io SMS Last Bounced Date | date |
epochms() | IF (eq(object_type, "sms") AND eq(metric, "clicked")) | cio_sms_last_clicked_ts | Customer.io SMS Last Clicked Date | date |
epochms() | IF (eq(object_type, "sms") AND eq(metric, "sent")) | cio_sms_last_send_ts | Customer.io SMS Last Sent Date | date |
max(epochms()) | IF (eq(metric, "opened") OR eq(metric, "clicked")) | last_active_ts | Last Active | date |
set(campaign_id) | cio_campaign_ids | Customer.io Campaign IDs | []string | |
set(campaign_name) | cio_campaign_names | Customer.io Campaign Names | []string | |
set(journey_id) | cio_journey_ids | Customer.io Journeys | []string | |
set(object_type) | cio_channels | Customer.io Channels | []string | |
set(subject) | cio_subjects | Customer.io Subjects | []string | |
valuect(event) | cio_events | Customer.io Event Counts | map[string]intsum | |
valuect(hash(urlmain(href))) | hashedurls | Hashed Urls Visited | map[string]intsum | |
valuect(hourofday()) | IF (eq(object_type, "email") AND eq(metric, "opened")) | cio_email_hourlyopens | Customer.io Email Hourly Opens | map[string]intsum |
Configuring Webhooks in Customer.io
The following steps are required before running the import job.
- In Lytics, under Account Settings, create a new API token.
- Login to Customer.io, navigate to production, Admin > Integration and then Webhooks. In the URL textbox, enter the following URL:
https://api.lytics.io/collect/json/customerio?key=YOUR_API_TOKEN
. ReplaceYOUR_API_TOKEN
with the Lytics token you generated in the previous step.
- Click Update to save the changes.
Customer.io webhooks should now begin sending to the Lytics data stream customerio
.
Configuration
This import job simply adds the necessary queries to map the webhook data as User Fields, without running this job, raw events from the webhooks will not be processed for use in the audience builder.
Follow these steps to set up and configure an import job for Customer.io in the Lytics platform. If you are new to creating jobs in Lytics, see the Data Sourcesdocumentation for more information.
- Select Customer.io from the list of providers.
- Select the Import Activity Data job type from the list.
- Select the Authorization you would like to use or create a new one.
- Enter a Label to identify this job you are creating in Lytics.
- (Optional) Enter a Description for further context on your job.
- Select the Webhook checkbox if you have already set the webhook to point at Lytics. If you haven't learn how here.
- Click Start Import.
Shortly after running the import job you should see user fields with Customer.io events populating on user profiles in your account.
Export Users
Exporting your Lytics audiences to Customer.io will create or update user data in Customer.io.
Integration Details
- Implementation Type: Server-side Integration.
- Implementation Technique: REST API Integration - Audience Trigger Integration.
- Frequency: Real-time Integration.
- Resulting Data: Lytics users that are a member of the selected audience(s) are exported to Customer.io.
This integration utilizes Customer.io API to send user data. Once the user initiates the export job, it will send the user data that is in the selected audience. For each user to export, it will create or update the user in Customer.io with the user fields selected during configuration as attributes.
Fields
Customer.io supports the following fields as listed in their documentation:
- ID (required): which is used to identify the customer
- Email: email address for the user
- Attributes: Additional attributes that define the user.
Lytics allows you to send other user data fields as Extra Attributes in the job configuration.
Configuration
Follow these steps to set up and configure an export job for Customer.io in the Lytics platform.
- Select Customer.io from the list of providers.
- Select the Export Audiences job type from the list.
- Select the Authorization you would like to use or create a new one.
- Enter a Label to identify this job you are creating in Lytics.
- (Optional) Enter a Description for further context on your job.
- From the Audience Name input, Select the Lytics audience to export to Customer.io.
- From the Unique Identifier Field input, select the Lytics user field that will be used to identify users in Customer.io.
- From the Email field input, select the field name that contains the user's email.
- (Optional) From the Extra Attributes input, select list of extra attributes to send to customer.io.
- (Optional) Select the Existing Users checkbox to immediately trigger pushes to users who currently exist in the selected Lytics audience.
- Click Start Export.
Updated 12 months ago