Skip to main content
All CollectionsIntegrations
Sending data from customer.io to June
Sending data from customer.io to June
Updated yesterday

This guide explains how to send data from Customer.io to June using webhooks.

Getting started

We'll head to Customer.io first to set things up. Once you've logged in to your account, follow the steps below to add a new Webhook destination to your data pipeline.

  1. Go to the Data Pipelines tab and click Connections.

  2. Click Add New under Destinations.

  3. Select the Webhooks destination (search "webhook").

  4. (Optional) Select the sources that you want to connect to this destination. You can always connect sources to your destination later.

  5. Give your webhook a name, for example "Webhooks to June".

  6. Next review and enable your destination.

Creating write keys in June

Before we set up our webhooks, let's first create a write key in June that we'll use to send data from Customer.io to June. Navigate to your June account and follow the steps below:

  1. Navigate to Settings from the left navigation

  2. Navigate to June SDK under Data sources

  3. Click on Create new key

  4. Once the key is created click on the 3 dots on the right, and click Rename

  5. Rename the key to "customer.io" so that you can easily remember it

Setting up webhooks

Once you've added your destination, next we'll set up all the webhooks to June. The webhooks we're going to set up are:

  1. Identify

  2. Track

  3. Group

  4. Page

Identify

Let's start with Identify, follow the steps below:

  1. While staying in Data Pipelines, navigate to Destinations

  2. Select the destination you created in the previous step from the list

  3. Select the Actions tab, and click Add Action

Next we'll go through each section on that page.

Action

Don't change this, keep the action to Send

Trigger

Select the trigger to Type is Identify

Data Structure

  1. Set the URL to https://api.june.so/sdk/identify

  2. Set the HTTP method to POST

  3. Click on Add Key/Value under HTTP headers

    1. Navigate to June > Settings > June SDK and copy the write key you had created in the previous step

    2. Set the header in the following format:
      ​Authorization = Basic your-write-key

  4. Set the following key mappings in the payload

    1. userId = $.user.id

    2. anonymousId = $.anonymousId

    3. traits = $.traits

    4. timestamp = $.timestamp

    5. context = $.context

After finishing the steps above, click on Save Action.

Track

Action

Don't change this, keep the action to Send

Trigger

Select the trigger to Type is Track

Data Structure

  1. Set the URL to https://api.june.so/sdk/track

  2. Set the HTTP method to POST

  3. Click on Add Key/Value under HTTP headers

    1. Navigate to June > Settings > June SDK and copy the write key you had created in the previous step

    2. Set the header in the following format:
      ​Authorization = Basic your-write-key

  4. Set the following key mappings in the payload

    1. userId = $.userId

    2. event = $.event

    3. properties = $.properties

    4. anonymousId = $.anonymousId

    5. timestamp = $.timestamp

    6. context = $.context

After finishing the steps above, click on Save Action.

Group

Action

Don't change this, keep the action to Send

Trigger

Select the trigger to Type is Group

Data Structure

  1. Set the URL to https://api.june.so/sdk/group

  2. Set the HTTP method to POST

  3. Click on Add Key/Value under HTTP headers

    1. Navigate to June > Settings > June SDK and copy the write key you had created in the previous step

    2. Set the header in the following format:
      ​Authorization = Basic your-write-key

  4. Set the following key mappings in the payload

    1. userId = $.userId

    2. anonymousId = $.anonymousId

    3. groupId = $.groupId

    4. traits = $.traits

    5. context = $.context

    6. timestamp = $.timestamp

After finishing the steps above, click on Save Action.

Page

Action

Don't change this, keep the action to Send

Trigger

Select the trigger to Type is Page

Data Structure

  1. Set the URL to https://api.june.so/sdk/page

  2. Set the HTTP method to POST

  3. Click on Add Key/Value under HTTP headers

    1. Navigate to June > Settings > June SDK and copy the write key you had created in the previous step

    2. Set the header in the following format:
      ​Authorization = Basic your-write-key

  4. Set the following key mappings in the payload

    1. properties = $.properties

    2. userId = $.userId

    3. anonymousId = $.anonymousId

    4. timestamp = $.timestamp

    5. context = $.context

After finishing the steps above, click on Save Action.

Final steps

Once everything is setup correctly, you'll see the following Actions in Customer.io.

Click on the Tester tab to test if the webhooks are working correctly. Try once for each webhook that you created.

If the webhooks are set up correctly, you'll see the events coming into June. You can verify that by heading into June > Settings > Developer tools.

What's next?

In case you run into any issues with the set up, please reach out to us through the Intercom chat, and we'll be happy to help you πŸ™‚
​

Did this answer your question?