Fatskills
Practice. Master. Repeat.
Study Guide: TECH **Salesforce Data Import Tools: Zero-Fluff, Hands-On Guide**
Source: https://www.fatskills.com/salesforce-certification/chapter/tech-salesforce-data-import-tools-zero-fluff-hands-on-guide

TECH **Salesforce Data Import Tools: Zero-Fluff, Hands-On Guide**

By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.

⏱️ ~10 min read

Salesforce Data Import Tools: Zero-Fluff, Hands-On Guide

(Data Loader vs. Data Import Wizard – When, Why, and How to Use Each Like a Pro)


1. What This Is & Why It Matters

You’re a Salesforce Admin. Your company just acquired a smaller firm, and you’ve got 50,000 new Contacts, 10,000 Accounts, and 3,000 Opportunities sitting in a CSV file. Or maybe your sales team exported a list of leads from a trade show and needs them in Salesforce yesterday. Or worse—your org’s data is a mess, and you need to clean, deduplicate, and re-import thousands of records without breaking existing relationships.

This is where Data Import Tools come in.
- Data Import Wizard (DIW): The "easy button" for small, simple imports (≤50K records). No install, no CLI, just point-and-click.
- Data Loader: The "Swiss Army knife" for large, complex, or automated imports (up to 5M records). Requires a desktop app or CLI, but gives you full control—upserts, hard deletes, external IDs, and scheduled jobs.

Why this matters in production:
- If you use the wrong tool, you’ll either waste hours on a simple import (Data Loader for 100 records) or hit hard limits (DIW choking on 60K records).
- If you don’t prep your data, you’ll create duplicates, break relationships, or corrupt picklist values.
- If you don’t test first, you might overwrite live data (e.g., accidentally updating all Opportunities to "Closed Lost" because your CSV had a blank column).

Real-world scenario:
You’re migrating 200K Leads from a legacy system. Some already exist in Salesforce (matched by Email), some are new, and some need to be merged with existing records. Data Import Wizard can’t handle this—you need Data Loader with an upsert operation and an external ID (Email) to avoid duplicates.


2. Core Concepts & Components


? Data Import Wizard (DIW)

  • What it is: A browser-based tool for simple imports (Accounts, Contacts, Leads, Solutions, Campaign Members, Custom Objects).
  • Production insight: ⚠️ Hard limit of 50,000 records per import. If you try to import 50,001, it fails silently (no error, just no records imported).
  • Key features:
  • Deduplication: Can match on Email (Leads/Contacts) or Name (Accounts).
  • Field mapping: Auto-matches CSV columns to Salesforce fields (but you should always verify).
  • No install needed: Works in any browser (but Chrome is most reliable).
  • When to use it:
  • Small imports (<50K records).
  • One-time migrations (e.g., importing a trade show lead list).
  • When you don’t need advanced operations (upsert, hard delete, external IDs).

? Data Loader

  • What it is: A desktop app (Windows/Mac) or CLI tool for large, complex, or automated imports/exports.
  • Production insight: ⚠️ Requires API access (Enterprise, Unlimited, or Performance Edition). If you’re on Professional Edition, you’re out of luck.
  • Key features:
  • Handles up to 5M records per operation.
  • Supports upsert, insert, update, delete, and hard delete.
  • Uses external IDs (e.g., match on Customer_ID__c instead of Salesforce ID).
  • CLI mode for automation (e.g., nightly imports from an ERP system).
  • Bulk API (faster for large datasets) or SOAP API (better for small, real-time operations).
  • When to use it:
  • Large imports (>50K records).
  • Complex operations (upsert, hard delete, external IDs).
  • Automated/scheduled imports (e.g., daily sync with a database).
  • When you need error logs (DIW gives vague errors; Data Loader provides a detailed CSV of failures).

? CSV File Requirements

  • What it is: A comma-separated (or tab-delimited) file with your data.
  • Production insight: ⚠️ Salesforce is picky about CSV formatting.
  • No special characters in headers (e.g., Account NameAccount_Name__c).
  • Dates must be in YYYY-MM-DD format (or your org’s default).
  • Picklist values must match exactly (case-sensitive).
  • Required fields must be included (e.g., LastName for Contacts).
  • Pro tip: Use Excel’s "Save As → CSV UTF-8" to avoid encoding issues.

? External ID

  • What it is: A custom field marked as "External ID" (e.g., Customer_ID__c) that lets you match records without Salesforce IDs.
  • Production insight: ⚠️ Critical for upserts and avoiding duplicates.
  • Example: You’re importing Orders from an ERP system. Instead of using Salesforce’s Order_ID__c, you match on ERP_Order_Number__c (an External ID).
  • Must be unique (no duplicates in the field).

? Upsert Operation

  • What it is: A combo of insert + update—if a record exists (matched by External ID or Salesforce ID), it updates; if not, it inserts.
  • Production insight: ⚠️ The most powerful (and dangerous) operation in Data Loader.
  • Example: You’re importing 100K Leads. Some already exist (matched by Email). Upsert will update existing records and insert new ones in a single operation.
  • If you don’t use an External ID, it defaults to Salesforce ID (which you usually don’t have in your CSV).

