Importing data into Salesforce is one of the most common and highest-risk admin tasks – done correctly, a data import populates your CRM with clean, well-mapped records; done incorrectly, it creates thousands of duplicate records, corrupts existing data, or loads records with blank required fields that break your automation. Salesforce provides two main import tools: the browser-based Data Import Wizard for simple imports up to 50,000 records, and Salesforce Data Loader for bulk imports and exports of up to 5 million records. This step-by-step guide covers both tools, CSV preparation requirements, field mapping best practices, deduplication strategy, and the most common errors and how to fix them.
The best guide is the one that reduces the chance of bad data entering the system.
A practical explanation should help the reader think about import work as a process rather than a one-time task.
That means the guide should emphasise structure, mapping, and validation.
For many teams, the goal is not just to move data, but to move it cleanly enough that the CRM stays trustworthy.
It should also show how Data Loader and the Import Wizard fit into the work depending on the size and shape of the job.
A good guide should explain why import planning matters before anyone clicks upload.
That makes import quality a core part of CRM setup.
Salesforce data import is useful because every CRM needs a reliable way to bring in contacts, accounts, and other records without creating a mess. The process matters whether a team is moving data once or importing new records on a regular basis.
The best guide is the one that reduces the chance of bad data entering the system.
A practical explanation should help the reader think about import work as a process rather than a one-time task.
That means the guide should emphasise structure, mapping, and validation.
For many teams, the goal is not just to move data, but to move it cleanly enough that the CRM stays trustworthy.
It should also show how Data Loader and the Import Wizard fit into the work depending on the size and shape of the job.
A good guide should explain why import planning matters before anyone clicks upload.
That makes import quality a core part of CRM setup.
Salesforce data import is useful because every CRM needs a reliable way to bring in contacts, accounts, and other records without creating a mess. The process matters whether a team is moving data once or importing new records on a regular basis.
The best guide is the one that reduces the chance of bad data entering the system.
A practical explanation should help the reader think about import work as a process rather than a one-time task.
That means the guide should emphasise structure, mapping, and validation.
For many teams, the goal is not just to move data, but to move it cleanly enough that the CRM stays trustworthy.
It should also show how Data Loader and the Import Wizard fit into the work depending on the size and shape of the job.
A good guide should explain why import planning matters before anyone clicks upload.
That makes import quality a core part of CRM setup.
Salesforce data import is useful because every CRM needs a reliable way to bring in contacts, accounts, and other records without creating a mess. The process matters whether a team is moving data once or importing new records on a regular basis.
The best guide is the one that reduces the chance of bad data entering the system.
A practical explanation should help the reader think about import work as a process rather than a one-time task.
That means the guide should emphasise structure, mapping, and validation.
For many teams, the goal is not just to move data, but to move it cleanly enough that the CRM stays trustworthy.
It should also show how Data Loader and the Import Wizard fit into the work depending on the size and shape of the job.
A good guide should explain why import planning matters before anyone clicks upload.
That makes import quality a core part of CRM setup.
Salesforce data import is useful because every CRM needs a reliable way to bring in contacts, accounts, and other records without creating a mess. The process matters whether a team is moving data once or importing new records on a regular basis.
The best guide is the one that reduces the chance of bad data entering the system.
A practical explanation should help the reader think about import work as a process rather than a one-time task.
That means the guide should emphasise structure, mapping, and validation.
For many teams, the goal is not just to move data, but to move it cleanly enough that the CRM stays trustworthy.
It should also show how Data Loader and the Import Wizard fit into the work depending on the size and shape of the job.
A good guide should explain why import planning matters before anyone clicks upload.
That makes import quality a core part of CRM setup.
Salesforce data import is useful because every CRM needs a reliable way to bring in contacts, accounts, and other records without creating a mess. The process matters whether a team is moving data once or importing new records on a regular basis.
Choosing the Right Import Tool
- Data Import Wizard: Use for Accounts, Contacts, Leads, and custom objects; up to 50,000 records per import; browser-based with guided field mapping; supports duplicate detection using standard Salesforce matching rules; no software installation required
- Data Loader: Use for any Salesforce object (including objects the Import Wizard doesn’t support, like Opportunities and Products); up to 5 million records per operation; desktop application (Windows and Mac) or command-line for automation; supports Insert, Update, Upsert, Delete, and Export operations; no built-in duplicate detection (must manage deduplication in the CSV before import)
- Third-party ETL tools: For complex transformations, multi-system migrations, and ongoing integration use cases, tools like MuleSoft, Informatica Cloud, Talend, or Fivetran are more appropriate than manual Data Loader imports
Part 1: Using the Data Import Wizard
Step 1: Prepare Your CSV File
The import file must be a properly formatted CSV (comma-separated values). Critical preparation rules:
- UTF-8 encoding: Save the CSV as UTF-8 to prevent character encoding errors for non-ASCII characters (accented letters, non-Latin scripts)
- Header row: The first row must contain column headers – these are what you map to Salesforce field API names during import
- No blank rows: Remove any empty rows from the file – blank rows cause import errors
- Date format: Dates must be in the format Salesforce expects – typically MM/DD/YYYY for US orgs or YYYY-MM-DD for international orgs; check your org’s locale settings
- Picklist values: Values in picklist columns must exactly match the picklist values defined in Salesforce – case-sensitive. “Closed Won” will fail if the Salesforce picklist value is “Closed won”
- Lookup fields: For lookup relationships (e.g., the Account Name on a Contact), Salesforce matches by the related record’s Name field by default in the Import Wizard – ensure names match exactly
- Required fields: Include all required Salesforce fields in the CSV – missing required fields cause the entire row to fail on import
Step 2: Access the Data Import Wizard
Setup ? Data ? Data Import Wizard ? Launch Wizard. Select the object you are importing (Accounts, Contacts, Leads, or a Custom Object). Choose the operation:
- Add new records: Inserts new records – does not update existing records
- Update existing records: Updates matched existing records – does not create new records
- Add new and update existing records: Upsert operation – creates new records if no match found, updates if a match is found based on the matching field you specify (typically Salesforce ID or a unique external ID field)
Step 3: Configure Duplicate Handling
For Account and Contact imports, the Import Wizard can check against your org’s Duplicate Rules before inserting records. Configure whether duplicate matches should be blocked (import wizard prevents import of the matching row), allowed with a warning flag, or allowed without flagging. Define the matching field – typically “Email” for Contacts, “Account Name” for Accounts.
Step 4: Map Fields
Upload the CSV file and the Import Wizard displays a field mapping screen: your CSV column headers on the left, Salesforce fields on the right. The wizard auto-maps fields where your column headers exactly match Salesforce field names. Manually map remaining columns. Check mappings carefully – a mapping error (e.g., loading “Annual Revenue” data into the “Phone” field) corrupts existing data on update operations.
Step 5: Review and Start Import
The wizard shows a summary of records to import and fields mapped. Review the count – if the record count is wrong (too few or too many), the CSV has hidden rows or the file was not properly saved. Click Start Import. You receive an email notification when the import completes – the email includes a success/failure count and a link to download the error log for failed rows.
Part 2: Using Salesforce Data Loader
Installing Data Loader
Download Data Loader from Setup ? Data ? Data Loader. Available for Windows (.exe installer) and Mac (.dmg). Requires Java 11 or higher. Data Loader connects to your Salesforce org via OAuth – on first launch, authorise the connection using your Salesforce credentials.
Data Loader Operations
- Insert: Creates new records – does not check for duplicates. Use only when you are certain the records do not exist in Salesforce
- Update: Updates existing records matched by Salesforce ID – the CSV must contain a
Idcolumn with the 18-character Salesforce Record ID of each record to update - Upsert: Insert or update based on a specified external ID field – best practice for ongoing data syncs. Define a custom External ID field on the Salesforce object and use it as the match key in the CSV. If the external ID exists in Salesforce, update that record; if not, create a new record
- Delete: Permanently deletes records specified by Salesforce ID – records go to the Recycle Bin and can be restored within 15 days
- Hard Delete: Permanently deletes records bypassing the Recycle Bin – requires the “Hard Delete” permission and is irreversible
- Export: Exports records from Salesforce to a CSV – use SOQL (Salesforce Object Query Language) queries to define which records and fields to export
- Export All: Exports all records including deleted records in the Recycle Bin
Step-by-Step: Data Loader Insert
- Open Data Loader ? Insert
- Log in to your Salesforce org (production or sandbox – ensure you are connected to the correct environment)
- Select the Salesforce Object to import into (e.g., Opportunity)
- Browse to and select the CSV file
- Map CSV columns to Salesforce fields – click “Create or Edit a Map” and auto-map where possible, then manually map remaining fields. Save the mapping as a .sdl file for reuse
- Click Finish ? Yes to start the import
- When complete, Data Loader shows success count and error count – view errors in the error log CSV that Data Loader saves automatically (contains the failed rows plus an error description column)
The best import plan is the one that protects data quality before the file goes in. If the mapping is careless, cleanup usually takes longer than the import.
The best import plan is the one that protects data quality before the file goes in. If the mapping is careless, cleanup usually takes longer than the import.
The best import plan is the one that protects data quality before the file goes in. If the mapping is careless, cleanup usually takes longer than the import.
The best import plan is the one that protects data quality before the file goes in. If the mapping is careless, cleanup usually takes longer than the import.
The best import plan is the one that protects data quality before the file goes in. If the mapping is careless, cleanup usually takes longer than the import.
Common Data Import Errors and How to Fix Them
- REQUIRED_FIELD_MISSING: A required field has no value in the CSV row. Fix: add the required field to the CSV or set a default value
- INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST: A picklist column contains a value that does not exist in Salesforce’s defined picklist values. Fix: update the CSV values to match Salesforce picklist values exactly (case-sensitive)
- DUPLICATE_VALUE: An External ID field value already exists in Salesforce on another record. Fix: use Upsert instead of Insert, or check and resolve the duplicate before importing
- STRING_TOO_LONG: A text field value exceeds the Salesforce field’s maximum character limit. Fix: truncate the value in the CSV to the field’s limit, or increase the field limit in Salesforce
- UNABLE_TO_LOCK_ROW: Salesforce cannot acquire a lock on the record for update – occurs when another process is simultaneously modifying the same records. Fix: retry the import when the conflicting process has completed
- FIELD_INTEGRITY_EXCEPTION: A lookup field value refers to a record ID that does not exist in Salesforce. Fix: verify the lookup record exists in the target org (especially common when importing between sandbox and production where record IDs differ)
Best Practices for Safe Data Imports
- Always test in a sandbox first: Run the import in a Developer or Partial Copy sandbox before production. Verify the results match expectations before touching production data
- Export a backup before bulk updates: Before any update or delete operation on existing records, export those records to CSV first – giving you a restore point if the operation produces unexpected results
- Import in batches: For large imports (100K+ records), import in batches of 10,000-50,000 rows. Smaller batches make error identification easier and reduce the recovery effort if something goes wrong
- Run imports during off-peak hours: Large imports consume API resources and can slow Salesforce performance for concurrent users. Run during evenings or weekends for large datasets
- Disable validation rules and triggers temporarily for migration imports: For initial data migration imports where historical data must be loaded as-is (not validated), work with your Salesforce developer to temporarily disable relevant validation rules during the import. Re-enable immediately after
- Review the error log completely: Do not assume failed rows are unimportant – parse the error log, fix the underlying data issues, and re-import failed rows in a separate file
Salesforce Data Import: Advanced Techniques and Error Resolution
What is the difference between Salesforce Data Import Wizard and Data Loader?
Salesforce Data Import Wizard is a browser-based import tool built into Salesforce (accessible from Setup > Data Import Wizard or directly from the object record list view). It supports imports of up to 50,000 records, includes duplicate detection, provides a guided field mapping interface, and requires no software installation. It supports standard objects only. Salesforce Data Loader is a free downloadable application (available from Setup > Data Loader) that supports importing, exporting, updating, upserting, and deleting up to 5 million records. It supports all standard and custom objects, works with the Bulk API for high-volume operations, and is operated via a desktop GUI or command line. For simple imports of standard objects under 50,000 records, Data Import Wizard is faster and more user-friendly. For high-volume imports, custom object imports, or automated scheduled imports, Data Loader is the appropriate tool.
How do you export all Salesforce data before a migration?
Salesforce provides two methods for exporting all data: (1) Data Export (Setup > Data Management > Data Export) — generates a ZIP file containing CSV exports of all standard and custom object data. Available weekly (Enterprise/above) or monthly (Professional). This is the fastest way to get a complete data backup. (2) Data Loader Export — allows selective export of any object with custom SOQL filter queries. More flexible than Data Export but requires running separately for each object. For migration purposes: run a full Data Export first for a complete backup, then use Data Loader to export specific objects with field mapping aligned to your target system’s import format. Always verify export completeness by checking record counts: compare the row count in exported CSVs to the record count shown in Salesforce’s object list views before considering the export complete.
Can you undo a Salesforce data import if you make a mistake?
Salesforce does not have a native ‘undo import’ button. To reverse an incorrect import: (1) For records imported in error, use the Data Loader Delete operation with the success.csv file from your import (which contains the Salesforce record IDs of all imported records) as the input file to bulk delete the imported records. (2) For records that were updated (not inserted) incorrectly, you need to re-import the correct data using the same record IDs to overwrite the incorrect values. (3) For complex scenarios involving related records or automation side effects from the import, consider restoring from a Sandbox refresh or contacting Salesforce Support for a data restore from backup — Salesforce Support can restore data from backup points, though this typically incurs a fee and affects the entire org’s data, not just the imported records.
What is the maximum record limit for a Salesforce data import?
Salesforce’s data import limits are: Data Import Wizard maximum: 50,000 records per import operation. Data Loader maximum: 5 million records per import operation using the Bulk API (which processes records asynchronously in batches). For orgs with more than 5 million records to import, split the import across multiple Data Loader operations or use Salesforce’s partner ETL tools (Informatica, Talend, Jitterbit) which have higher throughput and more sophisticated error handling. There are also daily API call limits that affect how many records can be processed per day depending on your Salesforce edition — Enterprise allows 1,000 API calls per Salesforce license per day. If you are importing very large datasets (millions of records), schedule imports during off-peak hours to avoid consuming API call limits needed for regular production operations.
Problem: Data Loader Import Fails Midway and Creates Partial Records
Salesforce Data Loader imports fail midway when records in the CSV file violate validation rules, exceed field length limits, or reference records that don’t exist. When a large import fails at record 5,000 of 10,000, you end up with half the data imported and the other half missing — a difficult state to diagnose and resolve. To handle large imports safely: (1) Always split large imports into batches of 2,000-5,000 records rather than one single import operation. Smaller batches are easier to troubleshoot and can be re-run individually when errors occur. (2) Review Data Loader’s success.csv and error.csv output files after every import run — these files show exactly which records imported successfully (with their new Salesforce IDs) and which failed (with error messages). (3) Before your main import, run a test import of the first 50 records and verify all look correct in Salesforce before committing to the full batch — this catches field mapping errors and validation rule conflicts early.
Problem: Duplicate Records Are Created During Salesforce Data Import
Salesforce’s Data Import Wizard offers duplicate-checking during import (using Salesforce’s configured Duplicate Rules), but Data Loader does not automatically check for duplicates — it creates new records for every row in your import file regardless of whether matching records already exist. This causes duplicates when importing updated records for existing contacts or accounts. To prevent import duplicates: (1) Use the ‘Update’ operation in Data Loader (not ‘Insert’) for records that already exist in Salesforce — Update requires Salesforce record IDs in your import file to match existing records. (2) For initial imports where you don’t have Salesforce record IDs, use the Data Import Wizard which does offer duplicate detection as part of the import flow. (3) After any large import, run Salesforce’s native Duplicate Jobs (Setup > Duplicate Management > Duplicate Jobs) to identify and merge any duplicates that slipped through the import process.
Problem: Data Import Field Mappings Fail Because of Picklist Value Mismatches
Salesforce picklist fields only accept values that are configured in the picklist definition. When importing data where picklist values differ from Salesforce’s configured options (e.g., your source system uses ‘California’ but Salesforce expects ‘CA’ in the State field, or uses different status names than Salesforce’s configured values), the import fails for those records with a ‘Invalid picklist value’ error. To resolve picklist mismatches: (1) Before importing, export Salesforce’s picklist values for each relevant field (Setup > Object Manager > field > Values) and compare them with your source data values. (2) In your import preparation spreadsheet, add a VLOOKUP or mapping table to transform source system picklist values to exact Salesforce equivalents before generating the import file. (3) For fields where your source data has values not in Salesforce’s picklist, add those values to the Salesforce picklist configuration before importing — don’t modify your source data to match incomplete Salesforce picklist definitions.
