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.

Integration Details

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 FieldLytics User FieldDescriptionType
emailemail unique idEmail address associated with eventstring
epochms()cio_last_open_tsCIO Last Open Datedate
max(epochms())last_active_tsLast Activedate
set(campaign_id)cio_campaign_idsSet of Campaign Ids for email associated with event[]string
set(campaign_name)cio_campaign_namesSet of Campaign Names for email associated with event[]string
set(subject)cio_subjectsSubject of email associated with event[]string
valuect(event)cio_eventsType of eventmap[string]intsum
valuect(hourofday())cio_hourlyopensCIO Hourly Opensmap[string]intsum

Configuring Webhooks in Customer.io

The following steps are required before running the import job.

  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.

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 Jobs Dashboard documentation for more information.

  1. Select Customer.io from the list of providers.
  2. Select the Import Activity Data job type from the list.
  3. Select the Authorization you would like to use or create a new one.
  4. Enter a Label to identify this job you are creating in Lytics.
  5. (Optional) Enter a Description for further context on your job.
  6. Select the Webhook checkbox if you have already set the webhook to point at Lytics. If you haven't learn how here.
  7. Click Start Import. customerio-import

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