Import People via CSV
- 7 Minutes To Read
This page takes you through the process of importing people by CSV. When you import a CSV, you can determine whether to add new people, update existing people, or both.
CSV Requirements
You can upload a CSV directly into Customer. io, or link us to a Google Sheet. Take a look at an example CSV.
Each row in your CSV represents a person you want to add to your audience, and each column represents an attribute that you want to assign to that person.
If your file has columns named id, Id and ID, all three of those columns will become separate attributes in your users' profiles!
Your file must:
- be in CSV format OR a Google Sheet
- not exceed 100MB in size
- not contain more than 100 columns
- contain a column that maps to either the
id
oremail
attribute in Customer.io; when adding new people, your sheet must contain a column that maps toid
. - Google Sheets be shared with cio_share@customer.io. (You can also make your sheet public, but we strongly discourage the use of public sheets for security reasons).
Upload a CSV to Customer.io
Before you import people, make sure that your CSV file is ready to import. It must contain a column that maps to either id
or email
attributes in Customer.io. If importing a Google sheet, your sheet must be shared with cio_share@customer.io
.
-
Go to either:
- Imports > Import People
- People > Add People > Import a CSV.
-
Select the file you want to import.
-
Set a Name and Description for your import, helping you identify your CSV on the Imports page.
-
Determine how to handle your import and then click Next:
- Add new people or not.
- Update existing people. If you update existing people, determine whether to update people by
id
oremail
. - Determine how to handle empty values—ignore them or nullify existing attribute values.
-
Map fields from your CSV to attributes in Customer.io and click Next. You must map
id
andemail
fields, if present. All other fields are optional. You can select the fields from your sheet that you want to import. If you select a field that you want to import, but you don't map that field to an attribute, we create a new attribute using the field name.
-
Review your import for errors and warnings. Click Preview Import to download a CSV file that reflects your final import, including all data mappings, skiped attributes, etc. Make sure that your import is correct. You cannot stop the import process after you click Import.
-
(Optional) Select the boxes below the Review your data section to add imported people to a new or existing segment.
Imports process in sequenceCustomer.io processes imports row-by-row. Segment-triggered campaigns may fire as we create new people or change attributes, so make to review your import carefully.
-
Click Complete import. It takes approximately one minute per 20-30 thousand rows to import your file. You can navigate away from the page. We will send you an email when your import is complete.
Go to Data & Activity > Imports to revisit this import or see your previous imports.
Mapping CSV headers to attributes
When you import a CSV, you match the headers in your CSV to attributes for people in Customer.io. If your column names match attributes in Customer.io, we try to map them automatically. Otherwise, you can re-map columns in your attribute to existing attributes or create new attributes.
We sample the first three rows of your data for each column, helping you understand the data that you're mapping to each attribute. Use Import as: to select the attribute that you want to map a column to. If you do not want to import the values in a column, select Skip.
Customer.io has four reserved attributes: id
, email
, created_at
, and unsubscribed
. If you want to import a column representing an ID, but you don't want to map that to the reserved Customer.io id
attribute, you can change the column name and import it as a different attribute.
You may see some warnings when mapping attributes. These generally represent best practices and recommendations, and are not issues that you need to fix. For example, we may recommend that you remove spaces from your column names because having spaces in attributes can make things difficult when using Liquid in your messages.
Reserved Attributes
When mapping data to reserved attributes, make sure you use the correct data format, described below:
Attribute | Purpose | Required | Data Format |
---|---|---|---|
id | This is the unique identifier that will be used to either update an existing person or to create a new person when the id does not yet exist in the workspace you are working in. |
When importing by id |
Our default id limit is set to 150 characters. All valid utf characters are allowed. |
Shown in various places in your account for easy association with a person's profile. Additionally, the TO line of your email templates will be prefilled with this attribute. | When importing by email | We support valid RFC 5322 email addresses. | |
created_at | Recommended to hold the date the profile was created in your system. Will allow you to take advantage of timestamp operators in your segmentation. Shown in various places in your account for easy aging of a person's profile. | Optional | We support: - unix epoch - unix epoch ms - ISO 8601 |
unsubscribed | To determine if the person is currently subscribed/unsubscribed from receiving campaigns and newsletters from you. (reference) | Optional | We support any case of true (i.e. TRUE , true , tRUe , etc.) or ‘1’ if they are unsubscribed. Any other value will be considered "false", or subscribed. |
mobile_ad_id | Used to record either Apple's Advertising Identifier (IDFA) or Android's Advertising ID (AAID). This id can improve match accuracy in Google or Facebook Ads when using Ad Audiences. | Optional | Apple's Advertising Identifier (IDFA) or Android's Advertising ID (AAID) |
email_sha256 | To keep your data secure, you can hash your customer email using the SHA256 algorithm before sending it to your account. This field is only used in Ad Audiences and cannot be used to send messages. | Optional | Valid encoded sha256 |
mobile_ad_id_sha256 | To keep your data secure, you can hash the mobile_ad_id using the SHA256 algorithm before sending it to your account. This field is only used in Ad Audiences. | Optional | Valid encoded sha256 |
Importing by Id
When you import users by ID, your CSV file must contain a column that maps to id
. If your id
column is not named id
, you will map the column to id
.
Profile IDs are unique and cannot be changed. Customer.io de-duplicates profiles on id
, but the same email address can be used across multiple IDs. If you assign the same email address to multiple IDs, you may double-mail your customers by mistake. Before you import people or create new profile IDs, check with your technical team to understand how you assign and organize profiles to make sure that you organize people consistently within your workspace.
Importing by Email
When you update people by email address, your CSV file must contain a column that maps to the email
attribute.
If your email
column is not named email
, you will map the column to email
.
Reviewing import errors and warnings
On the Review step when you import a CSV file, we validate your import, returning errors and warnings for rows in your CSV file. Rows with errors will not be imported.
Depending on the size of your CSV file, it may take a moment for us to validate your import.
If there are no errors or warnings, you can continue importing your file as normal. If not, you may want to correct issues in your your CSV file to make sure that you import everybody in your CSV.
- Errors: issues that prevent us from importing a row. Example: *The row is missing a value in the
id
column._ - Warnings: issues that do not prevent us from importing a row, but you may want to note to make sure that your data is well formed. You probably don't need to fix issues resulting in warnings. Example: The same email address is used for multiple ids and will create multiple people.
In Import Details, you can click ERRORS or WARNINGS to download a CSV file containing either errors or warnings. Each file contains the rows from your original CSV file that resulted in errors or warnings respectively, including 2 new columns:
- _row: contains the row number from your original file that contained an error or warning.
- _errors or _warnings: lists errors/warnings for a row.
You can import users directly from an error or warning CSV file after you correct errors and remove the "_row" and "_errors" or "_warnings" columns.
Exporting files from an import
Files supplied or generated during your import expire and will no longer be available for download after 30 days.