---
sourceDocument: Brazil Build workflows
sourceDocumentLink: https://www.servicenow.com/docs/r/build-workflows

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Build workflows

ft:clusterId :

    - crworkflow

bundleId :

    - crworkflow

workflow :

    - Creator


---

# Map and Transform Data step

# Map and Transform Data step {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Map and Transform Data step

The Map and Transform Data step in Workflow Studio enables you to map complex nested JSON objects to a target schema with dynamic field creation and data transformation capabilities.
It supports multi-level nested objects and arrays, allowing flexible data restructuring within ServiceNow flows.
Show full answer Show less  
This step is available as a core action in Workflow Studio and can be used by users with the **flowdesigner** or **admin** roles. It facilitates transforming input JSON data into a structured output object tailored to your process needs.

## Inputs

* **Source:** Accepts a nested JSON object as input, which can include multiple levels of nested objects and arrays. You select or drag-and-drop the JSON data pill representing the source data.
* **Target:** Defines the output object structure. You specify a root label for the output object and add fields to map source data elements. Multiple source fields can be combined or transformed into a single target field.
* **Scripted Fields:** Optional JavaScript-based custom transformations. You can create script objects to manipulate and transform source fields programmatically within the step.

## Outputs

* **Target Object:** The transformed JSON object structured according to the target schema you configured, including any combined or scripted field transformations.
* **Step Status:** Provides execution details such as success or failure indicators and error messages if errors occur during the transformation process.

## Practical Use Case Example

For instance, when processing nested user data containing fields like name, age, and email (which itself is an object), you can flatten and combine fields into a simplified target object. By setting the root label (e.g., "Root") and defining target fields that combine multiple source fields (e.g., combining name and age), the step outputs a clean, transformed object ready for subsequent flow actions such as creating or updating records.

## Benefits for ServiceNow Customers

* Enables flexible data mapping and transformation within flows without external scripting or integration.
* Supports complex nested JSON structures common in ServiceNow integrations and internal data handling.
* Facilitates combining multiple source fields into single target fields and applying custom JavaScript transformations for advanced use cases.
* Provides clear status feedback after execution to monitor success and troubleshoot errors effectively.  
Map complex nested JSON objects to a target schema with dynamic field creation and data transformation.

## Roles and availability {#map-transform-data-action__section_roles_availability}

Available as a Workflow Studio core action. Users with the flow_designer or admin role can add an action to a flow and define configuration details.

## Inputs {#map-transform-data-action__section_inputs}

Provide a value for each input that your flow needs. To add dynamic values, you can drag pills from the Data panel or select them from the pill picker.
{#map-transform-data-action__table_inputs__entry__2}

| Field | Description |
|-|-|
| Source Data | Data type: JSON Object. The nested JSON object to map and transform. Drag-and-drop a JSON data pill or use the data pill picker to select the source object. The source can include multiple levels of nested objects and arrays. |
| Target | Data type: Object. The output structure for the transformed data. Select Add field to display options to create a target field and configure its mapping. The root label of the target defines the name of the output object. For example, to map a nested person object to user fields, set the root label to "user" and add fields for each element. You can map multiple source fields to a single target field to combine or transform data. |
| Scripted Fields | Data type: Script Objects. Optional custom transformations using JavaScript. Select Add scripted field to create a script object, define its name, select which source fields it uses, and write JavaScript code to perform transformations on those fields. |
[ ]

{#map-transform-data-action__table_inputs}

## Outputs {#map-transform-data-action__section_outputs}

These outputs appear in the Data panel. You can use them as inputs elsewhere in your flow.
{#map-transform-data-action__table_outputs__entry__2}

| Field | Description |
|-|-|
| Target Object | Data type: Object. The transformed JSON object containing all mapped target fields with values from the source data and scripted field transformations. The object is named based on the target root label you configured. |
| Step Status | Data type: Object. Status information about the step execution, including success or failure indicators and error messages if any errors occurred during the transformation. |
[ ]

{#map-transform-data-action__table_outputs}

## Example: Transform and flatten user data with field combinations {#map-transform-data-action__section_example}

In this example, a flow receives nested user data with a mix of simple and complex fields. The Map and Transform Data step transforms and combines source fields to create a simplified target structure.

The source data is a user object with the following structure:{#map-transform-data-action__map-transform-data-action-example-2}

* user (object)
* name (string)
* age (string)
* email (object)
  * address (string)
  * type (string)

The step configuration sets the target root label to "Root" and creates target fields that include field combinations:{#map-transform-data-action__map-transform-data-action-example-3}

* name_age (combines name and age fields into a single target field)
* test (also combines name and age fields for a different purpose)
* name_name (maps the name field)
* age (maps the age field)
* email (nested object containing address and type fields)

The mapped source fields column shows the data pills for each mapping. For example, the name_age field displays data pills showing both "name" and "age" selections. The transformation
shows actual mapped values in real-time.{#map-transform-data-action__map-transform-data-action-example-4}

After the action runs, the Root output object contains all transformed fields with values combined and mapped. The Step Status output provides execution details. The transformed user
data is ready for use in subsequent actions such as creating or updating user records.{#map-transform-data-action__map-transform-data-action-example-5}

