Customer.io

Customer.io is an automated cloud messaging platform for marketing automation that allows crafting and sending data-driven emails, push notifications, and SMS messages. Skyvia uses Customer.io App API.

Data integration: Skyvia supports importing data to and from Customer.io, exporting Customer.io data to CSV files, replicating Customer.io data to relational databases, and synchronizing Customer.io data with other cloud apps and relational databases.

Backup: Skyvia Backup does not support Customer.io backup.

Query: Skyvia Query supports Customer.io.

Establishing Connection

To establish a connection, you need to select your account region and specify your app API key, Tracking API key, and Site ID. Skyvia uses Tracking API for working with the Customers object data, and APP API - for other objects.

Getting Credentials

You can manage your API keys in your Customer.io account settings. See Customer.io documentation for more information. Note that you need both Tracking API Key and App API Key.

Note that you cannot view an existing App API key. If you don’t have one, you will need to create a new API Key.

To create a new app API key perform the following steps:

  1. Sign in to Customer.io and open the API Credentials section of Customer.io Account Settings. You can either use this link or click Settings -> Account Settings and then click API Credentials.
  2. On the App API Keys tab, click Create App API Key.

    Customer.io APP API keys

  3. Enter the API Key Name, for example, Skyvia and select Workspace.
  4. Click the Create App API Key button in the corresponding row of the App API Keys grid. The created API key is displayed.

    Copy Customer.io API key

  5. Copy and save your API Key. Note that this is the only time you can obtain it, and if you lose it, you will need to create a new one.

To create a new tracking API key, switch to the Tracking API tab and perform the following steps:

  1. Click Create Tracking API Key.
  2. Enter the API Key Name, for example, Skyvia and select Workspace.

    Customer.io Tracking API keys

  3. Copy and save your tracking API Key and Site Id. Note that this is the only time you can obtain it, and if you lose it, you will need to create a new one.

Customer.io allows limiting API access by IP addresses. If you want to allow only Skyvia IP addresses, see How to Configure Local Database Server to Access It from Skyvia for the list of Skyvia IP addresses to add.

Creating Connection

You need to specify the following parameters while creating a Customer.io connection:

  1. Select the Account Region if you use a non-US region.

    Connection window

  2. Enter your App API Key, Tracking API Key and Site Id.

Connector Specifics

Object Peculiarities

Some Customer.io objects can be accessed only via their parent objects. For example, to query CustomerSegments, CustomerMessages, or CustomerActivities, Customer.io API requires the ID of the corresponding Customer (Skyvia uses the CioId field).

Skyvia does not require the ID of the parent object from the user. If you don’t specify the IDs of the parent objects (for example, in a filter), Skyvia queries all the parent object records first, takes their IDs, and then queries child object records for each parent object record. This allows querying child objects without knowing their parents, but this method takes much time and consumes many API calls. It uses at least one API call for every parent object record. Thus, working with child records can be slow.

Because of this, it is recommended to use filters on the parent object fields when querying data from such child objects. This reduces the number of parent object records, for which child object data must be queried.

Customers Object

When performing INSERT into the Customers object, you must specify a value either for the PersonId or for Email field. Update and Delete operation is performed using the CioId field for identifying a record to update or delete.

Note that the PersonId and Email fields must have unique values. If you try assigning values already present in the Customers object to PersonId or Email when inserting or updating a record, you will get an error.

Custom attributes of the Customers object are available via the CustomersAttributes object.

Incremental Replication and Synchronization

Skyvia supports Replication with Incremental Updates for the following objects: BroadcastActions, BroadcastMessages, Broadcasts, BroadcastTriggers, CampaignActions, Campaigns, Collections, CustomerMessages, Customers, Exports, Messages, NewsletterMessages, Newsletters, Snippets, TransactionalMessageDeliveries, TransactionalMessages.

Besides, the following objects have only the CreateDate field, and thus, replication with Incremental Updates detects only the new records, but not updates to existing records: BroadcastMessages, BroadcastTriggers, CustomerMessages, Customers, Messages, NewsletterMessages, TransactionalMessageDeliveries.

Only the Collections object supports synchronization.

DML Operations Support

Skyvia supports the following DML operations for Customer.io objects:

Operations Objects
INSERT, UPDATE, DELETE Collections, ReportingWebhooks, Customers
UPDATE, DELETE Snippets
INSERT, DELETE Segments
UPDATE NewsletterVariants, CampaignActions

Stored Procedures

Skyvia represents part of the supported Customer.io features as stored procedures. You can call a stored procedure, for example, as a text of the command in the ExecuteCommand action in a Target component of a Data Flow or in Query.

SendTransactionalEmailWithTemplate and SendTransactionalEmailWithoutTemplate

Use the following command to send email with template:

call SendTransactionalEmailWithTemplate(:TransactionalMessageId, :To, :Identifiers_Email, :Body, :Subject, :From, :MessageData, :SendAt, :Bcc, :FakeBcc, :ReplyTo, :Preheader, :PlaintextBody, :Attachments, :Headers, :DisableMessageRetention, :SendToUnsubscribed, :Tracked, :QueueDraft, :DisableCssPreprocessing);