? Bulk API vs. SOAP API

  • Bulk API:
  • What it is: Optimized for large datasets (50K+ records).
  • Production insight: ⚠️ Faster, but has a 10K record batch limit. If you import 100K records, Data Loader splits it into 10 batches.
  • Use for: Large imports/exports, scheduled jobs.
  • SOAP API:
  • What it is: Better for small, real-time operations.
  • Production insight: ⚠️ Slower for large datasets, but more reliable for small ones.
  • Use for: Small imports (<10K records), real-time syncs.

? Error Handling & Success Files

  • What it is: Data Loader generates two CSV files after every operation:
  • Success file: Records that imported successfully (includes Salesforce IDs).
  • Error file: Records that failed (with error messages, e.g., "Required field missing: LastName").
  • Production insight: ⚠️ Always check the error file. DIW gives vague errors ("Some records failed"); Data Loader tells you exactly which rows failed and why.


3. Step-by-Step Hands-On: Importing 10K Contacts with Data Loader


Prerequisites

Salesforce org (Developer, Enterprise, or Unlimited Edition).
Data Loader installed (Download here).
CSV file with 10K Contacts (example structure below).
API access enabled (Setup → Users → Your User → "API Enabled" checkbox).

Step 1: Prep Your CSV File

Your CSV should look like this (save as contacts_import.csv):


FirstName,LastName,Email,AccountId,Title
John,Doe,[email protected],0015e00000ABC123,CEO
Jane,Smith,[email protected],0015e00000ABC456,CTO

Critical checks:
- No blank rows (Data Loader skips them, but they waste API calls).
- No special characters in headers (e.g., Account NameAccount_Name__c).
- Required fields included (LastName for Contacts).
- AccountId is valid (or use an External ID like Account_Number__c).

Step 2: Launch Data Loader & Log In

  1. Open Data Loader.
  2. Click Insert (or Upsert if you’re updating existing records).
  3. Enter your Salesforce username and password + security token (if required).
  4. ⚠️ If you don’t have a security token, reset it: Setup → Users → Your User → "Reset Security Token."
  5. Click Next.

Step 3: Choose Your Object & CSV File

  1. Select Contact from the dropdown.
  2. Click Browse and select contacts_import.csv.
  3. Click Next.

Step 4: Map Fields

Data Loader will auto-map fields where the CSV header matches the Salesforce field name.

Verify mappings:
- FirstNameFirstName - LastNameLastName - EmailEmail - AccountIdAccountId (or Account_Number__c if using External ID) - TitleTitle

If a field is missing:
- Click the dropdown and select the correct field.
- ⚠️ Never leave a field unmapped—it’ll import as blank.

Step 5: Choose API & Run the Import

  1. Select Bulk API (faster for 10K records).
  2. Click Next.
  3. Choose where to save the success and error files (e.g., Desktop/DataLoader_Output).
  4. Click Finish.

Step 6: Monitor & Troubleshoot

  • Success: Data Loader shows a popup with "10,000 records processed successfully."
  • Errors: If any records fail, check the error file (e.g., error_Contact_20240515.csv).
  • Common errors:
    • REQUIRED_FIELD_MISSING: Required fields are missing: [LastName] → Fix your CSV.
    • INVALID_FIELD_FOR_INSERT_UPDATE: Unable to create/update fields: AccountId → Check if AccountId is valid.
    • DUPLICATE_VALUE: duplicate value found: Email duplicates value on record with id: 0035e00000XYZ789 → Use upsert with Email as External ID.

Step 7: Verify in Salesforce

  1. Go to Contacts tab.
  2. Click Recently ViewedAll Contacts.
  3. Verify that 10,000 new records appear.
  4. Spot-check a few records (e.g., open John Doe’s Contact and confirm Title = CEO).

4. ? Production-Ready Best Practices


? Security

  • Never hardcode credentials in Data Loader settings. Use OAuth or encrypted config files for automation.
  • Restrict API access to only the users who need it (Setup → Profiles → "API Enabled").
  • Use External IDs instead of Salesforce IDs in CSVs (IDs change in sandboxes; External IDs don’t).
  • Mask sensitive data in error logs (e.g., don’t log Password__c fields).

? Cost Optimization

  • Use Bulk API for large datasets (faster, fewer API calls).
  • Batch size matters:
  • 10K records per batch (default) is a good balance.
  • Smaller batches (2K-5K) if you’re hitting governor limits.
  • Larger batches (up to 10K) for simple objects (e.g., Leads).
  • Avoid unnecessary imports:
  • Filter your CSV before importing (e.g., only import Contacts where Status = "Active").
  • Use SOQL queries to export only what you need.

