Author: Bhavya Chanan & Sanjeevani Shukla
In this blog we are going to start with the Service Management Layer in Omnistudio and cover Load DataRaptor in detail.
For those who have not gone through the previous blog, Omnistudio is a drag n drop based tool based on what you see is what you get model which enables users to implement complex functionalities without writing custom code.
Find the link of the previous blog below to brush up the prerequisite:
Omnistudio has 3 layers:
Digital Experience layer which is more of a UI layer containing components like Flexcards and Omniscripts.
Service Management layer which focuses on the backend processing though DataRaptors and Integration Procedures.
Developer Experience layer comes into picture once we are through with the development and focussing on deployment.
Today we are going to start off with DataRaptors which is a part of Service Management layer of Omnistudio.
DataRaptors are basically used to get the data from Salesforce or update, insert or transform the data in the Salesforce.
We have 4 kinds of dataraptors in Omnistudio based on their function.
When one needs to get data from one or more Salesforce objects at the same time, we use Extract as the interface type while creating a Data Raptor.
When one needs to get data from a single Salesforce object we can use Turbo Extract as the interface type.
We can insert new Salesforce records and update the older one using Load interface. Load can be to DML operations.
We don’t bring any data from Salesforce nor do we insert or update data in the org using the Transform interface. This special type of Data Raptor is used to manipulate data. Thus transform interface performs any changes in the data that has already been retrieved from the org or even any other data coming from outside Salesforce.
Let us learn about Load Dataraptors in detail which are used to create or update records in Salesforce.
Go to Omnistudio app ——– > From the drop down select Dataraptors ——– >
Click on new from the type dropdown and select the dataraptor you want to use. For now I will select Load.
Give data raptor Name – DR_Load_Practice3
Click on Save.
A new console opens with 5 subtabs: Objects, Formulas, Fields, Options, Preview.
First tab is the object tab. Here we will mention which objects we need to insert.
Now in the Fields we will provide the mappings.
Input Json Path – lastName
Domain Object Field – LastName
Go to the Preview tab. Here will create input Json.
“lastName” : “Bhavya Chanan Omnistudio1”
Now as soon as you hit execute. You will see a record id in the object created.
This is the simplest example of a Load dataraptor.
You can also insert multiple records at the same time by providing a json list in input json.
“contacts” : [
“lastName” : “My 1st Contact”
“lastName” : “My 2nd Contact”
Copy this json in the input panel of the fields tab.
input json path —> contacts:lastName
Next Copy this json in the input json of the preview tab and then hit Execute.
You can check the newly created contacts in your org.
Now let’s look at an example where we can insert related records.
We will insert the Account first and then its related contact.
Objects tab : Select Account first and the Contact Object. For Contact Add Link:
Domain Object Field—> AccountId
Linked Object —> 1-Account —- Id
Go to the fields. You will see 2 subtabs:
Account : name —- > Name
Contact : lastName —- > LastName
Hit Preview. Give a Simple Input Json.
“name” : “Account new load“,
“lastname” : “contact name new“
For upserting you can check the checkbox upsert key and for explicitly only updating you can check Upsert Key and Is Required For Upsert for the id field.
You can check the newly created Account and a contact under it.
That’s all for starting with Load Dataraptors.