Customer.io

The Switchboard Customer.io connector provides automated ingestion of various marketing reports from customer.io.

For full details on the API parameters, please consult the customer.io API documentation

Prerequisites

API token
created through the API UI

Note that there are multiples workspaces you can select when creating the API KEY, so in order to get all the information for all the different workspaces, you need to create one for each workspace and then perform a UNION of all the information retrieved.

Note that API access may be restricted by IP Address, though by default, access to the API is not restricted by IP address.

For more information, see the Custom.io documentation on managing credentials

Scheduling

The Customer.io connectors can be scheduled to ingest data once per day at a user-defined hour and timezone.

By default, the connector will run once at 6am PT. See Daily Scheduling for more information.

Customer Report

Get customers and their attributes via the api/customers/attributes endpoint.

Use the type customerio:customers in your SBS to execute this connector.

Sample Switchboard Script

download t from {
    type: "customerio:customers";
    key: "customerio_key";
} using {*};

Newsletter Report

Get customers and their attributes via the getNewsletterMetrics endpoint.

See the getNewsletterMetric endpoint documentation for further details.

Use the type customerio:newsletters in your SBS to execute this connector.

Sample Switchboard Script

download t from {
    type: "customerio:newsletters";
    key: "customerio_key";

    // optional, see https://customer.io/docs/api/#operation/getNewsletterMetrics
    metric_type: "push";
    
    // optional, defaults to false, see https://customer.io/docs/api/#operation/getNewsletterLinks
    unique_links: true;

    // optional, applies to both newsletter and link metrics, so see both
    // https://customer.io/docs/api/#operation/getNewsletterMetrics and
    // https://customer.io/docs/api/#operation/getNewsletterLinks
    period: "days";
    steps: 15;
} using {*};

Parameters

metric_type
The type of item you want to return campaign metrics for. When empty, the response contains metrics for all possible types. Optional.

Enum values:

  • email
  • webhook
  • twilio
  • urban_airship
  • slack
  • push
period
The unit of time for your report. Optional. Default: days

Enum values:

  • hours
  • days
  • weeks
  • months
steps
The number of periods you want to return. Optional. Defaults to the maximum available, or 12 if the period is in months. Maximums are 24 hours, 45 days, 12 weeks, or 120 months.
unique_links
optional, defaults to false

Campaigns Report

Get customers and their attributes via the campaignMetrics endpoint.

See the campaignMetrics endpoint documentation for further details.

Use the type customerio:campaigns in your SBS to execute this connector.

Sample Switchboard Script

download t from {
    type: "customerio:campaigns";
    key: "customerio_key";

    // optional, see https://customer.io/docs/api/#operation/campaignMetrics
    metric_type: "push";
    
    // optional, defaults to false, see https://customer.io/docs/api/#operation/campaignLinkMetrics
    unique_links: true;

    // optional, applies to both newsletter and link metrics, so see both
    // https://customer.io/docs/api/#operation/campaignMetrics and
    // https://customer.io/docs/api/#operation/campaignLinkMetrics
    period: "days";
    steps: 15;
} using {*};

Parameters

metric_type
The type of item you want to return campaign metrics for. When empty, the response contains metrics for all possible types. Optional.

Enum values:

  • email
  • webhook
  • twilio
  • urban_airship
  • slack
  • push
period
The unit of time for your report. Optional. Default: days

Enum values:

  • hours
  • days
  • weeks
  • months
steps
The number of periods you want to return. Optional. Defaults to the maximum available, or 12 if the period is in months. Maximums are 24 hours, 45 days, 12 weeks, or 120 months.
unique_links
optional, defaults to false

Customer Export Report

Get customers and their attributes via the exportPeopleData endpoint.

See the exportPeopleData endpoint documentation for further details.

Use the type customerio:customers_export in your SBS to execute this connector.

Sample Switchboard Script

download t from {
    // See https://customer.io/docs/api/#operation/exportPeopleData
    type: "customerio:customers_export";
    key: "customerio_key";
    
    segments: ["Email Activity - Sent", "Email Activity - Opens", "Email Activity - Clicks"];
}

Parameters

segments
Segments are groups of people, subsets of your audience. You get get information about segments and the customers contained by a segment. You can also create or delete manual segments through the API. Use the UI to create, update, or delete data-driven segments.

For more information see the documentation on Segments in the customer.io API

Delivery Data Export Report

Get customers and their attributes via the exportDeliveriesData endpoint.

For more information see the documentation on the exportDeliveriesData endpoint documentation for further details.

Use the type customerio:deliveries_export in your SBS to execute this connector.

Sample Switchboard Script

download t from {
// See https://customer.io/docs/api/#operation/exportDeliveriesData
type: "customerio:deliveries_export";
key: "customerio_key";
}