# Functions / Transformations

### Overview

Transformation functions in JENTIS allow you to process and modify data before it is sent to a destination (e.g., analytics tools, marketing platforms). These functions take a **single input** and return a **transformed output** — both of type `String`.

### How to Create a Custom Function

Creating a custom transformation is simple. All you need is a **JavaScript function** that:

* Accepts **one input parameter** of type `String`
* Returns an **output value** of type `String`

#### Example:

```javascript
function myTransformation(input) {
  return input.toLowerCase();
}
```

This function would take a string (e.g., `"MyValue"`) and return it in lowercase (`"myvalue"`).

### Common Use Cases

Transformation functions can be used for a wide range of purposes, such as:

* Converting strings to lowercase
* Removing all whitespace from a string
* Filtering out disallowed URL parameters
* Matching and transforming values based on a specific syntax or pattern

These transformations are especially useful for data cleaning, formatting, or standardization before sending the data to third-party tools.

### Built-In Functions: Anonymization & Pseudonymization

The JENTIS system provides built-in support for **Anonymization** and **Pseudonymization** functions, which can be directly applied in the **Tag Edit View**.

* [**Anonymization**](/developer-guide/functions-transformations/anonymization-and-pseudonymization.md)**:** Generates a random output each time, preventing traceability.
* [**Pseudonymization**](/developer-guide/functions-transformations/anonymization-and-pseudonymization.md)**:** Generates a consistent but obfuscated output per tool, ensuring format similarity while preserving privacy.

To learn more about these privacy-focused transformations, see the [#built-in-functions-anonymization-and-pseudonymization](#built-in-functions-anonymization-and-pseudonymization "mention") Guide.


---

# 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://docs.jentis.com/developer-guide/functions-transformations.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.
