Data Migration Guide – Data Portability – Cloud Compliance

Updated on March 20, 2023

In the Cloud Compliance application, the “Data Portability” 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 “External Id” on the objects i.e. ‘Data Portability Master’ and ‘Data Portability Detail’ in the destination Org. This custom field should be of type ‘Text’, Case Sensitive, and ‘Unique Record Identifier from an external system’.

1.png

Solution Steps – 

Data migration for Data portability

Total Objects : 3

  • Data Portability Master
  • Data Portability Detail
  • Data Portability Field Mapping

1. Data Portability Master

API Name : PCCC_DM__Data_Portability_Master__c
 

To create a CSV file, the workbench SOQL for Data Portability Master should be as follows –

Select Id, Name, PCCC_DM__Description__c, PCCC_DM__Target_Object__c, PCCC_DM__isActive__c, PCCC_DM__isCustom__c FROM PCCC_DM__Data_Portability_Master__c

Push the CSV file in Destination org using Workbench. 

  1. Click on Data -> Insert then Select the object and CSV file that needs to be pushed in a destination.
  2. Map Fields

Map ‘External_Id__c’ with ‘Id’

2.png


 

2. Data Portability Detail         

API Name: PCCC_DM__Data_Portability_Detail__c

Note – Data Portability Detail Contains Child as well as Grandchild objects in the mapping. Create separate CSV for both – Data Portability Detail with Child & Data Portability Detail with Grandchild.

  • To create a CSV file for Data Portability Detail records containing only CHILD objects, the workbench SOQL should be as follows –
Select Id, Name, PCCC_DM__Data_Portability_Detail_Mapping__c, PCCC_DM__Data_Portability_Master__c, PCCC_DM__Filter_Field__c, PCCC_DM__Object_Name__c, PCCC_DM__Type__c, PCCC_DM__isCustom__c, PCCC_DM__relationShipField__c, PCCC_DM__relationShipName__c FROM PCCC_DM__Data_Portability_Detail__c WHERE PCCC_DM__Type__c = ‘Child’

Push the CSV file in Destination org using Workbench. 

  1. Click on Data ->  Insert then Select the object and CSV file that needs to be pushed in a destination.
  2. Map Fields
  • ‘External_Id__c’ with ‘Id’ 
  • ‘PCCC_DM_Portability_Master__c’ with Smart Look Field i.e ‘PCCC_DM_Portability_Master__c.External_Id__c’.
3.png
  • To create a CSV file for Data Portability Detail records Containing only GRANDCHILD objects, the workbench SOQL should be as follows –
Select Id, Name, PCCC_DM__Data_Portability_Detail_Mapping__c, PCCC_DM__Data_Portability_Master__c, PCCC_DM__Filter_Field__c, PCCC_DM__Object_Name__c, PCCC_DM__Type__c, PCCC_DM__isCustom__c, PCCC_DM__relationShipField__c, PCCC_DM__relationShipName__c FROM PCCC_DM__Data_Portability_Detail__c WHERE PCCC_DM__Type__c = ‘Grandchild’

Push the CSV file in Destination org using Workbench. 

  1. Click on Data ->  Insert and Select Object as Data Portability Detail with Grandchild CSV file that needs to be pushed in a destination.
  2. Map Fields
  • ‘External_Id__c’ with ‘Id’ 
  • ‘PCCC_DM__Data_Portability_Detail__c ’ with Smart Look  Field i.e ‘PCCC_DM__Data_Portability_Detail__c.External_Id__c’.
  • ‘PCCC_DM_Portability_Master__c’ with Smart Look Field i.e ‘PCCC_DM_Portability_Master__c.External_Id__c’.

The below screenshot shows the first two mapping fields – 

4.png

The one below shows the third mapping field –

5.png


3. Data Portability Field Mapping         

API Name: PCCC_DM__Data_Portability_Field_Mapping__c
 

To create a CSV file, the workbench SOQL for Data Portability Field Mapping should be as follows -:

Select Id, Name, PCCC_DM__Data_Portability_Master__c, PCCC_DM__Field__c, PCCC_DM__Object__c, PCCC_DM__Type__c, PCCC_DM__User_Friendly_Label__c FROM PCCC_DM__Data_Portability_Field_Mapping__c

Push the CSV file in Destination org using Workbench. 

  1. Click on Data ->  Insert then Select object and CSV file that needs to be pushed in a destination.
  2. Map Fields

Map field ‘PCCC_DM_Portability_Master__c’ with Smart Look Field i.e ‘PCCC_DM_Portability_Master__c.External_Id__c’.

6.png


 Now users can check  Portability Mapping in destination org.