Skip to main content

Migrate Data into Salesforce Video Series

Extract and stage source data

In this video series, we will walk through an end to end data migration from Zoho into Salesforce where we address some common data you may encounter.

Step 1: Select and Staging Source Objects

The first step in a data migration is inventory what objects and information we ae migrating out of the source system. For DataTools Pro we were lucky enough to narrow our migration to 3 objects.

Our data platform of choice to stage and analyze data is Snowflake, so in this demo we import and stage our data without writing any code.

With our source objects identified, we can add and map our Salesforce objects in DataTools Pro and mark the first step of our migration complete in our migration scorecard!

Step 2: Data Mapping in DataTools Pro

With our objects selected, it’s time to map individual fields from our Zoho instance to our new Salesforce instance. This is where DataTools Pro field mapping features save tremendous time replacing Excel files.

Get the Source Data Schema

Once you upload your data, you can quickly obtain the source schema using the following code:

SELECT COLUMN_NAME, DATA_TYPE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'STAGE' -- Replace with your schema name
AND TABLE_NAME = 'LEAD';   -- Replace with your table name

Mapping Picklist Values

In the demo we demonstrate simple SQL to extract distinct values from our source data to so we can map to district picklist values into Salesforce. Here is source code that we use and paste into DataTools Pro picklist mapping.

SELECT COUNT(*),LEAD_STATUS FROM MIGRATION.STAGE.LEADS GROUP BY LEAD_STATUS

Migration Mapping as Code

DataTools Pro will generate SQL code that you or your data team can run and modify to streamline the process. Data migrations are fluid by design so we typically employ common table expressions to help abstract mapping from the data preparation work needed.

WITH DataProcessingCTE AS (
    -- Perform the complex data transformations here.
    -- This can include joins, aggregations, case statements, etc.
    -- This example is simplified and should be expanded based on your actual data processing needs.
    
    SELECT *
    -- IF your data tools provided 
    FROM LEADS  
),
LEADS AS (
    -- Optional: Any additional transformations that build on the previous CTE. Possibly fine tuning, renaming or calculated logic.
    SELECT *
        -- Further processing based on the previous CTE
        
    FROM DataProcessingCTE
)

    -- Data Tools Generated SQL code intended to only map values as defined by DataTools.
Salesforce data migration mapping

Step 3: Prepare and Migrate Data

In this step we demonstrate some of the additional data preparation steps to combine multiple data sets. From there we, import our data using data loader manually into our Sandbox.

Our new Salesforce instance is simple enough where we don’t need to worry about common automation issues. However, when you plan your migration you will want to consider the following:

  • Field validation rules
  • Triggered APEX functions and flows
  • Automatic communications like Email and SMS

More Salesforce Data Migration Resources

Here are resources to help you plan and support a successful data migration into Salesforce.com.

Salesforce Data Migration Infographic

Migration Launch Infographic

View Infographic

Salesforce Data Migration Plan to Success

Salesforce Migration Guide

View Guide

Salesforce data migration checklist

Notion Migration Checklist

View Checklist on Notion

Salesforce data migration pitfalls

Avoid these 3 Data Migration Pitfalls

Read Article

Get access to our Salesforce data migration tool!

We would love to learn about your data migration, management and analytics challenges.