Data Migration Guide -RTBF /De-identification – Cloud Compliance

In the Cloud Compliance application, the “RTBF/De-identification” feature uses mappings that store data in the custom objects available in a package. This document showcases how Object mappings can be transferred from one org to another in order to efficiently migrate data from sandbox to production.
 

Process Summary

The first step of the data migration process is to extract the CSV files from the source org that contains the mapping data. Extraction can effortlessly be done using Workbench. When the CSV files are ready, these files need to be pushed into the destination org using Workbench. We illustrate this process in detail, below.
This document should be used only as a reference guide as every Org is different and has its unique objects and structure.


Prerequisites

Before starting the Data Migration process, the user needs to create a custom field (data type – Text ) with the name “Migration Key” on the objects i.e ‘De-identification Master’,’De-identification Detail’  and ‘Pseudo Data Object Mappings ’in the destination Org. This custom field should be of type ‘Text’, Case Sensitive, and ‘Unique Record Identifier from an external system’.

1.png


Solutions Steps


Data migration for RTBF/De-identification

Total Objects:  4

  • De-Identification Master 
  • De-Identification Detail
  • Pseudo Data Object Mappings
  • Data Field Mappings
     

1. De-Identification Master 

API Name :  PCCC_DM__DeIdentification_Master__c
 
To create a CSV file, the workbench SOQL for De-Identification Master should be as follows –

SELECT Id, Name, PCCC_DM__Description__c, PCCC_DM__Error_Message__c, PCCC_DM__Has_Error__c, PCCC_DM__isActive__c, PCCC_DM__isCustom__c, PCCC_DM__isDefault__c, PCCC_DM__Target_Object__c FROM PCCC_DM__DeIdentification_Master__c

 Push the CSV file in Destination org using Workbench. 

  1. Click on Data ->  Insert and Select-Object and  De-identification Master CSV file that needs to be pushed in the destination.
  2. Map Fields – ‘Migration_Key__c’ with ‘Id’

2.png

2. De-Identification Detail

API Name :  PCCC_DM__DeIdentification_Detail__c
Note – De-identification Detail Contains Child as well as Grandchild objects in the mapping. Create separate CSV for both – De-identification Detail with Child & De-identification Detail with Grandchild.

  • To create a CSV file for De-identification Detail records Containing only CHILD objects, the workbench SOQL should be as follows –
     
SELECT Id, Name, PCCC_DM__DeIdentification_Detail_Mapping__c, PCCC_DM__DeIdentification_Master__c, PCCC_DM__Error_Message__c, PCCC_DM__Filter_Field__c, PCCC_DM__Has_Error__c, PCCC_DM__isCustom__c, PCCC_DM__Object_Name__c, PCCC_DM__relationShipField__c, PCCC_DM__relationShipName__c, PCCC_DM__Type__c FROM PCCC_DM__DeIdentification_Detail__c WHERE PCCC_DM__Type__c = ‘Child’


 Push the  De-identification Detail with Child CSV file in Destination org using Workbench. 
 

  1. Click on Data ->  Insert and Select Object as De-identification Detail with Child CSV file that needs to be pushed in a destination.
  2. Map Fields
  • ‘Migration_Key__c’ with ‘Id’ 
  • ‘PCCC_DM_DeIdentification_Master__C’ with Smart Look Field i.e ‘PCCC_DM_DeIdentification_Master__C.Migration_Key__c’.
3.png
  • To create a CSV file for De-identification Detail records Containing only GRANDCHILD objects, the workbench SOQL should be as follows –
