• Are you struggling to fit your migrated data into your target Salesforce environment?
  • Is there a need for creating multiple fields?
  • Don’t want to lose the data but don’t have the fields to migrate it to?

How to Migrate Multiple field sets of data in Salesforce without creating any new field?

If the answers to most or all of your questions is ‘yes’, then this article can help you achieve all the above without creating any new fields and without suffering any data loss.

How to Migrate Multiple field sets of data in Salesforce without creating any new field?

Where can you use this technique?

  • Lack of fields on the Target as compared to the Source environment
  • Data model does not match between the two environments
  • Do not want to create new fields in the Target environment
  • Do not have a separate custom object to hold the data

Salesforce data model not matching

Figure 1 Salesforce data model not matching

How to achieve this?

We will extract all the data from the source environment and insert it into the Description field of the Target environment using TALEND.

 Assumptions

  1. We have migrated the data of Productsobject (OpportunityLineItem) from Source org.into a Description field (Special_Instruction__c) of Opportunity object in Target org.
  2. We are using Excel to extract data from Source environment and a Salesforce connection to push the data on the Target environment. We can also create a Salesforce connection for both the environments (Recommended way).

Process

Step 1: Create a Salesforce connection.

For this you need 3 parameters:

  1. Username
  2. Password
  3. Security Token

Create a Salesforce connection

Figure 2 Create a Salesforce connection

You need to enter all the credentials for the Source environment.

Note:If you are connecting to a UAT environment be sure to change the URL in the tSalesforceConnection component.

Step 2:In this step we need to extract the data from both the source files.

Job Design in TALEND

Figure 3 Job Design in TALEND

To achieve the above process first you need two files:

  1. Source File:In this file you need all the Product data (Opportunity Line Item data) along with the OpportunityId
  2. Target File:In this file you need the Opportunity Id from the Target

Step 3:In this step we need to:

  1. Insert the two files into the tMap
  2. Apply an inner join between the two files.
  3. Concatenate all the product data into a single variable and add a null check to all the fields before inserting them into variables.
  4. Insert the variable into the Opportunity field.

tMap Design in TALEND

Figure 4 tMap Design in TALEND

 In this method we have added “|” to separate the data you can choose another symbol as per your convenience.

Note: Select the same selections in the tMap as highlighted above.

Step 4: After all the description is concatenated add a tDenormalize to concatenate the records with the same Opportunity Id based on the Description field.

How to Migrate Multiple field sets of data in Salesforce without creating any new field?

Step 5:In this step use a tSalesforceOutput component to update the description field for the respective opportunity.

How to Migrate Multiple field sets of data in Salesforce without creating any new field?

Finally attaching the complete job for reference.

How to Migrate Multiple field sets of data in Salesforce without creating any new field?

More ways to implement the above approach:

  • Extracting data from Salesforce rather than Excel
  • Using other objects like Account, Contact etc.
  • Pushing data into Salesforce with Excel
  • Merging Product Data with Billing data

Conclusion

In a nutshell, we can say that whether your migration is for small or large data, you need to process your data in an efficient way. In your data migration journey, Talend can be your partner for ensuring hassle-free migration.

About Girikon

Girikon – a global provider of quality IT services houses a team of skilled Salesforce professionals including Salesforce consultants, administrators and developers.
About Author
Ayush Joshi
Ayush is a Salesforce consultant and Talend Developer with expertise in Data Analysis, Data Migration, and Salesforce Administration jobs. He loves to shares his insights by blogging around ‘Data analysis and various migration techniques’.
Share this post on: