You are here:
Create a Contact for an Existing Account
A common task for an Omnistudio Data Mapper Load is to create a record in a Salesforce object that's linked to another object. In this example, a Data Mapper Load creates a record in a Contact object. A link to an Account object record with a specific Id ensures that the new Contact is related to that Account.
The input JSON for this example includes the the Account Id and contact name, and the data is in expected formats. But the names aren't the same as the Contact fields.
{
"AccountId": "0016100001BKL4uAAH",
"Name": {
"First": "Jane",
"Last": "Doe"
}
}Create Settings
| Field | value | notes |
|---|---|---|
| Interface Type | Load | |
| Input Type | JSON | In this example, the input is provided as JSON and not pulled from another source. |
| Output Type | sObject |
Object Settings
Click + and select Account and then Contact.
For Contact, add a link with these settings:
-
Domain Object Field: AccountId
-
Linked Object: 1 - Account
-
Linked Object Field (after the period): Id
Mapping Settings
Map data from the input JSON to the target Salesforce objects and fields. See Configure an Omnistudio Data Mapper Load.
For Account, create these mappings.
-
Input JSON Path: AccountId
-
Domain Object Field: Id
-
Upsert Key: checked
For Contact, create these mappings. The AccountId mapping is already present.
| Input JSON path | Domain Object Field |
|---|---|
| Name:First | FirstName |
| Name:Last | LastName |
Load Preview
In Preview, enter the sample JSON as input, and replace the Account Id with one from your org.
After you execute the sample Data Mapper in Preview, links to the updated Account and new Contact objects are displayed in the Objects Created pane. Click the links to verify.

