You can specify the type of import to perform in the user interface or in the CSV file.
In the CSV file, you can specify the following operation types:
Operation Type
Description
Upsert
Adds new records or overwrites all the field values of existing records.
Patch
Updates field values in record sections.
For example, you can update the date of birth and mailing address of an existing record.
Delete
Performs the following operations:
- Deletes source records.
- Deletes relationships and hierarchies.
- Deletes the field group entries in record sections.
For example, you can delete the billing address in a record.
You can delete the field group entries but not the root field values by using the delete operation type. To delete a specific root field value, specify all the root field values except the field value that you want to delete in the CSV file.
Note: You can't use the delete operation type to delete any root field values of a record.
In the user interface, you can select one of the following import types:
•Create or overwrite records. Adds new records and overwrites all the field values of existing records through the upsert operation. Also, you can create new relationships and hierarchies.
•Update record sections. Updates field values in record sections through the patch operation. A record section include all the root fields, fields in field groups, or fields in a nested field group.
The import type specified in the CSV file takes precedence over the import type that you specify in the user interface.
For example, specify the operation type as patch for the root field of a record in the CSV file and select the import type create or overwrite records. The import process considers patch as the operation and updates the values in the root fields and field groups of the record.
Note: If you don't specify the operation type in the CSV file, the import process uses the import type that you set in the user interface.
Create or overwrite records
When you choose to create or overwrite records, the import process adds new records and overwrites all the field values of existing records.
Ensure that your CSV file contains values for all the fields for the existing records. If you specify only the field values that you want to update in the CSV file, the import process updates the specified field values and sets the other field values to null.
For example, consider the following existing records:
Source Primary Key
First Name
Last Name
Date of Birth
Address Field Group ID
Address Type
Address Line 1
City
SFDC_123
Mary
T
02/19/1990
3788
Home
2nd Street, Fairlands, North Block
Mumbai
SFDC_536
Andrew
Chris
09/10/1983
5672
Billing
4th Avenue, 8th Street, ECR
Chennai
Import the following records by using the create or overwrite records option:
Source Primary Key
First Name
Last Name
Date of Birth
Address Field Group ID
Address Type
Address Line 1
City
SFDC_345
Charles
Richard
03/20/1988
6785
Office
14 Washington Square N, Block 10011
New York
SFDC_536
Andrew
Chris
09/10/1980
5672
Billing
10, Broadway, MH Street, ADH Colony
Bangalore
When the import is complete, you can view the following records:
Source Primary Key
First Name
Last Name
Date of Birth
Address Field Group ID
Address Type
Address Line 1
City
SFDC_123
Mary
T
02/19/1990
3788
Home
2nd Street, Fairlands, North Block
Mumbai
SFDC_345
Charles
Richard
03/20/1988
6785
Office
14 Washington Square N, Block 10011
New York
SFDC_536
Andrew
Chris
09/10/1980
5672
Billing
10, Broadway, MH Street, ADH Colony
Bangalore
In the preceding example, you can see that the Charles record is added, and the Andrew record is updated.
Create related records
You can import a CSV file by using the create or overwrite records option to create relationships between source records. Ensure that the CSV file contains the source primary keys of the records you want to relate and these records belong to the same source system.
After you upload the CSV file, select the target relationship for which you want to import data.
For example, if you specify Organization as Entity 1 and Person as Entity 2 in a relationship, enter the source primary keys of the Organization records in the From column and the source primary keys of the Person records in the To column. Also, specify the source primary key for each relationship.
The following table lists sample relationship data that you can import by using create or overwrite records option:
Source Primary Key
From_sourcePKey
To_sourcePKey
101
67985f037ecc1d791818613d
6798679e7ecc1d79181861e6
102
67985f3f7ecc1d7918186154
67985f3f7ecc1d7918186154
103
67985f5d7ecc1d791818616b
6798679e7ecc1d79181861e6
After the import is complete, you can view the relationships between records.
Create hierarchies
You can import a CSV file by using the create or overwrite records option, to create hierarchy relationships between source records. The CSV file must contain the source primary keys of root, parent, and child records. Ensure that the source records that you want to relate belong to the same source system.
After you upload the CSV file, select the target hierarchy for which you want to import data.
For example, consider a hierarchy having Insurance to Hospital relationship.
The following table lists sample hierarchy data that you can import by using create or overwrite records option:
Hierarchy Instance_SPkey
Instance_Name
InsToHos.SPkey
Root SPKey
Parent_SPkey
Child_SPkey
hierarchy_create_Pkey
HierarchyCreate
Hos_100
6798dc871640a65a216aa1cd
6798dc871640a65a216aa1cd
67985f857ecc1d7918186182
hierarchy_create_Pkey
HierarchyCreate
Hos_101
6798dc871640a65a216aa1cd
6798dc871640a65a216aa1cd
67985fa87ecc1d7918186199
The following table describes the column names in the CSV file:
Column Name
Description
Hierarchy Instance_SPkey
Unique source primary key that identifies the hierarchy.
Instance_Name
Name of the hierarchy.
InsToHos.SPkey
Unique source primary key of the hierarchical relationship to create between the records.
Instance_Root SPKey
Source primary key of the top-level parent record.
Parent_SPkey
Source primary key of the parent record.
Child_SPkey
Source primary key of the child record.
After the import is complete, you can view the hierarchy created between the records.
Import data with business ID
You can import source records with their business IDs.
If a business ID in the input file matches an existing source record, the import process merges the input record with the existing source record and contributes to the corresponding master record. If the business ID doesn't match any existing source records, the import process creates a new record.
For example, consider that business ID 121000000000002 exists in Customer 360 SaaS, and business ID 121000000000004 doesn't exist in Customer 360 SaaS.
The following table lists the source records that you plan to import:
Business ID
SourcePkey
First Name
Last Name
Address Line1
Address Line2
City
121000000000002
bigAIData_893964_22
Dilyar
Shanbhag
0193 Rojas Underpass Suite 256
Suite 795
North Andrewtown
121000000000002
bigAIData_893964_23
Ambika
Shanbhag
1154 Hickman Walk Apt. 884
Suite 361
Cindyland
121000000000004
bigAIData_893964_1
Barbara
Kamath
631 Wolf Roads
Suite 128
Rileystad
121000000000004
bigAIData_893964_2
Tony
Kamath
9142 Campbell Pike Suite
Suite 510
Nataliehaven
121000000000004
bigAIData_893964_3
Alex
Kamath
410 Williams Run
Suite 764
Haynesburgh
The records with the business ID 121000000000002 merge with the existing source records, and they contribute to the corresponding master record. Additionally, all input records with the business ID 121000000000004 are merged to create a master record.
You can update the values of root fields, field groups, and nested field groups. To update field values in a section, you must include all the field values of that section. If you include only few fields in a section, the import process removes values from other fields.
For example, consider that the Charles record has root fields, such as First Name, Last Name, Date of Birth, and Gender, and then an address field group with fields, such as Address Line 1, City, and Country.
To update values of the First Name and Address Line 1 fields, you must also include values for the Last Name, Date of Birth, and Gender fields of the root section and values for the City and Country fields of the address field group section. If you exclude them, the import process removes values from these fields and updates the values of the First Name and Address Line 1 fields.
Ensure that you specify the source primary key of the record and the specific field group ID of existing records that you want to update.
Consider the following example for updating field values in root section and the field group entry:
Source Primary Key
First Name
Last Name
Date of Birth
Address Field Group ID
Address Type
Address Line 1
City
SFDC_345
Charles
Richard
03/20/1988
6785
Office
14 Washington Square N, Block 10011
New York
SFDC_536
Andrew
Chris
09/10/1980
5672
Billing
10 Broadway, MH Street, ADH Colony
Bangalore
To update the date of birth of the Charles record and the address line 1 of the Andrew record, import the following records by using the update record sections option:
Source Primary Key
First Name
Last Name
Date of Birth
Address Field Group ID
Address Type
Address Line 1
City
SFDC_345
Charles
Richard
03/20/1987
SFDC_536
5672
Billing
5th Avenue, Fairlands, ABC Layout
Bangalore
When the import is complete, you can view the following records:
Source Primary Key
First Name
Last Name
Date of Birth
Address Field Group ID
Address Type
Address Line 1
City
SFDC_345
Charles
Richard
03/20/1987
6785
Office
14 Washington Square N, Block 10011
New York
SFDC_536
Andrew
Chris
09/10/1980
5672
Billing
5th Avenue, Fairlands, ABC Layout
Bangalore
In the preceding sample, you can see that the date of birth value is updated for the Charles record, and the billing address is updated for the Andrew record.
Delete field group entries
To delete field group entries, set the operation type column to delete in the CSV file. When you want to delete a specific root field value, specify all the root field values except the field value that you want to delete in the CSV file. You can't use the delete operation type to delete the root field values, hierarchy and relationship records.
Note: You can't use the delete operation type to delete all the root field values of a record.
For example, consider the following existing records:
Source Primary Key
First Name
Last Name
Date of Birth
Address Field Group ID
Address Type
Address Line 1
City
SFDC_123
Mary
T
02/19/1990
3788
Home
2nd Street, Fairlands, North Block
Mumbai
SFDC_345
Charles
Richard
03/20/1988
6785
Office
14 Washington Square N, Block 10011
New York
Import the following records by specifying the delete operation type:
Source Primary Key
First Name
Last Name
Date of Birth
Address Field Group ID
Address Operation Type
SFDC_123
3788
Delete
SFDC_345
Charles
Richard
When the import is complete, you can view the following records:
Source Primary Key
First Name
Last Name
Date of Birth
Address Field Group ID
Address Type
Address Line 1
City
SFDC_123
Mary
T
02/19/1990
SFDC_345
Charles
Richard
6785
Office
14 Washington Square N, Block 10011
New York
In the preceding example, you can see that the date of birth is deleted from the Charles record, and the office address is deleted from the Mary record.
Delete source records
To delete source records that you don't need, specify delete in the operation type column in the CSV file. When you want to delete a source record, specify the values for the required root fields and the source primary key of the source record.
For example, consider the following records:
Source Primary Key
First Name
Last Name
Date of Birth
Address Type
Address Line 1
City
SFDC_148
Tom
T
02/19/1992
Home
2nd Street, Fairlands, North Block
Mumbai
SFDC_560
Hary
Richard
03/20/1983
Office
14 Washington Square N, Block 10011
New York
Import the following records by specifying the delete operation type and values for the mandatory fields:
Source Primary Key
Operation Type
First Name
Last Name
Date of Birth
Address Type
Address Line 1
SFDC_148
Delete
Tom
02/19/1992
SFDC_560
Delete
Hary
03/20/1983
After the import is complete, the specified source records are deleted.
Delete relationships
To delete relationships that you don't need, specify delete in the operation type column in the CSV file. When you delete relationships, specify the source primary keys of the records that are related. Also, specify the unique source primary keys of the relationship.
After you upload the CSV file, select the target relationship to delete between the records.
The following table lists sample relationship data that you can import by specifying the operation type as delete:
Source Primary Key
_from_id_sourcePKey
_to_id_sourcePKey
Operation Type
101
67985f037ecc1d791818613d
6798679e7ecc1d79181861e6
Delete
102
67985f3f7ecc1d7918186154
67985f3f7ecc1d7918186154
Delete
103
67985f5d7ecc1d791818616b
6798679e7ecc1d79181861e6
Delete
After the import is complete, the specified relationships are deleted.
Delete hierarchies
To delete hierarchies that you don't need, specify delete in the operation type column in the CSV file. When you delete hierarchies, specify the source primary keys of root, parent, and child records.
After you upload the CSV file, select the target hierarchy to perform the delete operation.
For example, consider a hierarchy having Insurance to Hospital relationship.
The following table lists sample hierarchy data that you can import by specifying the operation type as delete:
Hierarchy Instance_SPkey
Instance_Name
InsToHos.SPkey
Root SPKey
Parent_SPkey
Child_SPkey
Operation Type
hierarchy_create_Pkey
HierarchyCreate
Hos_100
6798dc871640a65a216aa1cd
6798dc871640a65a216aa1cd
67985f857ecc1d7918186182
Delete
hierarchy_create_Pkey
HierarchyCreate
Hos_101
6798dc871640a65a216aa1cd
6798dc871640a65a216aa1cd
67985fa87ecc1d7918186199
Delete
The following table describes the column names present in the CSV file:
Column Name
Description
Hierarchy Instance_SPkey
Unique source primary key that identifies the hierarchy.
Instance_Name
Name of the hierarchy.
InsToHos.SPkey
Unique source primary key of the hierarchical relationship to create between the records.
Instance_Root SPKey
Source primary key of the top-level parent record.
Parent_SPkey
Source primary key of the parent record.
Child_SPkey
Source primary key of the child record.
Operation Type
Type of operation to perform, such as delete.
After the import is complete, the specified hierarchy data is deleted.
Restore source records
To restore the deleted source records, specify restore in the operation type column in the CSV file. When you want to restore a deleted source record, specify the values for required root fields and the source primary key of the record.
For example, consider the following deleted records:
Source Primary Key
First Name
Last Name
Date of Birth
Address Type
Address Line 1
City
SFDC_148
Tom
T
02/19/1992
Home
2nd Street, Fairlands, North Block
Mumbai
SFDC_560
Hary
Richard
03/20/1983
Office
14 Washington Square N, Block 10011
New York
Import the following records by specifying the restore operation type and field values for the mandatory fields:
Source Primary Key
Operation Type
First Name
Last Name
Date of Birth
Address Type
Address Line 1
SFDC_148
Restore
Tom
02/19/1992
SFDC_560
Restore
Hary
03/20/1983
After the import is complete, the specified records are restored.