Documentation / Product / Integrations / Customer.io

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

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 FieldLytics User FieldDescriptionType
campaign_idcio_campaign_idsCampaign Id for email associated with eventstring
campaign_namecio_campaign_namesCampaign Name for email associated with eventstring
eventcio_eventsType of eventstring
timestampcio_hourlyopensWhich hours of the day the user has opened emailstring
timestampcio_last_open_tsThe last date a user opened an emaildate
subjectcio_subjectsSubject of email associated with eventstring
emailemailEmail address associated with eventstring
timestamplast_active_tsLast Activedate

Configuring Webhooks in Customer.io

The following steps are required before running the workflow.

  1. In Lytics, under Account Settings, create a new API token.
  2. 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. Replace YOUR_API_TOKEN with the Lytics token you generated in the previous step. webhook
  3. 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.

  1. Navigate to the Integrations page and select the Customer.io tile. customer-tile-215x215
  2. Select Workflows from the menu on the left.
  3. Click New workflow.
  4. Select Import Webhook Events.
  5. Check the boxes if you have already set up the webhook.
  6. Click Start Import to begin the workflow. customerio-import

Shortly after running the workflow you should see user fields with Customer.io events populating on user profiles in your account.