Data Transformers

Last modified: May 28, 2026

Introduction

Data Transformer documents transform data from one structure into another structure. In practice, this is a message-to-message transformation within Studio Pro.

You can use this feature to pre-process an incoming message (for example, from an API response or MQTT message) before an import mapping. You can also use it to transform a message before passing it on to a downstream system that expects the data in a specific structure.

Prerequisites

Limitations

Data transformers currently have the following limitations:

  • Only JSON-to-JSON transformation with JSLT (a JSON transformation language) is supported

Usage Example

Consider an API that returns customer data with many fields, but you only need a few specific fields for your Mendix app:

Input JSON from API:

{
  "customer_id": "12345",
  "first_name": "John",
  "last_name": "Smith",
  "email": "john.smith@example.com",
  "phone": "+1-555-0123",
  "address": "123 Main St",
  "city": "New York",
  "country": "USA",
  "account_status": "active",
  "credit_limit": 5000,
  "internal_notes": "VIP customer",
  "created_date": "2024-01-15"
}

JSLT Transformation:

{
  "id": .customer_id,
  "fullName": .first_name + " " + .last_name,
  "email": .email,
  "location": .city + ", " + .country
}

Output JSON:

{
  "id": "12345",
  "fullName": "John Smith",
  "email": "john.smith@example.com",
  "location": "New York, USA"
}

In this example, the data transformer extracts only the required fields, combines the first and last name into a single field, and creates a location string from the city and country. This simplified output can then be easily mapped to your Mendix entities.

Add the Data Transformer Document

To add a data transformer document to your app, follow these steps:

  1. Right-click the module you want to add the data transformer document to.

  2. Select Add other > Data Transformer.

  3. Name the data transformer:

    Add Data Transformer dialog
  4. In the Input JSON editor, paste a JSON snippet that you want to transform.

  5. Define the transformation in the JSLT transformation editor.

  6. Click Test Transformation below the JSLT transformation editor to preview the transformation result in Output JSON:

    Data Transformer interface showing Input JSON, JSLT transformation, and Output JSON editors

Use the Data Transformer in a Microflow

To perform a transformation in a microflow, complete the following steps:

  1. Drag the Transform JSON activity into a microflow, preferably after a REST call or anything that provides input for the transformation:

    Add Transform JSON activity
  2. Double-click the activity and click Select to choose an existing data transformer document or to create a new one.

  3. Click the Variable (String) drop-down and select the input string variable from the list.

  4. Specify the name of the output in the Variable name text field.

  5. Click OK:

    Configure Transform JSON activity dialog

Data Transformer Output Uses

You can use your transformed JSON snippet in the following ways:

  • Create a new JSON structure for import mapping
  • Pass the transformed JSON to downstream systems
  • Use it as input for further processing in a microflow

Use Cases

You can use Data Transformer documents for the following use cases:

Read More