SELECT Id, Name, PCCC_DM__DeIdentification_Detail_Mapping__c, PCCC_DM__DeIdentification_Master__c, PCCC_DM__Error_Message__c, PCCC_DM__Filter_Field__c, PCCC_DM__Has_Error__c, PCCC_DM__isCustom__c, PCCC_DM__Object_Name__c, PCCC_DM__relationShipField__c, PCCC_DM__relationShipName__c, PCCC_DM__Type__c FROM PCCC_DM__DeIdentification_Detail__c WHERE PCCC_DM__Type__c = ‘Grandchild’

 
 Push the De-identification Detail with Grandchild CSV file in Destination org using Workbench. 
 

  1. Click on Data ->  Insert and Select Object as De-identification Detail with Grandchild CSV file that needs to be pushed in a destination.
  2. Map Fields –
  • ‘Migration_Key__c’ with ‘Id’ 
  • ‘PCCC_DM_DeIdentification_Detail_Mapping__C’ with Smart Look  Field i.e ‘PCCC_DM_DeIdentification_Detail__C.Migration_Key__c’.
    •  ‘PCCC_DM_DeIdentification_Master__C’ with Smart Look Field i.e ‘PCCC_DM_DeIdentification_Master__C.Migration_Key__c’.

 The below screenshot shows the first two mapping fields – 

4.png


 The one below shows the third mapping field –

5.png



 

3. Pseudo Data Object Mappings

API Name :  PCCC_DM__Pseudo_Data_Object_Mappings__c
 
To create a CSV file, the workbench SOQL for Pseudo Data Object Mappings should be as follows –

SELECT Id, Name, PCCC_DM__Activated_On__c, PCCC_DM__Active__c, PCCC_DM__Cascade_Delete__c, PCCC_DM__DeIdentification_Master__c, PCCC_DM__Delete_Attachment__c, PCCC_DM__Delete_Email_History__c, PCCC_DM__Delete_Event__c, PCCC_DM__Delete_Feed_Tracking__c, PCCC_DM__Delete_Field_History__c, PCCC_DM__Delete_Files__c, PCCC_DM__Delete_Notes__c, PCCC_DM__Delete_Object__c, PCCC_DM__Delete_Task__c, PCCC_DM__Description__c, PCCC_DM__De_identification_Preview__c, PCCC_DM__External_Id__c, PCCC_DM__Hard_Delete__c, PCCC_DM__Inactivated_On__c, PCCC_DM__Source_Object_API__c, PCCC_DM__Source_Object__c, PCCC_DM__TotalFieldMapped__c FROM PCCC_DM__Pseudo_Data_Object_Mappings__c



 Push the CSV file in Destination org using Workbench. 

  1. Click on Data ->  Insert and Select-Object and CSV file that needs to be pushed in the destination.
  2. Map Fields
  • ‘Migration_Key__c’ with ‘Id’ 
  • ‘PCCC_DM_DeIdentification_Master__C’ with Smart Look Field i.e ‘PCCC_DM_DeIdentification_Master__C.Migration_Key__c’.
6.png

4. Data Field Mappings

API Name :  PCCC_DM__Pseudo_Data_Field_Mappings__c
 
To create a CSV file, the workbench SOQL for Pseudo Data Field Mappings should be as follows –

SELECT Id, Name, PCCC_DM__Actions__c, PCCC_DM__Activated_On__c, PCCC_DM__Active__c, PCCC_DM__Comments__c, PCCC_DM__Deactivated_On__c, PCCC_DM__Default_Replacement_Value__c, PCCC_DM__Destination_Field_API__c, PCCC_DM__Destination_Field__c, PCCC_DM__Error_Message__c, PCCC_DM__Has_Error__c, PCCC_DM__Object_Active__c, PCCC_DM__Pseudo_Data_Object_Mappings__c, PCCC_DM__Source_Field_API__c, PCCC_DM__Source_Field_Length__c, PCCC_DM__Source_Field_Required__c, PCCC_DM__Source_Field_Type__c, PCCC_DM__Source_Field__c, PCCC_DM__Source_Object_API__c, PCCC_DM__Source_Object__c, PCCC_DM__Store_Proof__c FROM PCCC_DM__Pseudo_Data_Field_Mappings__c



 Push the CSV file in Destination org using Workbench. 

  1. Click on Data ->  Insert and Select Object and CSV file that need to be pushed in destination.
  2. Map Fields
  • PCCC_DM__Pseudo_Data_Object_Mappings__c with PCCC_DM__Pseudo_Data_Object_Mappings__c.Migration_Key__c
7.png