Menu
 

Importing old data in to Customer.io

Once you’ve had a chance to see Customer.io work, the next thing you might want to do is back-fill your historical data. Here are a couple of options.

Backfilling People

1. Advanced: Write a script

If you’re a developer, you may want to write a quick script to loop through all of the people in your database and add them to Customer.io. While this creates a lot of API requests, it’s fine to do and won’t overload our system.

Choose a library for your language of choice

2. Easier: Send us a CSV

You can send a CSV to us (email it to win@customer.io). We’ll run a script for to import your data.

Take a look at an example CSV

There are a few things you should make sure of before sending us your data:

We’ll need to know how everyone on your list signed up

Please send that explanation along with your file. Any URLs where people signed up or an explanation of how the signup worked is great. Please also let us know when everyone was last contacted or how long ago they signed up.

People should have unique IDs

Each person in Customer.io is identified by a unique ID. Most often this is the same ID that you use in your database. IDs cannot be changed later.

If you have a mix of people with and without IDs in your database you can standardize on the email address as an ID. However, when people change their email address in your system, this can cause duplicate accounts in customer.io.

People should have timestamps

Ideally every person added has a timestamp of when you first began your relationship with them. We look for a “created_at” attribute by default and that’s used in our default Signed up segment and welcome campaigns. You can reconfigure those, but we recommend having an attribute to identify that original sign up time. This should be in unix (seconds since the epoch) format.

You can optionally set the “unsubscribed” attribute

If someone doesn’t want email from you, you can still add them. Just set “unsubscribed” equal to TRUE and we’ll unsubscribe them from mail in Customer.io. It’s optional to pass this information over in an import. Learn more about unsubscribes.

Advanced: Backfilling Events

You can optionally add historical event data by adding a timestamp.

curl -i https://track.customer.io/api/v1/customers/5/events \
-u YOUR-SITE-ID-HERE:YOUR-SECRET-API-KEY-HERE \
-d name=purchased \
-d data[price]=23.45 \
-d timestamp=1359389415

If you need help on any of these issues, please get in touch.