Discover Data Mapper Types
Learning Objectives
After completing this unit, you’ll be able to:
- Explain the function of Omnistudio Data Mappers in Omnistudio for Managed Packages.
- List the four types of Omnistudio Data Mappers.
- Describe the capabilities of each Omnistudio Data Mapper type.
Meet Omnistudio Data Mappers
For every digital customer interaction or business process, your system needs to extract and show data. When the user changes that data or enters new data, it must be saved, too.
That’s where Omnistudio Data Mappers come in.
Omnistudio Data Mappers are mapping tools that help you read, transform, and write Salesforce data. In this module, you will learn the basics of Omnistudio Data Mappers, one of the primary components in the Service Management layer in Omnistudio for Managed Packages.
There are four types of Omnistudio Data Mappers, but in general, Omnistudio Data Mappers supply data from Salesforce to Omniscripts and Flexcards. Omnistudio Data Mappers also write data updates from Omniscripts and Flexcards back to Salesforce. They typically do this via Omnistudio Integration Procedures.
Here’s an example of the data flow.
-
Get Data: An Omniscript calls an Omnistudio Data Mapper Extract through an Integration Procedure to read data from Salesforce. For example, an Edit Account Omniscript needs to show data such as the account name, phone number, and website.
-
Manipulate Data: The Omniscript captures changed and new data based on user input. For example, a service rep changes the account phone number.
-
Save Data: The Omniscript calls an Omnistudio Data Mapper Load through an Integration Procedure to write data back to Salesforce. For example, the updated account phone number is saved back to the Account record.
Although Apex classes can read, write, and transform data, Omnistudio Data Mappers offer a few more perks. Omnistudio Data Mappers take less time to create and are easier to maintain. That’s why we recommend using Omnistudio Data Mappers as a best practice.
Now let’s look at what each of the four types of Omnistudio Data Mapper does.
What It Is
|
What It Does
|
---|---|
Omnistudio Data Mapper Turbo Extract |
Gets data from a single Salesforce object |
Omnistudio Data Mapper Extract |
Gets data from one or more Salesforce objects |
Omnistudio Data Mapper Load |
Saves data to one or more Salesforce objects by:
|
Omnistudio Data Mapper Transform |
Manipulates any data that comes from inside or outside Salesforce |
Omnistudio Data Mapper Extract, Omnistudio Data Mapper Load, and Omnistudio Data Mapper Transform also:
- Trim, map, restructure, and transform data in JSON, XML, or Custom Schema.
- Use formulas and functions to transform data.
Interested to know more? Next, we break down the capabilities of each type of Omnistudio Data Mapper.
Omnistudio Data Mapper Turbo Extract
Omnistudio Data Mapper Turbo Extract retrieves and filters 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 Omnistudio Data Mapper Extract—which you'll learn about next— an Omnistudio Data Mapper Turbo Extract doesn’t support formulas or complex output mappings.
It has two advantages over a standard Omnistudio Data Mapper Extract: Simpler configuration and better performance at runtime.
An example of when to use an Omnistudio Data Mapper Turbo Extract is to retrieve contacts for an account when you have a specified Id.
Omnistudio Data Mapper Extract
Omnistudio Data Mapper Extracts pull data from Salesforce, reads Salesforce data, and returns results in JSON, XML, or custom formats via complex field mappings. You typically use Omnistudio Data Mapper Extracts to provide Omniscripts and Flexcards with any internal Salesforce data. They support formulas and complex output mappings.
Use Omnistudio Data Mapper Extracts if you’re:
-
Extracting data from a single object. For example, to retrieve account data such as Account Name and other details from the Account object in Salesforce.
-
Extracting data from three related objects. For example, create an Omnistudio Data Mapper Extract for use by a case-handling Omniscript. Service reps who handle cases can look up a case using the case number, and must be able to view the name of the account, the description of the case, and all the contacts for the account.
-
Paging through sorted data using data values or offset values. If you expect an Omnistudio Data Mapper Extract to retrieve many records, use paging to retrieve a few at a time based on field values or offset values. For example, page through a long list of accounts by Account Id or contacts by last name.
Omnistudio Data Mapper Load
Omnistudio Data Mapper Loads write data to Salesforce objects from JSON or XML input. An Omnistudio Data Mapper Load updates records with changed data and also creates new records at the same time.
- To modify the input data, you define formulas, transform values, and change the output data type.
- To specify how the resulting data is written to Salesforce objects, you map fields from the output JSON to fields in Salesforce objects.
An Omnistudio Data Mapper Load applies its mappings and formulas to the input data to create the output data, then loads the output data into Salesforce objects according to the mappings.
Use Omnistudio Data Mapper Loads if you’re:
-
Creating a contact and using a formula. For example, an Omnistudio Data Mapper Load creates a new contact. A formula checks if the contact is over 18 years old. If so, a custom Authorized field is set to true.
-
Creating a contact for an existing account. For example, an Omnistudio Data Mapper Load creates a new contact. The contact is automatically related to an existing account with a specific ID.
Omnistudio Data Mappers can access external objects and custom metadata as well as Salesforce objects. No special syntax or additional configuration are required to do this.
Omnistudio Data Mapper Transform
Omnistudio Data Mapper Transforms can:
- Convert JSON input to XML output, and vice versa.
- Restructure input data and rename fields.
- Substitute values in fields (all Omnistudio Data Mappers can substitute values).
Use Omnistudio Data Mapper Transforms when:
- An Omniscript must populate a DocuSign template.
- An Omniscript must fill fields in a PDF document.
For example, an insurance company implemented Omnistudio Data Mapper Transform so that its labels make more sense to the user.
Policy information is stored in the Salesforce Asset object, but Omnistudio Data Mapper Transform changes the label the user sees from “Asset” to “Policy.” It also changes “vlocity_ins__AnnualPremium__c” to “Annual Premium.” And it changes two labels for Contacts from “Contact” to “Policy Holder,” and from “Contact” to “Policy Beneficiary.”
Great! You’ve got the Omnistudio Data Mapper basics down!
In the next unit, you will explore how to execute Omnistudio Data Mappers using Omnistudio Data Mapper Designer in Omnistudio for Managed Packages, as well as its features, formulas, and functions.
Resources
- Salesforce Help: Omnistudio Data Mappers (Omnistudio for Managed Packages)
- Trailhead: Omniscripts
- Trailhead: OmniStudio FlexCards