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.
- 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 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.
The following fields are included in the default mapping of the
|Source Field||Lytics User Field||Description||Type|
|email ||Email address associated with event||string|
|epochms()||cio_last_open_ts||CIO Last Open Date||date|
|set(campaign_id)||cio_campaign_ids||Set of Campaign Ids for email associated with event||string|
|set(campaign_name)||cio_campaign_names||Set of Campaign Names for email associated with event||string|
|set(subject)||cio_subjects||Subject of email associated with event||string|
|valuect(event)||cio_events||Type of event||map[string]intsum|
|valuect(hourofday())||cio_hourlyopens||CIO 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:
YOUR_API_TOKENwith 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
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 Jobs Dashboard documentation 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.