Skip to content

Customer.io

Customer.io is a customer engagement platform that enables businesses to send automated messages across email, push, SMS, and more.

Bruin supports Customer.io as a source for Ingestr assets, and you can use it to ingest data from Customer.io into your data warehouse.

To set up a Customer.io connection, you need to have a Customer.io API key. For more information, please refer here

Follow the steps below to correctly set up Customer.io as a data source and run ingestion:

Step 1: Add a connection to .bruin.yml file

To connect to Customer.io, you need to add a configuration item to the connections section of the .bruin.yml file. This configuration must comply with the following schema:

yaml
    connections:
      customerio:
        - name: "my_customerio"
          api_key: "YOUR_CUSTOMERIO_API_KEY"
          region: "us"
  • api_key: The API key used for authentication with the Customer.io API.
  • region: The region of your Customer.io account. Must be either us (default) or eu.

Step 2: Create an asset file for data ingestion

To ingest data from Customer.io, you need to create an asset configuration file. This file defines the data flow from the source to the destination. Create a YAML file (e.g., customerio_ingestion.yml) inside the assets folder and add the following content:

yaml
name: public.customerio
type: ingestr
connection: postgres

parameters:
  source_connection: my_customerio
  source_table: 'broadcasts'
  destination: postgres
  • name: The name of the asset.
  • type: Specifies the type of the asset. It will be always ingestr type for Customer.io.
  • connection: This is the destination connection.
  • source_connection: The name of the Customer.io connection defined in .bruin.yml.
  • source_table: The name of the data table in Customer.io you want to ingest. For example, broadcasts would ingest data related to broadcast campaigns.

Available Source Tables

TablePKInc KeyInc StrategyDetails
activitiesreplaceRetrieves account activity log.
broadcastsidupdatedmergeRetrieves broadcast campaigns.
broadcast_actionsidupdatedmergeRetrieves actions for broadcasts.
broadcast_action_metrics:periodreplaceRetrieves metrics for broadcast actions. Period: hours, days, weeks, months.
broadcast_messagesidmergeRetrieves messages sent by broadcasts.
broadcast_metrics:periodreplaceRetrieves metrics for all broadcasts. Period: hours, days, weeks, months.
campaignsidupdatedmergeRetrieves triggered campaigns.
campaign_actionsidupdatedmergeRetrieves actions for campaigns.
campaign_action_metrics:periodreplaceRetrieves metrics for campaign actions. Period: hours, days, weeks, months.
campaign_messagesidmergeRetrieves messages/deliveries sent from campaigns.
campaign_metrics:periodreplaceRetrieves metrics for all campaigns. Period: hours, days, weeks, months.
collectionsidupdated_atmergeRetrieves data collections.
customersreplaceRetrieves all customers/people in the workspace.
customer_activitiesreplaceRetrieves activities performed by each customer.
customer_attributesreplaceRetrieves attributes for each customer.
customer_messagesidmergeRetrieves messages sent to each customer.
customer_relationshipsreplaceRetrieves object relationships for each customer.
exportsidupdated_atmergeRetrieves export jobs.
info_ip_addressesreplaceRetrieves IP addresses used by Customer.io.
messagesidmergeRetrieves sent messages.
newslettersidupdatedmergeRetrieves newsletters.
newsletter_metrics:periodreplaceRetrieves metrics for all newsletters. Period: hours, days, weeks, months.
newsletter_test_groupsreplaceRetrieves test groups for newsletters.
object_typesreplaceRetrieves object types in the workspace.
objectsreplaceRetrieves all objects for each object type.
reporting_webhooksreplaceRetrieves reporting webhooks.
segmentsidupdated_atmergeRetrieves customer segments.
sender_identitiesreplaceRetrieves sender identities.
subscription_topicsreplaceRetrieves subscription topics.
transactional_messagesreplaceRetrieves transactional message templates.
workspacesreplaceRetrieves workspaces in your account.

Step 3: Run asset to ingest data

bruin run ingestr.customerio.asset.yml

As a result of this command, Bruin will ingest data from the given Customer.io table into your Postgres database.