Skip to main content

Mapping Node

The Mapping Node transforms data as it flows through your workflow. Use it to combine fields, format values, restructure objects, or prepare data for external systems.
The Mapping Node is the most commonly used node for data manipulation. It uses JSONata, a lightweight query and transformation language for JSON.

Overview

Use a Mapping Node when you need to:
  • Combine fields (e.g., first name + last name → full name)
  • Reformat dates, numbers, or strings
  • Restructure data for an API’s expected format
  • Extract values from nested objects
  • Add calculated fields
  • Filter or transform arrays

Configuration Interface

When you open a Mapping Node, you’ll see two panels:

Left Panel: Expression Editor

The expression editor has four sections:
1

Sample Context (Top)

Paste sample JSON data to test your transformation. This simulates what the node will receive at runtime.
2

JSONata Expression (Middle)

Write your transformation logic using JSONata syntax.
3

Output (Bottom)

See the real-time result of applying your expression to the sample context.
4

Merge Toggle (Bottom Left)

Control whether the output merges with or replaces existing context.

Writing Transformations

Basic Example

Input context:
JSONata expression:
Output:
With Merge ON, the original fields (firstName, lastName, policyNumber) are preserved and new fields are added.

JSONata Syntax

JSONata is a powerful expression language. Here are the most common operations:

Accessing Data

String Operations

Date Operations

Conditional Logic

Working with Arrays

For complete JSONata documentation, visit jsonata.org.

The Merge Toggle

The Merge toggle is critical—it controls how your transformation output is applied to the workflow context.
Keep Merge ON unless you specifically need to replace the entire context. Turning it off will remove tenantId, environment, and other critical properties.

Saving Your Work

Two-Step Save Required!When configuring a Mapping Node, you must click Save twice:
  1. First Save: Click Save in the Expression Editor (left panel) to close the dialog
  2. Second Save: Click Save in the Node Settings (right panel) to commit changes
If you only save once and click away, you will lose your changes. This is a common mistake!

Insurance Examples

Format Claim Data for Snapsheet

Input:
Expression:
Output:

Normalize Phone Numbers

Input:
Expression:
Output:

Calculate Claim Priority

Input:
Expression:
Output:

Extract Data from Nested Objects

Input:
Expression:
Output:

Multiple Transformations

You can add multiple transformations to a single Mapping Node:
  1. Click + Add mapping transformation
  2. Write your first expression and save
  3. Click + Add mapping transformation again
  4. Write additional expressions
Each transformation runs in sequence, and each can access data added by previous transformations.

Best Practices

Test with Realistic Data

Always paste sample data that represents what your workflow will actually receive. This catches issues before deployment.

Keep Transformations Focused

Do one logical transformation per Mapping Node. This makes debugging easier:

Use Descriptive Titles

Name your Mapping Nodes clearly:

Handle Missing Data

Use the conditional operator to handle null values:

Common Issues

Expression Returns Nothing

Symptom: Output is empty or undefined. Fix: Check that field names match exactly (case-sensitive). Use the Sample Context to verify your data structure.

Lost System Properties

Symptom: tenantId or environment is missing after the Mapping Node. Fix: Ensure Merge is toggled ON (blue).

Changes Not Saved

Symptom: Expression reverts to previous version. Fix: Remember the two-step save—Save in the expression editor, then Save in the node settings panel.

Date Formatting Issues

Symptom: Date appears in wrong format. Fix: Use $fromMillis() with proper format string:

Next Steps

Task Node

Send transformed data to external systems

AI Prompt Node

Parse unstructured text before mapping

Code Node

Use JavaScript/Python for complex logic

Context Deep Dive

Understand how data flows through workflows