$120 tested Claude codes · real before/after data · Full tier $15 one-timebuy --sheet=15 →
$Free 40-page Claude guide — setup, 120 prompt codes, MCP servers, AI agents. download --free →
clskills.sh — terminal v2.4 — 2,347 skills indexed● online
[CL]Skills_
SalesforceintermediateNew

Salesforce Data Migration

Share

Migrate data with Data Loader, bulk API, and ETL processes

Works with OpenClaude

You are a Salesforce Data Migration specialist. The user wants to migrate data using Data Loader, bulk API, and ETL processes to move records between Salesforce orgs or from external systems into Salesforce.

What to check first

  • Verify sfdx force:org:list shows authenticated orgs; if not, run sfdx force:auth:web:login -a OrgAlias
  • Confirm your CSV file matches the Salesforce object field API names exactly (no spaces, correct case)
  • Check Data Loader version with java -version — ensure Java 8+ is installed since Data Loader requires it
  • Validate that your Salesforce user has API Enabled and Data Loader permissions in their profile

Steps

  1. Download and install Data Loader from https://developer.salesforce.com/tools/data-loader (or use sfdx plugins:install @salesforce/sfdx-cli)
  2. Prepare your CSV with headers matching Salesforce API field names (e.g., Id, Name, Phone, AccountId); run sfdx force:data:record:export -s Account -u OrgAlias to see target object structure
  3. For upsert operations, include an External ID field in your CSV matching a unique field on the target object (set in Data Loader as the upsert key)
  4. Configure Data Loader connection: enter Salesforce instance URL, username, and password (or use OAuth token)
  5. Select operation type: Insert (new records), Update (existing), Upsert (insert or update), or Delete (remove records)
  6. Map CSV columns to Salesforce fields; Data Loader auto-suggests matches but verify manually for accuracy
  7. Run migration with batch size 200–1000 records (larger batches reduce API calls but increase failure risk); monitor success_*.csv and error_*.csv output files
  8. For bulk API (asynchronous, higher volume), use sfdx force:data:bulk:upsert -s Account -f ./accounts.csv -i Id -u OrgAlias or write a job definition in XML

Code

#!/bin/bash
# Salesforce Data Migration Script using SFDX Bulk API

ORG_ALIAS="production"
OBJECT_TYPE="Account"
CSV_FILE="./data/accounts.csv"
EXTERNAL_ID_FIELD="External_Id__c"

# Step 1: Export existing records to understand field structure
echo "Exporting existing $OBJECT_TYPE records..."
sfdx force:data:record:export \
  -s $OBJECT_TYPE \
  -u $ORG_ALIAS \
  -p \
  -d ./exports/

# Step 2: Validate CSV structure against Salesforce object
echo "Validating CSV headers..."
FIRST_LINE=$(head -n 1 "$CSV_FILE")
echo "CSV headers: $FIRST

Note: this example was truncated in the source. See the GitHub repo for the latest full version.

Common Pitfalls

  • Treating this skill as a one-shot solution — most workflows need iteration and verification
  • Skipping the verification steps — you don't know it worked until you measure
  • Applying this skill without understanding the underlying problem — read the related docs first

When NOT to Use This Skill

  • When a simpler manual approach would take less than 10 minutes
  • On critical production systems without testing in staging first
  • When you don't have permission or authorization to make these changes

How to Verify It Worked

  • Run the verification steps documented above
  • Compare the output against your expected baseline
  • Check logs for any warnings or errors — silent failures are the worst kind

Production Considerations

  • Test in staging before deploying to production
  • Have a rollback plan — every change should be reversible
  • Monitor the affected systems for at least 24 hours after the change

Quick Info

CategorySalesforce
Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
salesforcedatamigration

Install command:

curl -o ~/.claude/skills/sf-data-migration.md https://clskills.in/skills/salesforce/sf-data-migration.md

Related Salesforce Skills

Other Claude Code skills in the same category — free to download.

Want a Salesforce skill personalized to YOUR project?

This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.