Attention Trailblazer!

Salesforce has two different user interfaces: Lightning Experience and Salesforce Classic. It’s easy to switch between the two. You can learn about switching between interfaces, enabling Lightning Experience, and more in the Lightning Experience Basics module here on Trailhead.

This module is designed for Salesforce Classic.

Learning Objectives

After completing this unit, you will be able to:
  • Describe and compare the different options for importing data into Salesforce.
  • List the steps involved in preparing data for import.
  • Import data from a sample .csv file using the Data Import Wizard.
  • Use the Import Queue to monitor the status of an import.

Introduction to Data Import

You can easily import external data into Salesforce. Supported data sources include any program that can save data in the comma delimited text format (.csv).

Salesforce offers two main methods for importing data.

  • Data Import Wizard—this tool, accessible through the Setup menu, lets you import data in common standard objects, such as contacts, leads, accounts, as well as data in custom objects. It can import up to 50,000 records at a time. It provides a simple interface to specify the configuration parameters, data sources, and the field mappings that map the field names in your import file with the field names in Salesforce.

  • Data Loader—this is a client application that can import up to five million records at a time, of any data type, either from files or a database connection. It can be operated either through the user interface or the command line. In the latter case, you need to specify data sources, field mappings and other parameters via configuration files. This makes it possible to automate the import process, using API calls.

Note

Note

With both methods, the number of records you can import depends on your permissions, the type of data you’re importing, and the overall data storage limits for your organization. The type of objects you can import depends on your edition.

Use the Data Import Wizard when:

  • You need to load less than 50,000 records.
  • The objects you need to import are supported by the wizard.
  • You don’t need the import process to be automated.

Use Data Loader when:

  • You need to load 50,000 to five million records. If you need to load more than 5 million records, we recommend you work with a Salesforce partner or visit the AppExchange for a suitable partner product.
  • You need to load into an object that is not supported by the Data Import Wizard.
  • You want to schedule regular data loads, such as nightly imports.
Note

Note

Data Loader uses the SOAP API to process records. For faster processing, you can configure it to use the Bulk API instead. The Bulk API is optimized to load a large number of records simultaneously. It is faster than the SOAP API due to parallel processing and fewer network round-trips.

View this video for more information on choosing the right import tool.

Preparing for Data Import

Follow these steps before you start importing any data.
  1. Use your existing software to create an export file.
  2. Clean up the import file for accuracy and consistency. This involves updating the data to remove duplicates, delete unnecessary information, correct spelling and other errors, and enforce naming conventions.
  3. Compare your data fields with the Salesforce fields you can import into, and verify that your data will be mapped into the appropriate Salesforce fields. You might need to fine-tune the mapping before starting the import. For details, see Field Mapping for Data Sources in the online help.
  4. Make any configuration changes required in Salesforce to handle the imported data. For example, you might need to create new custom fields, add new values to picklists, or temporarily deactivate workflow rules.
Note

Note

Salesforce recommends you import using a small test file first to make sure you’ve prepared your source data correctly.

View this video for more information on cleaning up your import file.

Using the Data Import Wizard

Once you have created an export file and cleaned up the data for import, follow these steps to import data using the Data Import Wizard.
  1. Start the wizard.
    1. From Setup, enter Data Import Wizard in the Quick Find box, then select Data Import Wizard.
    2. Review the information provided on the welcome page, then click Launch Wizard!
  2. Choose the data that you want to import.
    1. Click Standard Objects to import accounts, contacts, leads, or solutions. Click Custom Objects to import custom objects.
    2. Specify whether you want to add new records to Salesforce, update existing records, or add and update records simultaneously.
    3. Specify matching and other criteria as necessary. Hover over the question marks for more information about each option.
    4. Specify the file that contains your data.
      You can specify your data file by dragging the CSV to the upload area of the page or by clicking the CSV category you’re using and then navigating to and selecting the file.
    5. Choose a character encoding method for your file. Most users will not need to change their character encoding.
    6. Click Next.
      Data Import Wizard
  3. Map your data fields to Salesforce data fields.
    The Data Import Wizard tries to map as many of your data fields as possible to standard Salesforce data fields. If Salesforce can’t automatically map fields, however, you’ll need to do it manually. Unmapped fields are not imported into Salesforce.

    To see a list of standard Salesforce data fields, from Setup click Customize, click the object whose fields you’re interested in, and click Fields. For example, if you want to see a list of standard Salesforce fields for leads, click Customize | Leads | Fields.

    1. Scan the list of mapped data fields and locate any unmapped fields.
    2. Click Map to the left of each unmapped field.
    3. In the Map Your Field dialog box, choose the Salesforce field(s) you want to map to and click Map.
      Note

      Note

      The Map Your Field dialog box also gives you the option of saving data from unmapped fields in a general notes field for accounts and contacts. To do so, choose Account Note or Contact Note from the Map To drop-down list and click Map.

    4. To change mappings that Salesforce performed automatically, click Change to the left of the appropriate field, then choose the Salesforce field(s) you want to map to and click Map.
    5. Click Next.
  4. Review and start your import.
    1. Review your import information on the Review page. If you still have unmapped fields that you want to import, click Previous to return to the previous page and specify your mappings.
    2. Click Start Import.
  5. Check import status.
    From Setup, enter “Bulk Data Load Jobs” in the Quick Find box, then select Bulk Data Load Jobs.

Tell Me More...

This information can help you integrate your imported data intoSalesforce.
  • New Values for Picklists and Multi-Select Picklists—If you import a picklist value that doesn’t match an existing picklist value:
    • For an unrestricted picklist, the Data Import Wizard uses the value that’s in the import file.
    • For a restricted picklist, the Data Import Wizard uses the picklist’s default value.
  • Multi-Select Picklists—To import multiple values into a multi-select picklist, separate the values by a semicolon in your import file.
  • Checkboxes—To import data into a checkbox field, use 1 for checked values and 0 for unchecked values.
  • Default Values—For picklist, multi-select picklist, and checkbox fields, if you do not map the field in the import wizard, the default value for the field, if any, is automatically inserted into the new or updated record.
  • Date/Time Fields—Ensure that the format of any date/time fields you are importing matches how they display in Salesforce per your locale setting.
  • Formula Fields—Formula fields cannot accept imported data because they are read-only.
  • Field Validation Rules—Salesforce runs validation rules on records before they are imported. Records that fail validation aren’t imported. Consider deactivating the appropriate validation rules before running an import if they affect the records you are importing.
Share Time Estimate

Having trouble with your challenge verification?

Here are some tips:

  1. Check for typos (hey, it happens)
  2. Try using a new Developer Edition (existing customizations can interfere with the validation)