For the managed package runtime, create an Omnistudio Data Mapper Extract for use by a Case-handling Omniscript. The agents who handle Cases can look up an Account, list all the Cases for the Account, and find the Contact for each Case.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
To download a data pack of this example for Omnistudio for Managed Packages, click here.
To create this Data Mapper Extract:
- Go the Data Mapper tab and click New. The Create dialog is displayed.
-
Specify a name for the Data Mapper and configure its settings:
-
Interface Type β Extract
-
Input Type β JSON
-
Output Type β JSON
-
- Click Save. The Data Mapper Interface page is displayed.
-
On the Extract tab, add three extract steps:
Object
Extract Output Path
Filter
Account
Account
Id = AccountId
Case
Account:Case
AccountId = Account:Id
Contact
Account:Case:Contact
Id = Account:Case:ContactId
-
On the Output tab, map fields from the Extraction Step JSON to the Output JSON. To add a mapping, click the + button. Add four mappings:
Extract JSON Path
Output JSON Path
Account:Name
Account:Name
Account:Case:CaseNumber
Account:Case:CaseNumber
Account:Case:Subject
Account:Case:Subject
Account:Case:Contact:Name
Account:Case:Contact:Name
-
Verify that the structure displayed in the Current JSON Output panel looks like this:
{ "Account": { "Case": { "CaseNumber": "Text", "Contact": { "Name": "Text" }, "Subject": "Text" }, "Name": "Text" } }The order of fields in not important, but the structure is.
- Go to the Preview tab. If you see an Edit as Params link, click it.
-
In the Input Parameters pane, specify a Key of
AccountIdand a Value of an Id such as0015e000003XlkMAAS. -
Click Execute. Assuming the Account has associated Cases, the response looks like this:
{ "Account": { "Case": [ { "Contact": { "Name": "Edward Stamos" }, "Subject": "Cannot track our order", "CaseNumber": "00001004" }, { "Contact": { "Name": "Leanne Tomlin" }, "Subject": "Wrong size widgets", "CaseNumber": "00001003" }, { "Contact": { "Name": "Jeff Hunt" }, "Subject": "Update account phone number", "CaseNumber": "00001005" }, { "Contact": { "Name": "Edward Stamos" }, "Subject": "Billing status", "CaseNumber": "00001006" } ], "Name": "Acme" } }