# Data Transformation

Data transformation tasks reshape, query, and convert data as it flows through a workflow.

## JSONata Transform

Transforms JSON data using [JSONata](https://jsonata.org/), a powerful expression language for querying and reshaping JSON.

<figure><img src="/files/Rz78cqjZTsFXVEDJFdbi" alt=""><figcaption></figcaption></figure>

| Field          | Description                                                                      |
| -------------- | -------------------------------------------------------------------------------- |
| **Expression** | The transformation to apply to the incoming data                                 |
| **Edit**       | Opens a full editor with live preview                                            |
| **AI**         | Generate an expression from a plain-English description and example input/output |

The incoming data is available as `$states.input`. Example — combine two fields and sum an array:

```jsonata
{
  "fullName": $states.input.firstName & " " & $states.input.lastName,
  "total": $sum($states.input.items.price)
}
```

## JS Executor

Runs custom JavaScript logic in a sandboxed environment. Use this when JSONata is insufficient — for example, complex string manipulation, date calculations, or multi-step logic.

<figure><img src="/files/9SXJax1Gwna0v1a7N23a" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
The sandbox is fully isolated: **no network access, no filesystem writes, no environment variables**. It can only transform the data you pass in.
{% endhint %}

## XSLT Transform

Accepts XML input, applies an XSLT stylesheet, and produces XML output. Use this for XML-to-XML transformations where the structure needs to change between systems.

<figure><img src="/files/Vab15oGt8qUPdhA5aXU2" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.tillit.cloud/tillit/knowledge-base/setting-up-tillit/integrations/wire-flow/task-types-and-integrations/data-transformation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
