---
schema_version: "1"
id: b7858e5053f2671da3e09831c7af1e22b37eea27f302a511509d3d17969fe6cc
title: Omniscript Data Mapper Action Elements
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_omniscript_data_mapper_action_elements.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_omniscript_data_mapper_action_elements.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f7a18894f5f292ee8efff25cd936877abd22a74970a4d97623f247c788f11903
description: Use Data Mapper actions to retrieve, write, or restructure data from one or more related Salesforce objects.
products:
  - Omnistudio
release: "264"
---
# Omniscript Data Mapper Action Elements

Use Data Mapper actions to retrieve, write, or restructure data from one or more related Salesforce objects.

To add any of these elements, drag the element to the canvas. Add the Data Mapper element in the appropriate logical order, depending on the action. For example, if you're retrieving data, you'll like want to add it at the beginning of a step. Similarly, writing data to an object is likely done lower or even at the end of a step or in the last step in a sequence.

In the properties for the element, select the appropriate Data Mapper name to call. If it doesn't exist, create a Data Mapper from the properties panel.

- **[Retrieve Data From Multiple Objects With an Omnistudio Data Mapper Extract Action](https://help.salesforce.com/s/articleView?id=xcloud.os_omniscript_data_mapper_action_elements.htm&release=264.0.0&type=5)**  
    To load an Omniscript with data from Salesforce objects, call a Data Mapper Extract. It can get data from one or more related Salesforce objects. You can also use formulas and complex field mappings.
- **[Write Data to Objects With an Omnistudio Data Mapper Post Action](https://help.salesforce.com/s/articleView?id=xcloud.os_omniscript_data_mapper_action_elements.htm&release=264.0.0&type=5)**  
    Create and update sObjects from an Omniscript with an Omnistudio Data Mapper Post Action. The Data Mapper Post Action sends data from the Omniscript to a Data Mapper Load that updates or adds to one or more Salesforce objects.
- **[Restructure Data With an Omnistudio Data Mapper Transform Action](https://help.salesforce.com/s/articleView?id=xcloud.os_omniscript_data_mapper_action_elements.htm&release=264.0.0&type=5)**  
    To restructure, rename, and convert data, use a Data Mapper Transform element. It sends the full Omniscript Data JSON to the Data Mapper and returns the mapping from the Data Mapper. Unlike Data Mapper Extracts and Loads, Transforms don’t read or write Salesforce data.
- **[Retrieve Data From an Object with an Omnistudio Data Mapper Turbo Action](https://help.salesforce.com/s/articleView?id=xcloud.os_omniscript_data_mapper_action_elements.htm&release=264.0.0&type=5)**  
    To get data from a single Salesforce object to use in an Omniscript, use a Data Mapper Turbo Extract Action. Unlike a standard Data Mapper Extract, a Data Mapper Turbo Extract doesn't support formulas or complex field mappings. Because the returned data type is Map<String, Object> and not SObject, you can't use it to update Product2 objects without reserializing. A Data Mapper Turbo is simpler to set up and can run more quickly than a Data Mapper Extract.

## Retrieve Data From Multiple Objects With an Omnistudio Data Mapper Extract Action

To load an Omniscript with data from Salesforce objects, call a Data Mapper Extract. It can get data from one or more related Salesforce objects. You can also use formulas and complex field mappings.

1. From the elements panel, drag the **Data Mapper Extract Action** element to the canvas.
2. From the properties panel, select the Data Mapper name to be called.
    
    You can type in the field to filter the list. If the Data Mapper Extract doesn't exist, create a Data Mapper from the properties panel.
3. Provide the name of a JSON node and the value of the JSON node as input parameters for the Data Mapper Extract.
    
    Each Data Source field must match a Data Mapper Extract input parameter. Each Filter Value must match values in the sObject field to which the input parameter refers.
4. Use the Response Transformations properties to trim or rename the output JSON.
    
    See [Manipulate JSON with the Send/Response Transformations Properties](https://help.salesforce.com/s/articleView?id=xcloud.os_manipulate_json_with_the_send_response_transformations_properties_22367.htm&release=264.0.0&type=5 "Specify and transform the input and output JSON of Omniscripts or Integration Procedures with the Send and Response Transformation properties. The Send properties transform the input; the Response properties transform the output.").

## Write Data to Objects With an Omnistudio Data Mapper Post Action

Create and update sObjects from an Omniscript with an Omnistudio Data Mapper Post Action. The Data Mapper Post Action sends data from the Omniscript to a Data Mapper Load that updates or adds to one or more Salesforce objects.

To use a Data Mapper Post Action in an Omniscript, you have three key items to set up:

- The data to add or update
- The object(s) to add or or update the data to
- The mapping of the data from the Omniscript JSON to the object and field

When multiple upsert keys are used, the record must match all keys for a match. If multiple actions are needed, use an Integration Procedure to host the Data Mapper Post Action and handle the requests.

First, the Omniscript must have access to or provide the data to update or add to an object. For example, if the data is user input, the Omniscript should have the input fields for that data, such as fields for an account name and industry and for an account contact’s first name, last name, and email address.

Second, the Data Mapper Load named in the action must include the Salesforce objects so you can write the data to those objects' fields. For example, the Data Mapper Load has the Account object and the Contact as a linked object via the AccountId field.

Third, in your Data Mapper, map data from the Omniscript to object fields to create or update. With the account contact example, the mapping includes the first name, last name, and email address. On the right, the JSON node reference is mapped to the object and field on the left.

| JSON Node reference | object and field |
| --- | --- |
| AccountDetails:AcctName | Account.Name |
| AccountDetails:Industry | Account.Industry |
| AccountDetails:ContactFirstName | Contact.FirstName |
| AccountDetails:ContactLastName | Contact.LastName |
| AccountDetails:ContactMail | Contact.Email |
|   |   |

To trim or rename the input JSON so it has the structure the Data Mapper Load expects, use the Send Transformations properties. See [Manipulate JSON with the Send/Response Transformations Properties](https://help.salesforce.com/s/articleView?id=xcloud.os_manipulate_json_with_the_send_response_transformations_properties_22367.htm&release=264.0.0&type=5 "Specify and transform the input and output JSON of Omniscripts or Integration Procedures with the Send and Response Transformation properties. The Send properties transform the input; the Response properties transform the output.").

Previewing the Omniscript has the JSON for the example input:

```json
{
  "omniscriptId": "0jNSG000000Fqnt2AC",
  "language": "English",
  "type": "Content",
  "subType": "Audit",
  "sId": "0jNSG000000Fqnt2AC",
  "runMode": "preview",
  "theme": "lightning",
  "LanguageCode": "en_US",
  "userProfile": "System Administrator",
  "timeStamp": "2025-05-19T15:43:49.752Z",
  "userTimeZoneName": "America/Los_Angeles",
  "userTimeZone": "-420",
  "userCurrencyCode": "USD",
  "userName": “exampleuser123,
  "userId": "005SG00000JaEzCYAV",
  "omniProcessId": "0jNSG000000Fqnt2AC",
  "localTimeZoneName": "Asia/Calcutta",
  "AccountDetails": {
    "AcctName": "Acme",
    "Industry": "Other",
    "ContactFirstName: "Jon”,
    "ContactLastName”: "Doe”,
    "ContactMail": “Jon_Doe@gmail.com"
  }
}
```

## Restructure Data With an Omnistudio Data Mapper Transform Action

To restructure, rename, and convert data, use a Data Mapper Transform element. It sends the full Omniscript Data JSON to the Data Mapper and returns the mapping from the Data Mapper. Unlike Data Mapper Extracts and Loads, Transforms don’t read or write Salesforce data.

Use the Send/Response Transformations properties to trim or rename the input JSON so it has the structure the Data Mapper Transform expects. Or you can trim or rename the output JSON for a subsequent Omniscript step.

See [Manipulate JSON with the Send/Response Transformations Properties](https://help.salesforce.com/s/articleView?id=xcloud.os_manipulate_json_with_the_send_response_transformations_properties_22367.htm&release=264.0.0&type=5 "Specify and transform the input and output JSON of Omniscripts or Integration Procedures with the Send and Response Transformation properties. The Send properties transform the input; the Response properties transform the output.").

## Retrieve Data From an Object with an Omnistudio Data Mapper Turbo Action

To get data from a single Salesforce object to use in an Omniscript, use a Data Mapper Turbo Extract Action. Unlike a standard Data Mapper Extract, a Data Mapper Turbo Extract doesn't support formulas or complex field mappings. Because the returned data type is Map<String, Object> and not SObject, you can't use it to update Product2 objects without reserializing. A Data Mapper Turbo is simpler to set up and can run more quickly than a Data Mapper Extract.

The Data Mapper Turbo should extract the fields needed in the Omniscript.

1. Provide the name and value of a JSON node as input parameters that the Data Mapper Turbo Extract requires.
    
    Each Data Source field must match a Data Mapper Turbo Extract input parameter. Each Filter Value must match values in the sObject field to which the input parameter refers.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)
    
    Note
    
    Data Mapper Turbo Extracts return objects in a nested array format.
    
    For example, to set the Context ID to the record ID for accounts, the **Data Source** field is set to Context ID, and **Filter Value** is set to the variable name as defined in the Data Mapper Turbo Extract.
    
    ![Example of a Filter Value in the Input Parameters that matches the filter value set in the Data Mapper Turbo Extract](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/omnistudio/images/os_omniscript_dm_turbo_input_example.png)
2. Define the response transformations.
    1. In the **Response JSON Path** field, enter the name of the object returned in the Action's response.
        
        To prefill elements, append a | delimiter and a number to access the correct instance in the nested array.
        
        <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
                    <colgroup>
                      <col>
                      <col>
                    </colgroup>
                    <thead class="slds-text-title_caps ">
                      <tr class="">
                        <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d57908e408">
                          <p style="margin-bottom:0;">Data Mapper Turbo Extract JSON Example</p>
                        </th>
                        <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d57908e414">
                          <p style="margin-bottom:0;">Response JSON Path Example</p>
                        </th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr class="">
                        <td data-label="Data Mapper Turbo Extract JSON Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d57908e408 ">
                          <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="os_dataraptor_turbo_action_11856__codeblock_pdz_z4s_jcc"><a name="os_dataraptor_turbo_action_11856__codeblock_pdz_z4s_jcc"><!-- --></a><code>{
  "Account": [
    {
      "RecordTypeId": "0125w000001NgyvAAC",
      "Phone": "5105551223",
      "Name": "Aileen Lee",
      "Id": "0015w00002D8iCAAAZ"
    }
  ]
}</code></pre>
                        </td>

                        <td data-label="Response JSON Path Example" class="slds-cell-wrap" style="vertical-align:top;" headers="d57908e414 ">
                          <p style="margin-bottom:0;">
                            <kbd>Account|1</kbd>
                          </p>
                        </td>

                      </tr>
                    </tbody>
                  </table>
    2. To ensure the object isn't nested, enter VlocityNoRootNode in the Response JSON Node field.
        
        See [Manipulate JSON with the Send/Response Transformations Properties](https://help.salesforce.com/s/articleView?id=xcloud.os_manipulate_json_with_the_send_response_transformations_properties_22367.htm&release=264.0.0&type=5 "Specify and transform the input and output JSON of Omniscripts or Integration Procedures with the Send and Response Transformation properties. The Send properties transform the input; the Response properties transform the output.").