> For the complete documentation index, see [llms.txt](https://help.tillit.cloud/tillit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.tillit.cloud/tillit/knowledge-base/setting-up-tillit/integrations/wire-flow/task-types-and-integrations/data-transformation.md).

# 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>
