Sub topic 1
Which tool to use: wizard or Data Loader
Salesforce gives you two standard ways to load records from a CSV file. The Data Import Wizard runs in your browser. Data Loader is a desktop application. Both read CSV files and write records through Salesforce, but they differ in volume limits, supported operations, supported objects, and the controls they give you. This chapter gives you the criteria for choosing one before you spend time preparing data.
Prerequisites
This chapter assumes you already have the following:
- Basic familiarity with Salesforce objects, records, and fields.
- The ability to create and edit CSV files in a spreadsheet or text editor.
- A Salesforce org. A sandbox or Developer Edition org is best for practice.
- Permission to create records on the target object and to use the import tools.
The two tools at a glance
The Data Import Wizard is a guided import page inside Salesforce. You open it from Setup, upload a CSV file, map columns to fields, and start the job. It needs no installation. It is designed for administrators and, for some objects, ordinary users.
Data Loader is a client application, written in Java, that you install on Windows or macOS. You log in to your org, pick an operation, choose a CSV file, map fields, and run. It talks to Salesforce through the API, so your user needs the API Enabled permission.
The wizard is simpler. Data Loader does more. Most decisions come down to whether the simpler tool can do the job you have.
Comparing the tools
The figures below reflect Salesforce's documented limits at the time of writing. Limits change between releases, so check the current documentation for your org before you plan a large job.
| Criterion | Data Import Wizard | Data Loader |
|---|---|---|
| Where it runs | In the browser | Installed desktop application |
| Setup effort | None | Download, install, log in |
| Records per job | Up to 50,000 | Up to about 5 million |
| Operations | Insert, update, or both in one job | Insert, update, upsert, delete, hard delete, export, export all |
| Objects | Accounts, contacts, leads, solutions, campaign members, person accounts, and custom objects | Almost all objects that the API exposes |
| Matching existing records | Built-in options such as name, email, Salesforce ID, or external ID | You choose the operation and supply IDs or an external ID field |
| Field mapping | Interactive page; auto-matches similar names | Mapping dialog; can be saved to a file and reused |
| Results | Email summary and an error file | Success and error CSV files for every run |
| Automation | None | Command-line mode and scheduling through the operating system |
| Backup and export | Not supported | Export and export all with SOQL queries |
When the wizard is the right choice
Choose the wizard when all of the following are true:
- The object is one the wizard supports.
- You have fewer than 50,000 rows.
- You only need to add new records, update existing ones, or both.
- You want Salesforce to find duplicates for you using its matching options.
- You cannot or do not want to install software.
A typical wizard job is loading a trade-show list of a few hundred leads, or adding a batch of new accounts from a spreadsheet. Here is a minimal insert file for the Account object. The wizard and Data Loader can both load it.
Name,Phone,Industry,Website
Acme Corp,555-0100,Manufacturing,https://www.acme.example
Globex Ltd,555-0101,Technology,https://www.globex.exampleBecause the wizard handles duplicate matching in its own screens, it is often the safer option for people who import occasionally.
When Data Loader is the right choice
Choose Data Loader when any one of these is true:
- You need to delete records or export data. The wizard can do neither.
- The object is not supported by the wizard. Opportunities are a common example.
- You have more than 50,000 rows.
- You need an upsert keyed on an external ID.
- You need to match rows by Salesforce record ID to update specific records.
- You want to repeat the same job on a schedule from the command line.
- You need per-row success and error files that you can fix and reload.
Updates are a good example. In Data Loader, an update file carries the record Id in the first column. The other columns hold the new values. The IDs below are placeholders. You would replace them with real ones from an export.
Id,Phone,Industry
001XXXXXXXXXXXXXXX,555-0199,Energy
001YYYYYYYYYYYYYYY,555-0198,RetailYou can get those IDs with an export. This SOQL query, run through Data Loader's export operation, returns the IDs and also gives you a backup of the current values before you change anything.
SELECT Id, Name, Phone, Industry FROM Account WHERE Industry = 'Energy'The wizard has no equivalent for this kind of precise, ID-driven change.
A decision flow
The diagram below follows the questions in the order that eliminates the wizard fastest. A "no" to any of the first three questions sends you to Data Loader.
Behavior differences that affect your choice
Duplicate handling
The wizard is built around matching. When you update, it can match contacts and leads by name, email, or Salesforce ID, and accounts by name and site. For many jobs, this is enough to avoid duplicates without extra preparation.
Data Loader does not match by name for you. An insert always creates new rows. If you load the same file twice, you get two sets of records, unless a duplicate rule on the object blocks them. To avoid duplicates, you must use update with a Salesforce ID, or upsert with an ID or an external ID. A later chapter covers these in detail.
Automation and triggers
Imports can fire automation on the object, such as triggers, flows, and validation rules. Validation rules and required fields apply to both tools, and rows that fail them are rejected. The wizard has an option to trigger workflow rules and processes for the records it creates or updates. Data Loader runs whatever automation the API path would run. Test the effect of your automation in a sandbox with a small file first, whichever tool you pick.
API usage and speed
Data Loader uses the Salesforce API, so its calls count against your org's API limits. It can use the SOAP API in batches, or the Bulk API for large volumes. Batch size and API choice change both the speed and the way errors are reported. Those settings get their own chapter.
The wizard does not require you to think about API choices. It is also slower to set up per job for large or repeated work, because you walk through the screens each time.
Error reporting
When rows fail, both tools tell you. The wizard emails you a summary and gives an error file. Data Loader writes a success file and an error file for every run. The error file contains the original row plus an error message, so you can correct the data and reload only the failed rows. That workflow is much of Data Loader's value on large jobs.
Permissions
The wizard needs permission to create records on the object plus the relevant import permission. Which one depends on the object. Data Loader needs API Enabled and object-level permission for the operation. Hard delete needs an extra permission, which administrators usually restrict. If the tool you want is unavailable to you, ask your administrator before looking for a workaround.
Common mistakes when choosing
- Starting in the wizard and hitting a wall. You prepare a file, then find the object is unsupported or the job needs a delete. Check the criteria in the table first.
- Using Data Loader insert to "refresh" data. This creates duplicates. Use update or upsert.
- Assuming the wizard can back up data. It cannot export. Use Data Loader export or a report before a bulk change.
- Ignoring the row limit. A file with 60,000 rows will not load in one wizard job. Use Data Loader, or split the file.
- Skipping the sandbox. Both tools write real data. A small test run takes minutes and can save a long cleanup.
What you carry into the next chapters
The next chapters follow both paths. You will first prepare a clean CSV, since both tools depend on it. Then you will run the wizard, with its matching options. After that you will install Data Loader and work through its operations, field mapping, relationships and external IDs, result files, performance settings, and command-line use. The choice you make now decides which of those chapters you need for a given job.
Exercise
You must update the Phone field on 120,000 existing Account records, and you also want a copy of the current values before you change them. Which tool do you use, and why?
Show answer
Use Data Loader. The job exceeds the wizard's 50,000-record limit, and the wizard cannot export. First run an export with a SOQL query such as SELECT Id, Name, Phone FROM Account to get the IDs and a backup. Then run an update using a CSV that has the Id column plus the new Phone values.
Exercise
A colleague has 800 new leads in a spreadsheet. Some may already exist in Salesforce, and she cannot install software on her laptop. Which tool fits, and which feature helps with the duplicates?
Show answer
The Data Import Wizard fits. It runs in the browser, supports leads, handles 800 rows easily, and can match existing records, for example by email, so it can update existing leads rather than create duplicates.