Use this command to send email without template

call SendTransactionalEmailWithoutTemplate(:Body, :Subject, :From, :To, :Identifiers_Email, :MessageData, :SendAt, :Bcc, :FakeBcc, :ReplyTo, :Preheader, :PlaintextBody, :Attachments, :Headers, :DisableMessageRetention, :SendToUnsubscribed, :Tracked, :QueueDraft, :DisableCssPreprocessing);

PARAMETER NAME DESCRIPTION
TransactionalMessageId The id of the transactional message that you want to use as the template
To Recipients’ email addresses, separated by commas. Can contain up to 15 recipients
Identifiers_Email Identifies the person represented by your transactional message by email
Body The body of the email message to send. For the SendTransactionalEmailWithTemplate procedure, it overrides the template body
Subject The subject of the email message to send. For the SendTransactionalEmailWithTemplate procedure, it overrides the template subject
From The address that your email is from. This address must be verified by Customer.io. You can include a display-friendly name in the format Person <[email protected]>. For the SendTransactionalEmailWithTemplate procedure, it overrides the template from address
MessageData An object containing the key-value pairs referenced using liquid in your message
SendAt A timestamp to send the email message at, in unix timestamp format
Bcc Blind copy message recipients. Supports multiple email addresses separated by commas. Can contain up to 15 email addresses
FakeBcc If true, instead of sending true copies to BCC addresses, Customer.io sends a copy of the message with the subject line containing the recipient address(es)
ReplyTo The address that recipients can reply to if it needs to be different from the From address
Preheader The block of preview text that users see next to, or underneath, the subject line in their inbox
PlaintextBody You can use this parameter to override the automatically generated plaintext version of your message body
Attachments A JSON dictionary of attachments with filenames as keys and base64-encoded file contents as values. The total size of all attachments must not exceed 2 MB. Some filetype extensions are restricted
Headers An array of header JSON objects. Headers must be strings and cannot contain any non-ASCII characters or empty spaces. Some headers are reserved and cannot be overwritten
DisableMessageRetention If true, the message body is not retained in the delivery history. For the SendTransactionalEmailWithTemplate procedure, this parameter overrides the corresponding template setting. The default value is false
SendToUnsubscribed If true, the message is sent to unsubscribed recipients. For the SendTransactionalEmailWithTemplate procedure, this parameter overrides the corresponding template setting. The default value is true
Tracked Enables tracking of email message opens and link clicks. The default value is false
QueueDraft If true, the email message is held as a draft in Customer.io and is not sent directly to recipients. To send your message, go to the Deliveries and Drafts page
DisableCssPreprocessing Disables CSS preprocessing. For the SendTransactionalEmailWithTemplate procedure, this parameter overrides the corresponding template setting. The default value is false

IdentifyObject

To create a record in the custom object, use the command

call IdentifyObject(:ObjectTypeId, :ObjectId, :Attributes, :CioRelationships)

PARAMETER NAME DESCRIPTION
ObjectTypeId The ID of your custom object. Every custom object type has its ID. All the records in custom object refer to the ObjecttypeId value
ObjectId The unique identifier of the custom object record for example, vehicle_1
Attributes record attributes in the JSON object format
CioRelationships People you want to associate with the record. Each item in the array represents a person. For example, you can relate the record with Customer by Id

For example,

call IdentifyObject('1', 'vehicle_5', 'identify', '{"Make":"Volkswagen","Model":"Golf R"}', '[{"identifiers": {"id": "baf708000001"}}]')

AddRelationship

To add or change the associations of the custom object record with specific customers, use the command

call AddRelationship(:ObjectTypeId, :ObjectId, :CioRelationships)

PARAMETER NAME DESCRIPTION
ObjectTypeId The ID of your custom object. Every custom object type has its ID. All the records in custom object refer to the ObjectTypeId value
ObjectId The unique identifier of the custom object record for example, vehicle_1
CioRelationships People you want to associate with the record. Each item in the array represents a person. For example, you can relate the record with Customer by Id

call AddRelationship('1', 'vehicle_4', '[{"identifiers": {"id": "baf708000001"}}]')

DeleteObject

To delete the record in the custom object, use the command

call DeleteObject(:ObjectTypeId, :ObjectId)

PARAMETER NAME DESCRIPTION
ObjectTypeId The ID of your custom object. Every custom object type has its ID. All the records in custom object refer to the ObjectTypeId value
ObjectId The unique identifier of the custom object record for example, vehicle_1

RemoveRelationship

The following command removes the association between the custom object record and person.

call RemoveRelationship(:ObjectTypeId, :ObjectId, :CioRelationships)

PARAMETER NAME DESCRIPTION
ObjectTypeId The ID of your custom object. Every custom object type has its ID. All the records in custom object refer to the ObjectTypeId value
ObjectId The unique identifier of the custom object record for example, vehicle_1
CioRelationships People you want to remove from the association with the record. Each item in the array represents a person. For example, you can relate the record with Customer by Id

For example,

call RemoveRelationship('1', 'vehicle_4', '[{"identifiers": {"id": "baf708000001"}}]')

Supported Actions

Skyvia supports all the common actions for Customer.io.