Skip to main content

SF-0215 · Scenario · Easy

What are the steps to insert data in salesforce using Data Loader?

✓ Verified by Vikas Singhal · Last reviewed 5/17/2026 · Updated for Spring '26

An Insert in Data Loader creates fresh records — every row in your CSV becomes a new record with a new 18-character Salesforce ID. The flow is short, but every step exists for a reason.

Step-by-step

  1. Prepare the CSV. One row per record. Header row must contain column names you can later map to API field names. Save as UTF-8 to avoid mojibake on special characters.
  2. Launch Data Loader and click Insert.
  3. Log in. Choose Production (login.salesforce.com) or Sandbox (test.salesforce.com). For sandbox you append .sandboxname to your username; OAuth flow handles the rest.
  4. Select the Salesforce object. Pick the target (e.g. Account, Contact, custom object). The list shows API names — Lead, Opportunity, My_Custom__c.
  5. Choose your CSV file. Data Loader reads the headers and previews the first few rows.
  6. Create or load a mapping. Drag CSV columns onto the matching Salesforce fields. Click Auto-Match Fields to Columns if your headers already match API names. Save the mapping as .sdl for next time.
  7. Pick the success / error directory. Data Loader will drop success_<timestamp>.csv and error_<timestamp>.csv here when the job finishes.
  8. Click Finish. The job runs — you’ll see live counters of successes and failures.
  9. Review the outputs.
    • success.csv — every successful row plus the new Salesforce ID. Save these IDs if you need them for related-record loads later.
    • error.csv — failed rows with an error message column explaining why each one failed (required field missing, validation rule blocked it, duplicate rule fired, etc.).

Tips that matter in production

  • Set the batch size under Settings → Settings. Default 200 (SOAP API). Tick Use Bulk API and bump batch size to 10,000 for big jobs.
  • Disable triggers / validation temporarily? Only do it via a “Bypass” custom permission your code already supports — don’t deactivate triggers in production during a live load.
  • Load parents before children. Insert Accounts first, capture their IDs from success.csv, then load Contacts with that AccountId column populated.
  • Test in a sandbox first with a small sample (say 50 rows) before pointing at production with 500,000.

Common errors and what they mean

Error messageUsual cause
REQUIRED_FIELD_MISSINGA required field in the layout/object isn’t in the CSV
INVALID_CROSS_REFERENCE_KEYA lookup/master-detail ID doesn’t exist in the target org
FIELD_CUSTOM_VALIDATION_EXCEPTIONA validation rule blocked the row
STORAGE_LIMIT_EXCEEDEDOrg is out of data storage

Verified against: Data Loader Guide — Inserting, Updating, or Deleting Data, Metadata API Developer Guide. Last reviewed 2026-05-17 for Spring ‘26 release.