Import CSV File to Data Extension

NOTE This task requires assistance from your eComm Specialist.

Learn how to create a Data Extension as you typically would, then Import over the data from a CSV file. Just remember, you'll need the Contact 18 ID to Import successfully.

Call for Help Importing a CSV file over a Data Extension is simple in theory but more difficult when put into practice the first time. There are some small intricacies that will vary, depending on your use case. Feel free to arrange 30 min. with Melanie Jones to walk through it together.

1 | Create Data Extension

The goal is to create a Data Extension as usual. Access the Marketing Cloud Business Unit that the message will be sent from and configure the Data Extension. There is no need to 'Start' the Data Extension once created.

Required Fields:

  • Contact ID
  • Primary Email (or any Email field)
  • Other personalization fields (like First Name)
  • Contact 18 ID

Create a Data Extension

Your Data Extension should be configured like the following:

  • Contact ID=Key
  • Primary Email Field=Email Address
  • Include any fields used for personalization or dynamic content
  • DO NOT INCLUDE the Contact 18 ID in the Data Extension


  • Set to Overwrite
  • Click Save in top
  • There is no need to Start the Data Extension since you will import a file to the Data Extension in step 3.

Add Column to Data Extension

With the basic Data Extension created, you need to add another column to house the data that you wish to upload. To manually add a new column to a Data Extension:

  • Navigate to Subscribers >> Salesforce Data Extension
  • Open the Data Extension you created
  • Add a field by working in the Fields box in the bottom right
  • Click the Edit Fields button
  • Click the Plus icon


  • Name the new field as you wish (ie External Data below)
  • If the value is text, keep the data type as text (most common)
  • Ensure the length number is larger than the number of characters in the field being uploaded
  • Check Nullable if this value can be blank
  • Provide a Default Value if you wish
  • Click Save Fields in the top-right



2 | Create CSV

There are many ways to go about getting a CSV prepared to upload to a Data Extension. 

Prepare a spreadsheet with columns including:

  • 18 digit contact ID
  • Email
    • these values can vary in domain
  • other personalization fields
  • External data to add

Save as a CSV

XLOOKUP Function

  • Oftentimes, your CSV file will need to be created by merging a Salesforce Report (with the 18 digit contact ID, email adress, first name & last name) with an external file including custom information. The XLOOKUP function plays an important role in merging two sheets into a single sheet to be imported.

See three use cases below for importing a CSV:

Some users wish to have external information included in their Data Extension. This could be a custom salutation for personalization (like Mr. & Mrs. Jones) or a piece of information to drive dynamic content in an email. 

  1. Create Report with required columns and export:
    • 18 Digit Contact ID
    • University Email
    • field used to merge files (step 2 below)
    • other personalization fields
  2. Use XLOOKUP function to merge external file with exported Salesforce Report
  3. Save as CSV with columns labeled

Adding External Information for AMPscript

  • While uploading external details to a Data Extension to create custom emails with AMPscript is a valid use-case, it is not supported by eComm. Users with AMPscript experience are welcome to explore this functionality, noting eComm will not be able to provide resources or support.

Some of the campuses recently noticed many employees/students have an incorrect/missing email in their university email field. This issue stems from the source system (Campus Solutions or HRMS) and takes time to remedy. As an immediate work-around, you can Import over the Subscribers in Marketing Cloud that have incorrect/missing emails.

  • Create Report with respective University Email Field
    • Required Columns include: 18 Digit Contact ID, University Email, other personalization fields
  • Export Report
  • Manually input new email addresses in replace of the incorrect ones
  • Save as CSV with columns labeled

Merge multiple Data Extensions (with different University emails) into a single Data Extension. 

Employee Services is a good example of using this Import feature. Typically, when they email across the campuses they send to four different Data Extensions to target four different university emails. We can essentially merge those into one Data Extension so they can leverage A/B Testing and Journey Builder (which don’t support including multiple data extensions).

  • Create four campus specific Reports with respective University Email Field
    • TIP! Make sure all your Reports have the same columns
  • Required Columns include:
    • 18 digit contact ID
    • Email
    • other personalization fields
  • Export and merge these into a single sheet
    • The Email column will be filled with emails from varying domains
  • Save as a CSV with columns labeled


3 | Import CSV to Data Extension

  • Navigate to Content Builder
  • Hover Subscriptions then drill into Salesforce Data Extensions
  • Select your Data Extension name to open details

Open Salesforce Data Extension Details

  • Select tab two titled Records
  • Click Import in the top left

View Salesforce Data Extension Records & Import

  • File: find your saved CSV
  • Deliminator: Comma
  • Date Fromat: Leave as Default - English
  • Import Type: IT DEPENDS
    • Overwrite (most common) | Removes existing records and overwrites with CSV data
    • Add & Update | Add new records and update existing, will not remove existing
    • Add Only | Add new records, do not update or remove existing records
    • Update Only | Update existing records, do not add new or remove existing records
  • Import Options: Leave as Default - do not check/uncheck anything

Salesforce Data Extension, Import, Upload File

  • Select Next in the bottom right

STEP 1 | Create Data Extension The Import Type you chose here (Step 3A | Import file Type) depends on your desired outcome. This will also impact if you Start your Data Extension in Step 1 or not.

Select Map Manually

  • Contact 18 ID=Contact ID
  • Email=Email
  • Other fields=other fields

Salesforce Data Extension, Import, Configure Mapping

  • Select Next in the bottom right
  • Review your Import details
  • Select Import in the bottom right
  •  You’ll receive an email notice once complete. Confirm it is successful.
    • Failed Imports often read a Case Sensitive issue. Confirm you are importing a CSV with Contact 18 ID rather than just the Contact ID (15 digit).


Do NOT re-Start your Data Extension after completing the import. The data you just imported will be overwritten.

4 | Add Personalization to Email & Test

  • To add personalization, click into the content block of the email
  • Select the Personalization icon and click Choose New Data Source in the dropdown


  • Choose you data source by opening the Salesforce Data Extensions folder 
  • Select your Data Extension and click the blue OK button in the bottom right


  • Now when you select the Personalization icon the Data Extension selected should be listed with available fields
  • Select the attribute you wish to add


Don't forget to test your personalization.