---
title: Import data using CSV
slug: data-platform/docs/import-data-using-csv
docTags: 
createdAt: 2026-08-10T12:05:15.000Z
---

## Upload data

To upload your data with a CSV file:

1. Go to **Data Setup > Integrations**.
2. Click **Upload CSV**.
3. You can drag and drop your file onto the page or click **browse** to search for the file on your device.

:::hint{type="info"}
**Note**

Each file you upload must meet the format and naming requirements described below.
:::

## File format requirements

:::hint{type="info"}
**Warning**

**Values that are blank ("") or null will DELETE the field value.**

For example, if you upload a file with a `gender` column and there is a customer record without that column filled, that will erase what is presently on the customer record.
:::

- Values must be encoded with `UTF-8`.
- Values must be comma delimited.
- Records must end with a newline (`\n`), and no carriage return (`\r`) or newline (`\n`) may exist *within* a record.
- Optionally, values must be quoted using double quote (`"`) characters. You must quote any field containing a double quote. The escape character for an embedded quote is a second quote character. (For example: `"Customers think this product is ""Amazing!"""`).
- Each record must contain exactly the same number of fields as the header does.
- Date/time fields must be formatted as follows:

| Date Format                                            | Example                                                               |
| ------------------------------------------------------ | --------------------------------------------------------------------- |
| Unix timestamp/epoch                                   | \`1435708800\`                                                        |
| \[ISO 8601]\(https\://en.wikipedia.org/wiki/ISO\_8601) | \`2019-04-11T18:43:29+00:00\` \`2019-04-11T18:43:29Z\` \`2019-04-11\` |
| %Y-%m-%d %H:%M:%S%\:z                                  | \`2014-09-01 13:34:08+00:00\`                                         |
| %Y-%m-%d %H:%M:%S                                      | \`2014-09-01 13:34:08\`                                               |
| %m/%d/%y %H:%M                                         | \`09/01/14 13:34\`                                                    |
| %m/%d/%y %H:%M:%S                                      | \`09/01/14 13:34:08\`                                                 |
| %m/%d/%Y %H:%M:%S                                      | \`09/01/2014 13:34:08\`                                               |
| %m/%d/%Y %H:%M                                         | \`09/01/2014 13:34\`                                                  |

:::hint{type="warning"}
**Caution**

If time and time zone are not provided, the time is assumed to be 12 AM UTC.
:::

## Error handling

Any record that contains an invalid field is ignored. If more than 1% of the data is invalid, the entire file is rejected. Go to **Settings > Activity Log** to view the status of the uploads. On that page, you can view any errors generated and successful upload entries.

## File name requirements and example CSV files

:::hint{type="info"}
**Note**

The example files are simple examples. See the ODP schema section to learn about available default and custom fields and objects.
:::

| Object    | File name prefix      | Example file                                                                                                                                                                                                                                                                                   | Comments                                                                                                                                                                                       |
| --------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Customers | \`odp\_customers\`    | \[odp\_customers\_example.csv]\(https\://world.optimizely.com/globalassets/downloads/odp/odp\_customers\_example.csv)                                                                                                                                                                          |                                                                                                                                                                                                |
| Products  | \`odp\_products\`     | \[odp\_products\_example.csv]\(https\://world.optimizely.com/globalassets/downloads/odp/odp\_products\_example.csv)                                                                                                                                                                            |                                                                                                                                                                                                |
| Orders    | \`odp\_orders\`       | \[odp\_orders\_example.csv]\(https\://world.optimizely.com/globalassets/downloads/odp/odp\_orders\_example.csv)                                                                                                                                                                                | See the \[Orders fields]\(#orders-fields) section                                                                                                                                              |
| Events    | \`odp\_events\`       | \[odp\_events\_example.csv]\(https\://world.optimizely.com/globalassets/downloads/odp/odp\_events\_example.csv)                                                                                                                                                                                | Use an **identifier** field, such as \`order\_id\`, to properly associate the event with a customer profile.                                                                                   |
| Lists     | \`odp\_list\`         | **Upload to a Single List** \[odp\_list\_yourlistidhere.csv]\(https\://world.optimizely.com/globalassets/downloads/odp/odp\_list\_yourlistidhere.csv) **Upload to Multiple Lists** \[odp\_list\_example.csv]\(https\://world.optimizely.com/globalassets/downloads/odp/odp\_list\_example.csv) | See the \[Lists imports]\(#lists-imports) section                                                                                                                                              |
| Custom    | \`odp\_customobject\` | \[odp\_customobject\_example.csv]\(https\://world.optimizely.com/globalassets/downloads/odp/odp\_customobject\_example.csv)                                                                                                                                                                    | Replace \`customobject\` with the name of the custom object. All custom object updates must include the primary key (or keys in the case of composite keys) in the file (for example, \`id\`). |

We currently also support the `zaius_` prefix.

### Orders fields

Orders in ODP are represented both as **Events** and as **Orders** objects. The **Events** object stores item-level fields, meaning products that a customer purchased. The **Orders** object stores top-level order fields, meaning the order total, taxes, discounts and customer information. Format the file using one of the following options:

- (Recommended) Repeat the top-level order fields for each line item in a purchase. The top-level fields must be identical on each row of the purchase.
- Leave the top-level order field blank after the first row for each subsequent line in the purchase and only provide shared and item-level fields.

| Field                 | Shared, top-level, or item-level | Comments                                                                                |
| --------------------- | -------------------------------- | --------------------------------------------------------------------------------------- |
| \`action\`            | shared                           | value should be one of the following: \`purchase\` \`refund\` \`return\`, or \`cancel\` |
| \`order\_id\`         | shared                           | Required                                                                                |
| \`ts\`                | shared                           | Required                                                                                |
| \`identifier\`        | shared                           | Any identifier is accepted                                                              |
| \`total\`             | top-level                        | N/A                                                                                     |
| \`discount\`          | top-level                        | N/A                                                                                     |
| \`subtotal\`          | top-level                        | N/A                                                                                     |
| \`tax\`               | top-level                        | N/A                                                                                     |
| \`shipping\`          | top-level                        | N/A                                                                                     |
| \`coupon\_code\`      | top-level                        | N/A                                                                                     |
| \`first\_name\`       | top-level                        | N/A                                                                                     |
| \`last\_name\`        | top-level                        | N/A                                                                                     |
| \`bill\_address\`     | top-level                        | N/A                                                                                     |
| \`ship\_address\`     | top-level                        | N/A                                                                                     |
| \`item\_product\_id\` | item-level                       | One row per line item                                                                   |
| \`item\_sku\`         | item-level                       | One row per line item                                                                   |
| \`item\_price\`       | item-level                       | One row per line item                                                                   |
| \`item\_quantity\`    | item-level                       | One row per line item                                                                   |
| \`item\_discount\`    | item-level                       | One row per line item                                                                   |
| \`item\_subtotal\`    | item-level                       | One row per line item                                                                   |

:::hint{type="warning"}
**Important**

You cannot update order item-level fields (and the associated events) in the future. Only top-level fields for refunds, returns, and cancellations.
:::

:::hint{type="info"}
**Note**

Prefix all custom event fields with `item_` to indicate the field exists on the Events object. Otherwise, ODP assumes you are attempting to update the Orders object.
:::

### Lists imports

- Use an identifier field, such as `email`, in the CSV file. Optionally, include an `action` field (`subscribe` or `unsubscribe`). If you do not include an `action` column, ODP assumes a subscription for each email.
- Only some accounts have the optional `customer_id` field. If your account does not have this field, do not include it in your import file. Additionally, if an email value is available, do not use the optional `customer_id` field. Only use the `customer_id` field when an email is **not** available.
- A list import does not update the customer record with new or changed attributes. It adds customers to a list or a subscription. To update the customer record with new or changed attributes, use the **Customers** import.

:::hint{type="info"}
**Note**

Events, customers, products, and orders are uploaded on the **Data Setup > Integrations** page of each ODP account. However, lists must be uploaded on the email list's detail page.
:::

## Import marketing consent data

In ODP, [marketing consent](https://docs.developers.optimizely.com/optimizely-data-platform/docs/thebasics-consent) is an attribute of each identifier (for example, each email address), not the entire customer profile, and is not updated by the customer data import.

To import marketing consent data, see [Understand marketing consent](https://support.optimizely.com/hc/en-us/articles/4407269140237). File names for consent imports begin with `zaius_events`. If no value is provided for consent (null), consent is implied.
