Customer.io: 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. This document covers the following topics:
Integration Details
- Implementation Type: Server-side.
- Implementation Technique: Webhooks.
- Frequency: Real-time.
- Resulting Data: New or existing user profiles containing Customer.io activity data as user fields.
Before running the import webhook events workflow, 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 workflow 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 | Lytics User Field | Description | Type |
---|---|---|---|
campaign_id | cio_campaign_ids | Campaign Id for email associated with event | string |
campaign_name | cio_campaign_names | Campaign Name for email associated with event | string |
event | cio_events | Type of event | string |
timestamp | cio_hourlyopens | Which hours of the day the user has opened email | string |
timestamp | cio_last_open_ts | The last date a user opened an email | date |
subject | cio_subjects | Subject of email associated with event | string |
Email address associated with event | string | ||
timestamp | last_active_ts | Last Active | date |
Configuring Webhooks in Customer.io
The following steps are required before running the workflow.
- 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
.
Workflow Configuration
This workflow simply adds the necessary queries to map the webhook data as user fields, without running this workflow, raw events from the webhooks will not be processed for use in the audience builder.
- Navigate to the Integrations page and select the Customer.io tile.
- Select Workflows from the menu on the left.
- Click New workflow.
- Select Import Webhook Events.
- Check the boxes if you have already set up the webhook.
- Click Start Import to begin the workflow.
Shortly after running the workflow you should see user fields with Customer.io events populating on user profiles in your account.