Tuesday, April 4, 2023

Data Migration (Legacy system to Salesforce)

Data is distinct pieces of information, usually formatted in a special way.  Data is the most critical asset of any organization. The criticality of data makes any activity involving data crucial and delicate. The same logic makes projects involving “Data Migration” sensitive and mandates the handling with utmost care.


As the title suggests we are going to focus on Data Migration involving Salesforce as a platform in general and in particular we are going to reflect on:-

·        What are the “n” questions one should ask before planning a data migration project?

·        How Legacy Data should be moved over to Salesforce?

·        What are the “n” numbers of things to be careful about?

·        What are the “n” things to checked in Salesforce before embarking over a data migration project? 

Questions one should ask oneself while kicking off a Data Migration Project?


1.       What is the nature of system from where data which is being brought in?
a.       Legacy system like some Orcale Database, etc.
b.       Some CRM like Sugar CRM, Net Suite etc?
              The answer to the above question gives you the following vital inputs:-
·    So there is legacy data coming from another system
·    This means that we might need to bring in information like:-
1.       Created Date, Created by information
2.       The above information in SFDC is called “Audit fields/ Information
3.       For adding information about audit fields create a case with salesforce
           Audit Fields
System fields, which are read only and store information like “created date”, “created by id” (reference to user), “last modified date” and “last modified by id” are referred to as audit fields.
Ideally Salesforce treats these fields as “read-only” and these fields are set by the system by default and cannot be modified by the user.
Though under special condition these (audit) fields can be set by special permission from Salesforce by creating a case with “Salesforce” to that effect. The permission to set audit fields is not unlimited and is revoked after some time, if you need that you should be able to set audit fields longer do create another request with Salesforce.

Also note objects like:-
·          Account Feed
·          AccountShare
·          AccountTag
Don’t have audit fields


2.       What is the nature of Data?
a.       Is there currency related data? If yes is that data in different/ multiple currencies? If the answer is yes? Then we need to get “Multi-currency” enabled in our Salesforce organization/ instance.
3.       What is the numbers of  “users” that need to be created? Or how many users have to be created? Lets say if “X” users have to be created are these necessary number of seats in the “Salesforce Instance”?
a.       The answer will decide how you will frame the strategy for carry outing the data load vis-à-vis assigning of information like
·    “Created By Id”
·    “Last modified by Id”
4.       Are there users from different Time Zones? If yes then one has to handle time related data accordingly
5.       In what format data will be provided to you?
6.       What is the minimum information you need for each object, to successfully load data? In technical terms I means what are the “Required Fields”?
7.       What are the “business rules” that have to be taken care of? For example if there are certain business rules implemented in the system by way of “Validation rules or Triggers” then how such situations will be handled? For example if you have a validation that “Date of Sale” cannot be less that today, then how will you handle loading of legacy data, which will be in past. Answer will be perhaps deactivating such validations rules or commenting a portion of trigger during data load.
8.       When you get the data extracts (say csv files) from legacy system check the columns having dates are they in correct format and value?
a.       Many times you will see date represented as numerical date value, if yes-appropriate date conversions need to be done in excel using formulas.
b.        Check if the date values in legacy system and in csv files are same?
9.       W.r.t. text fields check the data length because if you are using excel or csv to massage and manipulate data then text fields which get truncated during such instances its advisable to use: -
a.       A database for data massaging and manipulation
b.       Informatica for making data extractions and loading into database and Salesforce.
10.    Also w.r.t. Salesforce always remember in the user object there are certain felds like “Community Nickname”, “Username” , etc which are unique across the Salesforce platform so if legacy data is coming from Salesforce, data massaging will involve making these data values unique.
There are scores of questions which come to my mind, but lets park them for the next blog …

Keep watching this space for more on “Data Migration”

No comments:

Post a Comment

Understanding Wire vs Imperative Apex Method Calls in Salesforce Lightning Web Components (LWC)

Understanding Wire vs Imperative Apex Method Calls in Salesforce Lightning Web Components (LWC) Introduction: Salesforce Lightning Web ...