Most personalized content starts life in a spreadsheet: offers per loyalty tier, a game catalog, a message per country. Copying those values into template after template is slow, and every change means editing templates again.
A Data Connection holds that spreadsheet for you. You upload it once in Content Studio, each row keyed by a value your customers share, and your templates look up the right row for each customer when the message is sent. When the content changes, you update the rows, not the templates.
This guide will walk you through how to create a Data Connection from a CSV file, from preparing the file to checking and editing its rows.
How to Create a Data Connection from a CSV File
Prepare Your CSV File
The file is checked line by line as soon as you choose it, and nothing is uploaded until it's clean. Getting the shape right first saves a round trip.
- Put a header row first, then one row per key. Column names must be unique, with no spaces at the start or end, and every row needs the same number of columns. Blank lines are allowed only at the end.
- Separate values with commas and save the file as UTF-8.
- Include a column that identifies each row, for example
CustomerIDorTier. Every value in it must be filled in and unique — this becomes your primary key.
00123 stays 00123. An empty cell is stored with no value, so your template's fallback applies to it. A single row can be at most 1,024 KB.Start a CSV Upload
For a tour of the Data Connections screen, see Introduction to Data Connections.
- Navigate to Plan → Content Studio → Data Connections.
- Click New and select CSV upload.
Choose and Check Your File
- Under File, choose your CSV file.
- Read the result of the check:
- If the file is clean, you see how many rows and columns it has, and Rows shows a preview of the first 20 rows.
- If there are problems, each one is listed with its line number. Fix the file and choose it again.
Name the Connection and Choose Its Primary Key
The primary key is the column your templates match each customer against, so pick it carefully.
- Enter a Name. It starts as the file name; it's shown in the list and in the Data Connection Lookup in your templates.
- Optionally, add a Description so others know what the data is.
- Under Primary key, select the column that identifies each row. If any value in it is empty or repeated, the problems are listed and you can fix the file or pick another column.
- If your account has more than one brand, select the Brand whose templates can use the connection.
Create the Connection
- Click Create. It's available once the file has at least one row, the file, primary key and name have no problems, and a brand is selected (if you were asked for one).
- Wait while the rows upload. A progress bar shows how many rows have been sent and the estimated time left.
- When the upload finishes, the connection's page opens with a message that it was created.
Check and Edit Your Rows
The connection's page shows its details and a sample of its rows. Copy the Data connection ID from here when you need it in Liquid.
- Under Table Rows, check the sample of up to 50 rows. To find a row, type the start of its key in the Find by box, which is named after your primary key (for example Find by CustomerID).
- To change rows, click Add row or Edit all rows, or use a row's menu to edit, duplicate or delete it. You can type a key only for a new row; an existing row's key can't be changed.
- Click Save to apply your changes. Until you save, nothing changes in the connection.
- To load a new version of the file, click the upload icon, choose the file and click Upload. The file must include the primary key column. Rows whose key is in the file are replaced whole; other rows stay as they are.
How Data Connections Work
When a message is sent, each customer's lookup value — usually an attribute such as their customer ID or tier — is matched against the primary key. The values in the matching row are what the customer sees. If no row matches, the fallback you chose in the template applies.
- One row per key: each primary key value appears once, so every customer gets exactly one row.
- Update the data, not the template: changes you save or upload are what the next send uses.
- Using it in a template: add it with the Data Connection Lookup. See How to Add a Data Connection Lookup to a Template.
Use Case Examples
- Gaming: A file of weekly VIP offers keyed by loyalty tier, so every tier sees its own headline and bonus from one template.
- Retail: A product catalog keyed by product ID, with name, price and image URL, used in abandoned-basket emails.
- Multi-market brands: One row per country with the local legal line and support number, keyed by country code.
FAQ
Can I change the primary key after I create the connection?
No. The primary key and the name are set when you create the connection. To use a different key, create a new connection from the file and switch your templates to it.
What happens to rows that aren't in a new upload?
They stay. Uploading a file into an existing connection replaces the rows whose key is in the file and adds new ones, but it never deletes rows. A column missing from the new file is left empty on the rows it replaces. To remove rows, delete them on the connection's page and click Save.
Why does the Rows column show a dash?
Rows are counted in the background, so a new or recently changed connection can show — for a few minutes. The rows themselves are there; open the connection to see them.
What happens if I delete a Data Connection?
Its data stops being available to campaigns immediately, and there is no check for templates that still use it, so messages that rely on it can stop being sent. You can restore it for 7 days: turn on Show deleted in the list and click Restore. Restore doesn't work if another connection has taken the name in the meantime.
My upload stopped partway. What should I do?
If a batch fails, click Retry from batch to send the rest. If you left the page, the rows already sent are in the connection; open it and upload the same file again to finish.
Can I upload JSON files or choose field types?
Not on this screen. It takes CSV files only, and stores every value as text. For data that changes often or comes from your own systems, create an API Data Connection instead.