Vlocity Facts #02 | OmniStudio - Turbo DataRaptor

DataRaptor Turbo Extract Overview

A DataRaptor Turbo Extract retrieves data from a single Salesforce object type, with support for fields from related objects. You can filter the data and select the fields to return. Unlike a standard DataRaptor Extract, a DataRaptor Turbo Extract doesn't support formulas. There’s no Output tab, so you can't use mappings to structure the output. Custom JSON, default values, and translations aren't supported.

A DataRaptor Turbo Extract has two advantages over a standard DataRaptor Extract:
  • Simpler configuration
  • Better performance at runtime
Scenario for DataRaptor Turbo Extract:

ABC Company Service Center Employees need to access the case details and associated contact details of the case and update the case details from OmniScript.

For this requirement we need to build 2 Integration Procedures, 2 DataRaptors and 1 OmniScript.
    • DataRaptor Turbo Extract : To get the data of the case and associated contact details.
    • DataRaptor Load : To Update the Case Details.
    • Integration Procedure: In Integration procedure we will use DataRaptor Actions.  
    • OmniScript : To display the case and contact details.
We will discuss how to create a Turbo Extract and display data in OmniScript.
 
Create a DataRaptor Turbo Extract

For Creating a DataRaptor Turbo Extract you need to mention Interface Type, Input Type, Output Type, Required Permission (optional), Description (optional)  
  • Interface should be Turbo Extract 
  • Input Type should be either Json for omniscript or XML or Custom
  • Output Type should be either Json for omniscript or Custom


Configure a DataRaptor Turbo Extract

    For Configuring a Turbo Extract we need to follow these steps in Extract tab. 
  • Sobject :We need to mention the Sobject Name to extract the data.
  • Extract Output Path : Specifies the top-level JSON node in the output.
  • Filter : To filter the records from that object based on particular filed.
  • Matches : We can use these matches in filter condition [ =, <>, <, >, <= , >=, ~=, Like, Not Like, Includes, Excludes, In].
  • Additional Filter : By adding additional filters we can trim the data exactly what we need.
    [ AND, OR, LIMIT, ORDER BY, OFFSET ]
In Turbo Extract only we will have "IN" value in Matches.
At Least one filter condition we need to add in Extract tab. 

Select fields to extract the data

By using Related object and Search Fields we can select the fields from the Sobject and Related objects associated to Sobject.


After Selecting Sobject by adding filter conditions and Adding fields in Extract Tab we can see the excepted output Json in Preview Tab.

Now we need to pass ContextId from OmniScript to Integration Procedure.

 

After Passing ContextId from OmniScript to Integration Procedure, Again we need to pass the Key value from Integration Procedure to DataRaptor Turbo Extract as a Data Source.

Now we need to Create OmniScript to display the Data. While giving element name to the omniscript you need to be careful. Copy the node names from Json in the preview tab in Turbo Extract and add those node names to the respective elements. If we mismatch the node names and element names data will be not displayed in the OmniScript.



Place the Integration Procedure before the Step element in the omniscript. OmniScript or Integration Procedure executes from Top to bottom approach.

After adding and arranging the Integration Procedure in OmniScript it will look like this

Now For testing the omniscript click on preview tab top right and pass the case Id as ContextId to see the result.


In Next Blog I will tell you how to use DataRaptor load and How to map the fields.
For more Details about DataRaptors and Types check this link DataRaptors.



Comments

Popular posts from this blog

Vlocity Facts #01 | OmniStudio DataRaptors

Vlocity Facts #34 || Getting the details from the URL in a FlexCard and an Omniscript

Vlocity Facts #44 || Communication between Omniscript and Flexcard [Pub/Sub]