?️ Reliability & Maintainability

  • Always test in a sandbox first. Never import directly into production.
  • Use a naming convention for CSV files (e.g., 20240515_Contacts_Import.csv).
  • Document your imports:
  • What was imported?
  • Who ran it?
  • What was the source system?
  • Example:
    ```markdown
    ## 2024-05-15 Contact Import
    • Source: ERP System (exported by Jane Doe)
    • Operation: Upsert (matched on Email)
    • Records: 10,000 (9,987 success, 13 errors)
    • Error File: error_Contact_20240515.csv ```
  • Backup before importing. Export existing data (e.g., SELECT Id, Email FROM Contact) before running an update/upsert.

?️ Observability

  • Monitor API usage: Setup → System Overview → "API Usage Notifications."
  • Set up alerts for failed imports (e.g., if error file has >1% failures).
  • Log Data Loader operations (enable logging in Data Loader settings).
  • Check "Apex Jobs" (Setup → Environments → Jobs → Apex Jobs) for Bulk API status.


5. ⚠️ Common Mistakes & Traps

Mistake Symptom Fix/Prevention
Using Data Import Wizard for >50K records Import fails silently (no error, no records). Use Data Loader for large datasets.
Not using External IDs for upserts Duplicates created (e.g., same Contact imported twice). Mark Email (or another unique field) as an External ID and use it for matching.
CSV formatting errors "Invalid field" errors or blank data. - Use UTF-8 encoding.
- Remove special characters from headers.
- Ensure dates are in YYYY-MM-DD format.
Ignoring error files "Some records failed" with no details. Always check the error CSV—it tells you exactly which rows failed and why.
Importing into production without testing Overwritten data, duplicates, or broken relationships. Always test in a sandbox first. Use a small subset (e.g., 100 records) to verify.
Not mapping required fields "REQUIRED_FIELD_MISSING" errors. Check object field requirements (e.g., LastName for Contacts) and include them in your CSV.
Using Salesforce IDs in sandboxes Records fail to import (IDs change in sandboxes). Use External IDs (e.g., Customer_ID__c) instead of Salesforce IDs.


6. ? Exam/Certification Focus (Salesforce Admin)


Typical Question Patterns

  1. "Which tool should you use to import 60,000 Leads?"
  2. Data Loader (DIW has a 50K limit).
  3. ❌ Data Import Wizard.

  4. "You need to update 10,000 existing Accounts and insert 5,000 new ones. Which operation should you use?"

  5. Upsert (insert + update in one operation).
  6. ❌ Insert (would create duplicates) or Update (would miss new records).

  7. "How do you avoid duplicates when importing Contacts?"

  8. Use an External ID (e.g., Email) and upsert.
  9. ❌ Insert (will create duplicates).

  10. "What’s the maximum batch size for Bulk API?"

  11. 10,000 records per batch.
  12. ❌ 50,000 (that’s the DIW limit).

  13. "Where do you find detailed error logs for a failed import?"

  14. Data Loader’s error CSV file.
  15. ❌ Data Import Wizard (gives vague errors).

Key ⚠️ Trap Distinctions

Concept Data Import Wizard Data Loader
Record Limit 50,000 5,000,000
Operations Insert, Update Insert, Update, Upsert, Delete, Hard Delete
External IDs ❌ No ✅ Yes
Automation ❌ No ✅ Yes (CLI mode)
Error Logging Vague ("Some records failed") Detailed CSV with row-level errors
API Access Required ❌ No ✅ Yes

Common Scenario-Based Question

"You need to import 200,000 Leads from a CSV. Some already exist in Salesforce (matched by Email). What’s the most efficient way to do this?"

Answer:
1. Mark Email as an External ID (Setup → Object Manager → Lead → Fields → Email → "External ID").
2. Use Data Loader with an upsert operation, matching on Email.
3. Use Bulk API (faster for 200K records).
4. Test in a sandbox first with a small subset (e.g., 1,000 records).

Wrong Answers:
- "Use Data Import Wizard" (fails at 50K limit).
- "Insert all records and deduplicate later" (creates duplicates).
- "Use SOAP API" (slower for large datasets).


7. ? Hands-On Challenge (With Solution)


Challenge:

You have a CSV (accounts_import.csv) with 5,000 Accounts. Some already exist in Salesforce (matched by Account_Number__c, an External ID). Some are new. Import them without creating duplicates.

Solution:

  1. Mark Account_Number__c as an External ID (if not already).
  2. Use Data Loader → Upsert.
  3. Select "Account" as the object.
  4. Choose accounts_import.csv.
  5. Map Account_Number__c to the External ID field.
  6. Run the import.

Why it works:
- Upsert updates existing records (matched by Account_Number__c) and inserts new ones.
- External ID ensures no duplicates are created.


8. ? Rapid-Reference Crib Sheet

Task Command/Action Notes
Install Data Loader Download here Windows/Mac only.
Log in to Data Loader Username + Password + Security Token ⚠️ Reset token if missing.
Max records per import Data Import Wizard: 50K
Data Loader: 5M
⚠️ DIW fails silently at 50K+.
Best API for large imports Bulk API Faster, but 10K batch limit.
Best API for small imports SOAP API Sl


ADVERTISEMENT