Salesforce Lead Data Loader: How to Insert Leads Using Data Loader
Salesforce Lead Data Import is one of the most common tasks performed by Salesforce Administrators. Whether you’re migrating from another CRM, importing marketing contacts, or loading conference attendees, Salesforce Data Loader makes it easy to insert large volumes of Lead records quickly and accurately.
Unlike importing Accounts or Contacts, Lead imports require additional planning, including required fields, Lead Assignment Rules, and proper data preparation. Taking the time to prepare your data helps prevent import errors, maintain data quality, and ensure Leads are assigned to the correct sales representatives.
In this guide, you’ll learn how to perform a Salesforce Lead Data Import, prepare your CSV file, configure Data Loader, apply Lead Assignment Rules, troubleshoot common errors, and verify your imported records after the process is complete.
By the end of this tutorial, you’ll know how to:
- Prepare Lead data for a successful import.
- Understand the difference between B2B and B2C Lead requirements.
- Identify required Lead fields.
- Configure Lead Assignment Rules for Data Loader.
- Prepare your CSV file for insertion.
- Insert Leads using Salesforce Data Loader.
- Review success and error files.
- Verify imported Lead records.
Before importing Leads into Salesforce, ensure you have:
- Salesforce Data Loader installed.
- API access enabled.
- Permission to insert Lead records.
- Access to Lead Assignment Rules (if applicable).
- A completed Lead spreadsheet ready for import.
- A Salesforce Sandbox or Developer Org for testing (recommended).
🚀 Best Practice: Always test your Lead import in a Sandbox or Developer Org before importing into Production.
Prefer video instructions? Watch the tutorial here
Table of Contents
Understanding Salesforce Leads
Before starting a Salesforce Lead Data Import, it’s important to understand how the Lead object works in Salesforce.
A Lead represents a potential customer who has not yet been qualified by your sales team.
Common sources of Lead data include:
- Website forms
- Purchased marketing lists
- Trade show attendees
- Referrals
- CRM migrations
Once qualified, a Lead can be converted into:
- Account
- Contact
- Opportunity (optional)
Understanding the Lead lifecycle before performing a Salesforce Lead Data Import helps ensure your data is prepared correctly and imported into the appropriate Salesforce records.
B2B vs. B2C Lead Models
Salesforce supports both Business-to-Business (B2B) and Business-to-Consumer (B2C) Lead models.
Understanding which model your organization uses helps determine which fields are required during import.
B2B Leads
In a B2B environment, Leads represent people associated with a company.
Required fields include:
- Company Name
- Last Name
After conversion, Salesforce creates:
- Account
- Contact
Example:
| Company | First Name | Last Name |
|---|---|---|
| Acme Inc. | Sarah | Jones |
B2C Leads
Organizations using Person Accounts (such as Financial Services Cloud or Nonprofit Cloud) can support B2C Leads.
For B2C Leads:
- Only the Last Name is required.
- Company is not used during conversion.
- Salesforce creates a Person Account instead of a traditional Account and Contact.
Example:
| First Name | Last Name |
|---|---|
| Emily | Carter |
Missing Required Fields
One of the most common reasons Lead imports fail is missing required values.
If you’re importing B2B Leads and some records don’t contain a company name, Salesforce will reject those rows.
Instead of leaving required fields blank, populate them with placeholder values.
Example:
| Missing Field | Placeholder Value |
|---|---|
| Company | Unknown Company |
| Last Name | Unknown Last Name |
These placeholders allow the records to be inserted while making it easy to identify incomplete data later.
🚀 Best Practice: Never leave required Lead fields blank. Using consistent placeholder values prevents import failures and makes data cleanup easier after migration.
Required Lead Fields
Depending on your Salesforce configuration, additional custom fields may be required. However, every standard Lead import should include these essential fields.
| Field | Required | Description |
|---|---|---|
| Last Name | ✅ | Required for every Lead. |
| Company | ✅ (B2B) | Required for business Leads. |
| Lead Status | ✅ | Defines the Lead’s current status. |
| Optional | Used for communication and duplicate detection. | |
| Phone | Optional | Contact phone number. |
| Lead Source | Optional | Indicates where the Lead originated. |
If your organization uses audit fields, you may also include:
- Created By ID
- Created Date
These fields require Salesforce permissions to preserve historical data.
Prepare the Lead Workbook
Before exporting your data as a CSV file, review your workbook carefully.
Cleaning your data before import reduces failed records and makes troubleshooting much easier.
Step 1: Check for Blank Company Names
If you’re importing B2B Leads, filter the Company column and look for blank values.
Replace blank cells with a placeholder such as: Unknown Company
This satisfies Salesforce’s required Company field.
Step 2: Check for Missing Last Names
Every Lead must contain a Last Name.
Filter the Last Name column and replace blank values with: Unknown Last Name
This prevents validation errors during import.
Step 3: Populate Lead Status
Every Lead record should include a valid Lead Status.
Examples include:
- Open
- Working
- New
- Qualified
- Contacted
Ensure every row contains a status that exists in your Salesforce organization.
Step 4: Review Audit Fields
If your organization preserves historical data, include the appropriate audit fields.
Common audit fields include:
| Field | Purpose |
|---|---|
| Created By ID | Original record creator |
| Created Date | Original creation date |
These fields require special permissions before Data Loader can populate them.
🚀 Best Practice: Only include audit fields when preserving historical records during a migration. For new Lead imports, Salesforce automatically populates these values.
Configure Lead Assignment Rules
One of the biggest advantages of using Salesforce Data Loader is the ability to apply your organization’s active Lead Assignment Rule during a Lead import.
Instead of assigning every imported Lead to a single user, Salesforce can automatically distribute Leads based on your existing assignment logic.
This helps ensure Leads are routed to the correct sales representatives immediately after they’re imported.
What Is a Lead Assignment Rule?
A Lead Assignment Rule automatically assigns new Leads to users or queues based on conditions you define.
For example, you can assign Leads based on:
- Country or region
- Lead Source
- Industry
- Product interest
- Company size
- Custom fields
When Data Loader is configured with an Assignment Rule ID, every imported Lead is evaluated against these rules during the insert process.
🚀 Best Practice: If your sales team already relies on Lead Assignment Rules, use them during your Data Loader import instead of manually assigning Lead Owners.
Find the Active Lead Assignment Rule
Before importing Leads, you’ll need the Assignment Rule ID.
Although you can view Lead Assignment Rules in Salesforce Setup, the easiest way to retrieve the ID is by exporting the Assignment Rule object with Data Loader.
Export the Assignment Rule Object
Follow these steps to retrieve your Assignment Rule ID.
Step 1: Open Data Loader
Launch Salesforce Data Loader and log in to your Salesforce organization.
Step 2: Select Export
From the Data Loader home screen:
- Click Export.
- Select Show All Salesforce Objects.
This option displays standard and hidden Salesforce objects.
Step 3: Choose the Assignment Rule Object
Search for: Assignment Rule
Although the object name doesn’t specifically mention Leads, it stores assignment rules for both Leads and Cases.
Select the object and continue.
Step 4: Export All Fields
Choose a location for the export file.
Select All Fields, then click Finish.
Data Loader will generate a CSV containing every Assignment Rule in your Salesforce organization.
Identify the Active Rule
Open the exported CSV.
Locate the following columns:
- Active
- ID
- Object Type
Find the row where:
- Active = TRUE
- Object Type = Lead
Example:
| Active | Object Type | Assignment Rule ID |
|---|---|---|
| TRUE | Lead | 01QXXXXXXXXXXXXXXX |
Copy the Assignment Rule ID.
This value will be entered into Data Loader before importing Leads.
Configure Data Loader Settings
After obtaining the Assignment Rule ID, configure Data Loader to use it during Lead imports.
Step 1: Open Data Loader Settings
In Data Loader:
- Click Settings.
- Scroll to the Lead and Case import options.
Step 2: Enter the Assignment Rule ID
Locate the setting: Assignment Rule ID for Cases and Leads Import
Paste the Assignment Rule ID you copied from the export. Click OK to save your settings.
Once configured, every imported Lead will automatically be evaluated against the active Lead Assignment Rule.
🚀 Best Practice: Double-check that the Assignment Rule is active before importing Leads. Using an inactive rule ID will prevent automatic Lead assignment.
Configure the Email Opt Out Field
One field that commonly causes confusion during Lead imports is Email Opt Out.
Unlike most standard Lead fields, Email Opt Out may not be editable by default due to Field-Level Security settings.
If this field isn’t accessible, it won’t appear in Data Loader during field mapping.
Why Email Opt Out May Not Appear
If the Email Opt Out field doesn’t appear in Data Loader, it’s usually because the importing user’s profile doesn’t have permission to edit the field.
This is controlled through Field-Level Security (FLS).
Enable Field-Level Security
To make the Email Opt Out field available:
Step 1: Open the Lead Object
In Salesforce Setup:
- Go to Object Manager.
- Select Lead.
Step 2: Open the Email Opt Out Field
Locate the Email Opt Out field.
Open the field settings.
Step 3: Set Field-Level Security
Select Set Field-Level Security.
Ensure your importing profile (typically System Administrator) has:
- Visible
- Read Access
- Edit Access
Save your changes.
The Email Opt Out field will now be available when mapping fields in Data Loader.
🚀 Best Practice: Verify Field-Level Security before opening Data Loader. If permissions are changed while Data Loader is already open, refresh or restart the application before mapping fields.
Prepare the CSV File
With your workbook complete and Data Loader configured, the final step before importing is creating your CSV file.
Step 1: Verify Your Data
Before saving the file, confirm that:
- Company names are populated for B2B Leads.
- Last Names are present for every Lead.
- Lead Status is completed.
- Required custom fields are populated.
- Assignment Rule settings have been configured in Data Loader.
Step 2: Review Owner ID
If you’re using a Lead Assignment Rule:
Do not include Owner ID.
Salesforce will automatically assign each Lead based on the Assignment Rule.
Only include Owner ID when you want to bypass Lead Assignment Rules and assign Leads directly to specific users.
Step 3: Save as CSV
Once your workbook has been reviewed:
- Select File → Save As.
- Choose CSV (Comma delimited).
- Save the file with a descriptive name.
Example: Leads_Prepared.csv
Your CSV is now ready to be imported using Salesforce Data Loader.
CSV Preparation Checklist
Before moving on to the insert process, verify the following:
| Checklist | Status |
|---|---|
| Company populated for B2B Leads | ✅ |
| Last Name completed | ✅ |
| Lead Status assigned | ✅ |
| Required custom fields completed | ✅ |
| Assignment Rule ID configured | ✅ |
| Email Opt Out permissions verified | ✅ |
| Saved as CSV | ✅ |
🚀 Best Practice: Perform one final review of your CSV before importing. Catching missing values or incorrect field names now is much faster than troubleshooting failed records after the import.
Insert Salesforce Leads Using Data Loader
Once your CSV file has been prepared and Data Loader has been configured, you’re ready to import your Lead records into Salesforce.
During this process, you’ll select the Lead object, map your fields, execute the import, and review the results.
Select the Lead Object
Begin the import by opening Salesforce Data Loader.
Step 1: Click Insert
From the Data Loader home screen, select: Insert
The Insert operation creates new Lead records in Salesforce.
Step 2: Choose the Lead Object
From the list of Salesforce objects, select: Lead
Click Browse and select the CSV file you prepared in the previous section.
Example: Leads_Prepared.csv
After selecting the file, click Next.
Map the Fields
Data Loader will now prompt you to map the columns in your CSV file to Salesforce Lead fields.
Accurate field mapping ensures your data is imported into the correct Salesforce fields.
Use Auto-Match
Click Create or Edit a Map, then select Auto-Match Fields to Columns.
If your CSV column headers match the Salesforce field names, Data Loader will automatically map most fields.
Even when using Auto-Match, review every mapping before continuing.
Use “Lead Status” Instead of “Status”
When preparing your CSV, use a column header named: Lead Status
instead of: Status
Using Status as the header can cause Data Loader to overwrite the values with its own processing status, rather than preserving your Lead Status values.
Using Lead Status helps maintain your historical Lead Status information during the import.
🚀 Best Practice: Use descriptive CSV column names whenever possible. It makes field mapping easier to review and reduces the chance of mapping errors.
Required Field Mappings
Review the field mappings and confirm that each required field is connected correctly.
| CSV Column | Salesforce Field |
|---|---|
| Last Name | Last Name |
| Company | Company |
| Lead Status | Lead Status |
| Phone | Phone |
| Lead Source | Lead Source |
| Created By ID (optional) | Created By ID |
| Created Date (optional) | Created Date |
| Email Opt Out (optional) | Email Opt Out |
If you’re using a Lead Assignment Rule, you do not need to map the Owner ID field.
Salesforce will assign the Lead automatically during the insert.
Review the Success File
When the import finishes, Data Loader generates a Success File listing every Lead that was successfully inserted.
The file includes the newly created Salesforce Lead IDs.
These IDs can be used to:
- Verify imported records.
- Perform future updates.
- Reference Leads during additional migration steps.
Example:
| Lead Name | Salesforce Lead ID |
|---|---|
| Sarah Jones | 00QXXXXXXXXXXXX |
| Michael Lee | 00QYYYYYYYYYYYY |
| Emily Carter | 00QZZZZZZZZZZZZ |
Best Practice: Rename the Success File to something descriptive (for example, Lead Success.csv) so it’s easy to identify later.
Review the Error File
If any records fail during the import, Data Loader creates an Error File explaining why.
Open the Error File and review the error message for each failed record.
Most errors can be corrected by updating the CSV and importing the failed records again.
Duplicate Record Errors
One of the most common Lead import errors is a duplicate record.
Example error:
| Error | Cause |
|---|---|
| Duplicate Record Detected | A Lead with the same matching criteria already exists in Salesforce. |
Duplicate rules often use fields such as:
- Email Address
- Name
- Company
If a duplicate is detected, you have several options:
- Inform the client that the Lead already exists.
- Remove the duplicate from the import file.
- Modify or disable duplicate rules (if approved by your organization).
Best Practice: Don’t disable duplicate rules without consulting your client or Salesforce administrator. Duplicate rules help maintain data quality and prevent multiple records for the same Lead.
Organize Your Import Results
After reviewing both output files, it’s helpful to keep everything together in your migration workbook.
Many Salesforce administrators create separate worksheets for:
- Lead Success
- Lead Errors
This makes it easier to discuss the migration results with clients or team members.
Example workbook structure:
| Worksheet | Purpose |
|---|---|
| Leads Prepared | Original import data |
| Lead Success | Successfully inserted records |
| Lead Errors | Failed records and error messages |
Maintaining organized documentation also simplifies troubleshooting if additional updates are needed later.
Spot-Check Imported Leads in Salesforce
After the Lead import is complete, don’t assume everything was imported correctly just because Data Loader reported a successful operation.
A spot check helps verify that your data was mapped correctly, Lead Assignment Rules were applied, and important field values were preserved during the import.
Verify the Lead Import
After the import is complete, verify that your Lead records were inserted correctly.
Spot-Check Imported Leads
Open the Success File, copy a Lead ID (typically starting with 00Q), and open the record in Salesforce.
Verify the following:
| Check | Verify |
|---|---|
| Lead Information | Name, Company, Email, Phone, and other fields imported correctly |
| Lead Status | Matches the value in your CSV |
| Custom Fields | Data mapped correctly |
| Audit Fields | Created By and Created Date (if imported) |
| Lead Owner | Assigned correctly by the Lead Assignment Rule |
🚀 Best Practice: Review several records from different parts of your CSV to confirm the import was successful.
Common Mistakes to Avoid
| Mistake | Why It Matters |
|---|---|
| Missing Company or Last Name | Required fields must contain values for B2B Leads. |
| Blank Company Names | Replace blanks with “Unknown Company” to prevent insert errors. |
| Missing Lead Status | Every Lead should have a valid Lead Status. |
| Using Status instead of Lead Status | May overwrite your historical Lead Status values in the output file. |
| Forgetting the Assignment Rule ID | Leads may be assigned to the importing user instead of the correct owner. |
| Ignoring Field-Level Security | Fields like Email Opt Out may not appear during mapping. |
| Ignoring Duplicate Errors | Review duplicates before deciding whether to disable Duplicate Rules. |
Salesforce Lead Import Best Practices
- Prepare and clean your data before creating the CSV.
- Test the import in a Sandbox whenever possible.
- Use the active Lead Assignment Rule to automate Lead ownership.
- Review both the Success File and Error File after every import.
- Spot-check imported records in Salesforce to verify field mappings and assignments.
Salesforce Objects Used
| Object | Purpose |
|---|---|
| Lead | Stores potential customers before they are converted. |
| Assignment Rule | Automatically assigns imported Leads to the appropriate user or queue. |
Data Loader Operations
| Operation | Purpose |
|---|---|
| Export | Retrieves the Assignment Rule ID from Salesforce. |
| Insert | Creates new Lead records. |
| Field Mapping | Matches CSV columns to Salesforce fields. |
| Auto Match | Automatically maps fields with matching names. |
| Success File | Lists successfully inserted records and their new Salesforce IDs. |
| Error File | Lists failed records and the reason for each error. |
Key Takeaways
- Salesforce Leads support both B2B and B2C data models.
- B2B Leads require both Company and Last Name.
- Configure the Lead Assignment Rule ID in Data Loader to automate Lead assignment.
- Verify Field-Level Security before mapping fields like Email Opt Out.
- Use Insert to create new Lead records.
- Always review the Success File, Error File, and several imported records to confirm a successful migration.
Insufficient access rights on Cross-Reference ID
Frequently Asked Questions (FAQs)
1. What is the difference between Insert and Upsert in Salesforce Data Loader?
Insert creates new Lead records in Salesforce, while Upsert updates existing records if a matching ID or external ID is found, or inserts new records if no match exists.
2. What fields are required to import Leads into Salesforce?
For B2B Leads, Salesforce requires:
- Last Name
- Company
For B2C Leads using Person Accounts, Last Name is typically the only required standard field. Your organization may also have additional required custom fields.
3. How do I use Lead Assignment Rules during a Data Loader import?
First, export the Assignment Rule object to obtain the active Assignment Rule ID. Then, paste that ID into the Assignment Rule ID for Cases and Leads Import setting in Data Loader before running the import.
4. Why isn’t the Email Opt Out field available in Data Loader?
The Email Opt Out field may not appear if your profile doesn’t have the necessary Field-Level Security permissions. Ensure the field is visible and editable for the profile performing the import.
5. Why did some Lead records fail to import?
Common reasons include:
- Missing required fields (such as Company or Last Name)
- Duplicate Rules preventing insertion
- Invalid Lead Status values
- Validation Rules or required custom fields
Review the Error File generated by Data Loader to identify the exact cause.
6. Should I include the Owner ID when importing Leads?
Not if you’re using a Lead Assignment Rule. Salesforce will automatically assign the Lead based on the active rule. Include Owner ID only when you want to assign Leads directly to specific users.
7. How can I verify that my Lead import was successful?
Review the Success File generated by Data Loader, then open a few imported Lead records in Salesforce to verify that field values, Lead ownership, and Lead Status were imported correctly.
8. Should I test my Lead import before using Production?
Yes. It’s recommended to perform a test import in a Sandbox or Developer Org first. This allows you to validate field mappings, Assignment Rules, and data quality without affecting live Salesforce data.
3 Responses