OmniStudio DataRaptors

OmniStudio DataRaptors typically supply data to OmniScripts, Integration Procedures, and Cards, and write updates from OmniScripts, Integration Procedures, and Cards to Salesforce. In this post we will talk about what is OmniStudio DataRaptor and Type of DataRaptor.

What is OmniStudio DataRaptor?

Think of it this way: for every digital customer interaction or business process, your system needs to extract data to display it. When the user changes that data or enters new data, it must be saved too. That’s where OmniStudio DataRaptors come in. A DataRaptor is a mapping tool that enables you to read, transform, and write Salesforce data. There are four types of DataRaptor: Turbo Extract, Extract, Transform, and Load.

DataRaptors Code Capabilities

Here are some code capabilities of DataRaptor (DR) in Salesforce:

  • ETL For Salesforce : DataRaptor Mapping tool enable read, write and transform JSON and XML inputs. It also helped in perform intermediate data transformation without reading from or writing to Salesforce.
  • Declarative no code/ Low Code : DataRaptor is a declarative tool and no code is required to get data from Salesforce.
  • Substitute for Apex: Although apex classes can read write and transform data they can take longer to create and are harder to maintain then dataRaptors. Therefore, use dataRaptor as Vlocity best practice.
  • Handle custom data Formulas : DataRaptor Extract and Load can handle custom data formats. It can access external object and custom metadata as well as sObject.

Type of OmniStudio DataRaptors

Let understand the different type of OmniStudio DataRaptors.

  1. Turbo Extract: Read data from a single Salesforce object type, with support for fields from related objects. Then select the fields to include. Formulas and complex field mappings aren’t supported.
  2. Extract: Read data from Salesforce objects and output JSON or XML with complex field mappings. Formulas are supported. We can data from one or more Objects.
  3. Transform: Perform intermediate data transformations without reading from or writing to Salesforce. Formulas are supported.
  4. Load: Update Salesforce data from JSON or XML input. Formulas are supported.
OmniStudio DataRaptors

Note  – Dataraptor can access external objects and custom metadata

1. DataRaptor Turbo Extract

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. 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. But it

  1. Simpler configuration
  2. Better performance at runtime

2. DataRaptor Extract

DataRaptor Extracts read Salesforce data and return results in JSON, XML, or custom formats. You can filter the data and select the fields to return. Formulas, default values, and translations are supported. Extracts typically provide OmniScripts, Integration Procedures, and Cards with the data they require.

3. DataRaptor Transform

DataRaptor Transforms let you perform intermediate data transformations without reading from or writing to Salesforce. Formulas are supported.

  1. Convert JSON input to XML output, and vice versa
  2. Restructure input data and rename fields
  3. Substitute values in fields (all DataRaptors can substitute values)
  4. Convert data to PDF, DocuSign, or Document Template format

4. DataRaptor Load

DataRaptor Loads accept data in JSON, XML, or custom input formats and write the data to Salesforce objects. Formulas and attributes are supported. For example, when a user running a case-handling OmniScript finishes entering data and clicks Save, the script calls a DataRaptor Load to record the data entered.

DataRaptor Designer

Extract Tab – Specify the Salesforce objects you want the DataRaptor to query and the filters that determine the data to be returned from the object

DataRaptor Designer Extract Tab

Formula Tab – Define a formula, you map its output to the output JSON (for extracts and transforms) or Salesforce object field (for loads).

DataRaptor Designer Formula Tab

Dataraptor Functions : Change the data you are working with in more complex ways than with mapping inputs and outputs, use functions

Output Tab – map data from the extract step JSON to the output JSON

DataRaptor Designer Output Tab

Options Tab – Set advanced options for execution. you set advanced options such as whether to check the user’s access permissions for the fields before executing the DataRaptor. Set the Platform Cache Type to Session Cache for data related to users and their login sessions, or Org Cache for all other types of data. The Time to Live in Minutes setting determines how long the data remains in the cache.

Preview Tab – Test the output of the DataRaptor.

Top Common Mistakes of DataRaptors

Here are some common mistake for Data Raptors.

  1. VlocityMetadata Platform Cache is not set
  2. Teams are adding objects to the DataRaptors to get data that could be accomplished by using relationship queries 
  3. Teams are trying to create “Uber” DataRaptors to cover as many of their data needs as possible. (as high as 12 Objects) 
  4. DataRaptor receives more data than needed
  5. DataRaptor uses many formulas (as high as 30)

OmniStudio DataRaptors Best Practices

Follow below OmniStudio DataRaptors best practices.

Allocate space to Vlocity Metadata Platform CacheAllocate space to Vlocity Metadata to cache DataRaptor Metadata. Allocate space only to Org Cache. You can allocate 5 MB or what is needed in your context.
Create targeted DataRaptors and limit the number of Objects to 3 where possibleCreate targeted DataRaptors that only extract or load the data needed for one operation. Try to keep the number of objects to 3 or
less
Use Relationship Query to reduce the number of Extract ObjectsUse relationship notation (queries) whenever possible to pull data from other SObjects.
Trim the data sent to and received from DataRaptorSend only the necessary input and return only the outputs you need.
Reduce where possible DataRaptor FormulaDataRaptor works in series, limit where possible the number of formulas for better performance
Use Turbo Extract, more performant where  possibleWhen you have 1 Object to extract and no formula, Use Turbo
Use DataRaptor Data Cache (Session or Org)where possibleUse caching to store frequently accessed, infrequently updated data
Ensure that all filters and sorts have supporting indexesEnsure that all filtering and sorting (ORDER BY) operations are on indexed fields. The Id and Name fields are always indexed.
Use OOTB functionality where possible before creating a custom FormulaBefore creating a new formula, check the solution with:
OOTB formula Output Type OOTB config (Map Values)
Server processing time must be under 5 sec.For synchronous Transaction, to avoid hitting Salesforce Governor Limits for Long Running Transaction, processing time must be under 5 sec.

Recording

YouTube video

DataRaptor Naming Conventions

  1. DataRaptor Names Must be unique within the org and there should be No spaces
  2. Use camelCase – prefix, Verb, Object and Detail
  3. Use an action verb and descriptive nouns
  4. Use abbreviations
  5. Example : prefixVerbObjectDetail and teamGetAcctCases

Summary

DataRaptor is a declarative extract-transform & load tool that runs natively on the Salesforce platform.

Amit Chaudhary
Amit Chaudhary

Amit Chaudhary is Salesforce Application & System Architect and working on Salesforce Platform since 2010. He is Salesforce MVP since 2017 and have 17 Salesforce Certificates.

He is a active blogger and founder of Apex Hours.

Articles: 459

Leave a Reply

Your email address will not be published. Required fields are marked *