Data Splitting
What is Data Splitting
The Data Splitting feature enables importing data from a single source object to multiple related target objects simultaneously, keeping the relationship between records.
How to Enable the Data Splitting Feature
To enable Data Splitting, do the following:
- On the Target Definition tab of your Import task, select the parent target object.
- Click +Related and select the related target object.
- Map the fields for both target objects.
Specifics
- Data Splitting feature works only for the related target objects.
- Data Splitting works for the INSERT operation only.
How to Use Data Splitting
Example 1. Importing Client information to Account and Contact
There is a database table Client, that stores client information: company name, company size, industry, contact information, etc. The task is to import data from Client table to Salesforce. The problem is that Salesforce stores this information in two objects, Account and Contact. Thus, we need to perform import from a single source object to two separate target objects.
To accomplish this task, do the following:
- Create the integration, set source and target connections, and add the import task.
- Select the Client table as source.
-
On the Target definition tab, select the Account object as target, click +Related, and Select the Contact object.
-
Map the Account fields and then click the drop-down list to switch the object for mapping to Contact.
-
Map the Contact fields. The related Account Id is mapped automatically by target relation.
- Save the Import task and run it.
As a result, you have new records in the Account object and records in the Contact object related to just inserted accounts.
Example 2. Importing Products and Prices
There is a database table Product that stores information about products in stock: name, quantity, price, units of measure, etc.
The task is to create products in Salesforce and add this data to the price book. Salesforce stores products in the Product2 object and the product prices — in the PricebookEntry object.
Thus you need to split data from the Products table between Product2 and PricebookEntry.
To complete this task, perform the following steps:
- Create the integration, set source and target connections, and add the import task.
- Select the Product table as source.
-
On the Target definition tab, select the Product2 object as target, click +Related and select the PricebookEntry object.
-
Map the Product2 fields and click the drop-down list to switch the object for mapping to PricebookEntry.
-
Map the PricebookEntry fields. The related Product2 Id field is mapped automatically by target relation.
- Save the Import task and run it.
As a result, you have new records in the Product2 object and records in the PricebookEntry object related to just inserted products.