For the managed package runtime, the following example of an Omnistudio Data Mapper Load creates a record in the Salesforce Contact object. A link to an Account object record with a specific Id ensures that the new Contact is related to that Account.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
The input JSON for this Data Mapper Load contains the Account Id and the Contact name, for example:
{
"AccountId": "0016100001BKL4uAAH",
"Name": {
"First": "Jane",
"Last": "Doe"
}
}
To create this example Data Mapper Load:
- Navigate to the Data Mapper tab and click New. The Create: Data Mapper Interface dialog is displayed.
-
Enter settings as follows and click Save:
-
Data Mapper Interface Name: A descriptive name of your choice
-
Interface Type: Load
-
Input Type: JSON
-
Output Type: SObject
-
- On the Objects tab, click Add Object and choose Account.
- Click Add Object again and choose Contact.
-
Click Add Link and enter settings as follows:
-
Domain Object Field: AccountId
-
Linked Object: 1 - Account
-
Linked Object Field (after the period): Id
-
-
Go to the Fields tab and the Account subtab. Click the + icon and add the following mapping:
-
Input JSON Path: AccountId
-
Domain Object Field: Id
-
Upsert Key: checked
-
-
Go to the Contact subtab. Add the following name mappings:
Input JSON Path Domain Object Field Name:First FirstName Name:Last LastName The AccountId mapping is already present.
- On the Preview tab, test the Data Mapper using input with the same structure as the sample input above, substituting an Account Id from your org and a name of your choice.