Skip to main content

Discover Data Mapper Types

Learning Objectives

After completing this unit, you’ll be able to:

  • Summarize what Omnistudio Data Mappers are.
  • List the four types of Omnistudio Data Mappers.
  • Describe the capabilities of each Omnistudio Data Mapper type.

An Overview of Omnistudio Data Mappers

If you completed the OmniStudio Architecture module, you learned all about the OmniStudio suite of configuration tools and resources that provides guided user experiences for Salesforce customers. In this module, you learn some basics about Omnistudio Data Mappers, one of the primary components in OmniStudio’s Service Management layer. 

So what exactly is an Omnistudio Data Mapper? A Omnistudio Data Mapper is a mapping tool that enables you to read, transform, and write Salesforce data. 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 Omnistudio Data Mappers come in. 

There are four different types of Omnistudio Data Mappers (and we cover each in detail shortly), but in general, Omnistudio Data Mappers supply data to OmniScripts and OmniStudio FlexCards from Salesforce, and write updates from OmniScripts and FlexCards back to Salesforce. They typically do this via OmniStudio Integration Procedures. 

Here’s an example of the data flow.

  1. Get Data: An OmniScript calls a Omnistudio Data Mapper Extract (via an Integration Procedure) to read data from Salesforce. For example, an Edit Account OmniScript needs to display data such as the account name, phone number, and website.
  2. Manipulate Data: The OmniScript captures changed and new data based on user input. For example, an agent changes the account phone number.
  3. Save Data: The OmniScript calls a Omnistudio Data Mapper Load (via 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 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:

  • Updating Salesforce records
  • Creating Salesforce records
  • Migrating CSV data into Salesforce records

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 do the following. 

  • 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.

Note

The steps in this module are for demonstration purposes only. OmniStudio is not enabled in Trailhead Playground orgs.

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 we describe 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
  • Better performance at runtime

An example of when to use an Omnistudio Data Mapper Turbo Extract is to retrieve contacts for an account (having a specified Id).

Omnistudio Data Mapper Extract

Omnistudio Data Mapper Extract, the second type of Omnistudio Data Mapper that pulls 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 need to display. They support formulas and complex output mappings.

Use Omnistudio Data Mapper Extracts if you are:

  • 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 a Omnistudio Data Mapper Extract for use by a case-handling OmniScript. The agents who handle cases need to look up a case using the case number, and need to 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 a Omnistudio Data Mapper Extract to retrieve a lot of 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.

The 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 are:

  • Creating a contact and using a formula: A Omnistudio Data Mapper Load creates a new Contact record. A formula checks whether the contact is over 18 years old; if so, a custom Authorized field is set to true.
  • Creating a contact for an existing account: A Omnistudio Data Mapper Load creates a new Contact record. A link to an Account record with a specific Id ensures that the new Contact is related to that account.

Omnistudio Data Mappers can access external objects and custom metadata as well as Salesforce objects. No special syntax or additional configuration is required to do this.

Omnistudio Data Mapper Transform

Omnistudio Data Mapper Transforms do the following.

  • 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 for the following situations.

  • When an OmniScript must populate a DocuSign template.
  • When an OmniScript must fill fields in a PDF document.

In the following 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.” 

Corresponding diagram of information

You’ve got the Omnistudio Data Mapper basics down! In the next unit, you explore how to execute Omnistudio Data Mappers using Omnistudio Data Mapper Designer, as well as its features, formulas, and functions.

Resources

Partagez vos commentaires sur Trailhead dans l'aide Salesforce.

Nous aimerions connaître votre expérience avec Trailhead. Vous pouvez désormais accéder au nouveau formulaire de commentaires à tout moment depuis le site d'aide Salesforce.

En savoir plus Continuer à partager vos commentaires