Customer.io
Source and destination
Polytomic connects to Customer.io using these credentials:
- Site ID
- Track API Key
- App API Key
-
Obtain your Track API Key by logging in to Customer.io then clicking on the gear icon in the top-right and going to Workspace Settings → API and webhook credentials → Create Track API Key.
-
Once you click Create Track API Key, you will see both a Site ID and a Track API Key.
-
Obtain your App API Key from the same page by going to App API keys → Create App API Key.
-
In Polytomic, go to Connections → Add Connection → Customer.io.
-
Paste your Customer.io Site ID and API keys from Steps 2 and 3 above in Polytomic's fields:
- Click Save.
Syncing to Customer.io
You can use Polytomic's Model Syncs to sync to Customer.io from your data warehouses, databases, SaaS applications, spreadsheets, APIs, and cloud storage systems like S3.
Syncing to the following Customer.io objects is supported:
- Customers (also known as People)
- Custom objects
- Segments
Setting relationships between objects
When syncing to Customer.io, you are able to set relationships as part of your sync. For example, you may be creating a Person record in Customer.io that requires a relationship set to a corresponding Company custom object record.
You can set these relationships using Polytomic by mapping to Customer.io find-by fields. These are special target fields in Polytomic that are solely for relationship-setting within Customer.io. Syncing to them means finding the listed object by the designated field then setting a relationship to it.
If you need to set relationships to multiple instances of an object, just pass an array of IDs on the left-hand side of your mapping.

Ignoring setting invalid relationships
When setting relationships as part of your sync to Customer.io, it's possible that for a record to try setting an invalid relationship. An invalid relationship is one where the intended target object does not exist in Customer.io (for example, trying to relate a Person to an Organization using an Organization ID that does not exist in Customer.io).
Polytomic's default behaviour is to drop the source record with the invalid relationship ID from the sync and log an error for it, then resume with the rest of the sync.
You can change this behaviour and have Polytomic still write the record (even though the attempted relationship was invalid) by turning on the Ignore setting invalid relationships advanced setting.

Replacing existing relationships
If you'd like to replacing all existing relationships with the ones you set, you can turn on the Replace existing relationships option in Advanced settings:

Setting relationship attributes
You can also use Polytomic to set sync to Customer.io relationship attributes. To do so, you can map any number of fields to the <Object name> relationship attributes structure, where <Object name> is the name of the object you are setting the relationship to:

As relationship attributes are particular to a specific relationship instance, you must, as part of the same sync, specify your relationship using a Polytomic Find by field as specified in the documentation above .
The field name that will be written to relationship attributes will be your editable Polytomic model field label transformed into snake case .
If you have the Replace existing relationships setting turned on, Polytomic will preserve relationship attributes if the replacing relationship is the same as the current one.
Updated about 18 hours ago