> For the complete documentation index, see [llms.txt](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/features/lifecycle-management/transformers/transformer-reference.md). Agents can also search and read this documentation through its [MCP server](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/~gitbook/mcp).

# Transformer Reference

Reference guide for supported transformation functions and parameters for attribute transformers

This page includes a comprehensive list of all supported transformer functions and parameters. Some commonly used transformation functions include:

* Replacing a character with a different one
* Removing domains from email addresses
* Transforming to upper, lower, title, sentence, camel, or snake case
* Using a substring from the original value

See [Attribute Sync and Transformers](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/features/lifecycle-management/transformers.md) for configuration details, or [Understanding Conditions and Transformers](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/features/lifecycle-management/policies-workflows/conditions-and-transformers-overview.md#terminology) for terminology definitions.

{% hint style="info" %}
A subset of these functions is also supported in **identity mapping template expressions**. See [Identity Mapping Templates](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/configuration/identity-mapping-templates.md#transformation-functions) for the supported list.
{% endhint %}

## Reading the Examples

Each transformer below includes three types of examples:

1. **Basic Usage**: Shows the transformer used alone with a simple source attribute
2. **In a Pipeline**: Demonstrates chaining multiple transformers together
3. **Example**: Provides practical context from Lifecycle Management scenarios

Copy-paste these examples directly into your attribute transformer configuration, adjusting attribute names to match your source of identity.

<details>

<summary>APPEND</summary>

### APPEND

This transformer enables string concatenation by appending text to the end of attribute values during identity provisioning workflows.

**Parameter Format**

Characters (STRING, required)

**Basic Usage**

* Destination Attribute: `email`
* Formatter: `{username}`
* Then Apply: `| APPEND, "@company.com"`
* Result: If `username` = `john.smith`, output is `john.smith@company.com`

**In a Pipeline**

* Destination Attribute: `display_name`
* Formatter: `{first_name}`
* Then Apply: `| APPEND, " " | APPEND, "{last_name}"`
* Result: If `first_name` = `John` and `last_name` = `Smith`, output is `John Smith`

**Example**

* Destination Attribute: `user_principal_name`
* Formatter: `{first_name}.{last_name}`
* Then Apply: `| LOWER | APPEND, "@contoso.com"`
* Use case: Generate standardized email addresses for Azure AD user provisioning

</details>

<details>

<summary>ASCII</summary>

### ASCII

Removes non-printable characters and replaces non-ASCII characters with their closest ASCII equivalents. Particularly useful for Active Directory sAMAccountName and other legacy systems with strict character requirements.

Note: The ASCII transformer performs operations on the base level, not the extended set.

**Parameter Format**

None (no parameters required)

**Basic Usage**

* Destination Attribute: `username`
* Formatter: `{first_name}`
* Then Apply: `| ASCII`
* Result: If `first_name` = `Łukasz`, output is `Lukasz`

**In a Pipeline**

* Destination Attribute: `login_name`
* Formatter: `{first_name}.{last_name}`
* Then Apply: `| ASCII | LOWER | REMOVE_WHITESPACE`
* Result: If `first_name` = `José María`, `last_name` = `García`, output is `josemaria.garcia`

**Example**

* Destination Attribute: `sAMAccountName`
* Formatter: `{first_name}`
* Then Apply: `| ASCII | SUB_STRING, 0, 1 | LOWER`
* Use case: Generate Active Directory account names that comply with character restrictions while handling international names (converts "Łukasz" to "l")

</details>

<details>

<summary>ASSUME_TIME_ZONE</summary>

### ASSUME\_TIME\_ZONE

Interprets the incoming time string as if it were in the specified time zone, then converts it to a UTC time. (example: if the input is "1/2/2025 11pm" and the defined time zone is `America/Los_Angeles` the function will treat "1/2/2025 11pm" as local time in Los Angeles and output the corresponding UTC time "1/3/2025 7am")

**Parameter Format**

String - Time Zone String (Optional) - Format

**Usage Example**

Input:

`{activation_date | ASSUME_TIME_ZONE, "America/Los_Angeles"}`

`{activation_date | ASSUME_TIME_ZONE, "America/Los_Angeles", "RFC3339"}`

`{activation_date | ASSUME_TIME_ZONE, "-07:00"}`

`{activation_date | ASSUME_TIME_ZONE, "-07:00", "RFC3339"}`

</details>

<details>

<summary>COUNTRY_CODE_ISO3166</summary>

### COUNTRY\_CODE\_ISO3166

Transforms country code to ISO 3166 format.

[ISO 3166](https://www.iso.org/iso-3166-country-codes.html) defines codes for the representation of country names, dependent territories, and their subdivisions

**Parameter Format**

Format (STRING, optional): \[alpha2, alpha3, numeric], defaults to alpha2

**Usage Example**

Input:

`{"US" | COUNTRY_CODE_ISO3166, "alpha3"}`

Output:

`USA`

</details>

<details>

<summary>DATE_ADJUST</summary>

### DATE\_ADJUST

Adjusts date values based on hour, day, month, and year inputs. Provides full control over all time components for complex date manipulation.

**Parameter Format**

| Parameter | Type    | Required | Description                                                                                                                                             |
| --------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Hours     | INTEGER | Yes      | Number of hours to add (use negative values to subtract)                                                                                                |
| Days      | INTEGER | No       | Number of days to add                                                                                                                                   |
| Months    | INTEGER | No       | Number of months to add                                                                                                                                 |
| Years     | INTEGER | No       | Number of years to add                                                                                                                                  |
| Format    | STRING  | No       | Date format used to parse the input value and to format the output. If omitted, Veza detects the input format automatically and uses it for the output. |

**Usage Example**

Input:

`{activation_date | DATE_ADJUST, +1, 2, 3, -1}`

Adjusts the date by adding 1 hour, 2 days, 3 months, and subtracting 1 year.

`{activation_date | DATE_ADJUST, +1, 2, 3, -1, "RFC3339"}`

`{activation_date | DATE_ADJUST, +1, 2, 3, -1, "2006-01-02T15:04:05Z07:00"}`

**Example**

If the input date is `2021-01-01 00:00:00` and you apply `DATE_ADJUST, +1, 2, 3, -1`, the output is `2020-04-03 01:00:00` (added 1 hour, 2 days, 3 months, subtracted 1 year).

</details>

<details>

<summary>DATE_ADJUST_DAY</summary>

### DATE\_ADJUST\_DAY

A convenience transformer that adjusts date values by a specified number of days only. Use this for simple day-based calculations; use `DATE_ADJUST` for more complex adjustments involving hours, months, or years.

**Parameter Format**

| Parameter | Type    | Required | Description                                                                                                                                             |
| --------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Days      | INTEGER | Yes      | Number of days to add (use negative values to subtract)                                                                                                 |
| Format    | STRING  | No       | Date format used to parse the input value and to format the output. If omitted, Veza detects the input format automatically and uses it for the output. |

**Usage Example**

Input:

`{activation_date | DATE_ADJUST_DAY, +1}`

Adds 1 day to the activation date.

`{activation_date | DATE_ADJUST_DAY, +1, "RFC3339"}`

`{activation_date | DATE_ADJUST_DAY, +1, "2006-01-02T15:04:05Z07:00"}`

**Example**

If the input date is `2021-01-01 00:00:00` and you apply `DATE_ADJUST_DAY, +1`, the output is `2021-01-02 00:00:00`.

</details>

## DATE\_FORMAT

**Description:** Converts a timestamp to a formatted date string using Go time layout syntax.

**Syntax:** `{attribute | DATE_FORMAT, "layout"}` or `{attribute | DATE_FORMAT, "output_layout", "input_layout"}`

**Parameters:**

| Parameter     | Required | Type   | Description                                             |
| ------------- | -------- | ------ | ------------------------------------------------------- |
| layout        | Yes      | String | Go time format layout or named alias (see tables below) |
| input\_layout | No       | String | Format of the input data (if non-standard)              |

**Returns:** String — the formatted date/time string

**Examples:**

| Input                  | Expression                                                | Output         |
| ---------------------- | --------------------------------------------------------- | -------------- |
| `2024-03-15T14:30:00Z` | `{hire_date \| DATE_FORMAT, "2006-01-02"}`                | `2024-03-15`   |
| `2024-03-15T14:30:00Z` | `{hire_date \| DATE_FORMAT, "01/02/2006"}`                | `03/15/2024`   |
| `2024-03-15T14:30:00Z` | `{hire_date \| DATE_FORMAT, "Jan 2, 2006"}`               | `Mar 15, 2024` |
| `2024-03-15T14:30:00Z` | `{hire_date \| DATE_FORMAT, "dateonly"}`                  | `2024-03-15`   |
| `03-15-2024`           | `{start_date \| DATE_FORMAT, "2006-01-02", "01-02-2006"}` | `2024-03-15`   |

{% hint style="warning" %}
**Go Time Layout Syntax**: Unlike most date formatting systems that use patterns like `YYYY-MM-DD`, Go uses a reference date: **Mon Jan 2 15:04:05 MST 2006**. Each component of this specific date represents a format element.
{% endhint %}

### Go date format reference

The reference date `Mon Jan 2 15:04:05 MST 2006` breaks down as:

| Component | Reference Value | Meaning                        |
| --------- | --------------- | ------------------------------ |
| Year      | `2006`          | 4-digit year                   |
| Year      | `06`            | 2-digit year                   |
| Month     | `01`            | 2-digit month (01-12)          |
| Month     | `1`             | 1 or 2-digit month (1-12)      |
| Month     | `Jan`           | 3-letter abbreviation          |
| Month     | `January`       | Full month name                |
| Day       | `02`            | 2-digit day (01-31)            |
| Day       | `2`             | 1 or 2-digit day (1-31)        |
| Day       | `_2`            | Space-padded day               |
| Hour      | `15`            | 24-hour format (00-23)         |
| Hour      | `03` or `3`     | 12-hour format (01-12 or 1-12) |
| Minute    | `04`            | Minutes (00-59)                |
| Second    | `05`            | Seconds (00-59)                |
| AM/PM     | `PM`            | Uppercase form                 |
| AM/PM     | `pm`            | Lowercase form                 |
| Time zone | `MST`           | Time zone abbreviation         |
| Time zone | `-0700`         | Numeric offset                 |
| Time zone | `Z0700`         | Z for UTC, offset otherwise    |

### Common format patterns

| Output Format      | Go Layout String            | Example Output              |
| ------------------ | --------------------------- | --------------------------- |
| ISO 8601 / RFC3339 | `2006-01-02T15:04:05Z07:00` | `2023-03-15T14:30:25-07:00` |
| US date            | `01/02/2006`                | `03/15/2023`                |
| European date      | `02/01/2006`                | `15/03/2023`                |
| LDAP/AD format     | `20060102150405Z`           | `20230315143025Z`           |
| Human readable     | `Jan 2, 2006`               | `Mar 15, 2023`              |
| Date only          | `2006-01-02`                | `2023-03-15`                |

### Named format aliases

Instead of Go layout strings, you can use these named aliases (case-insensitive):

| Alias      | Equivalent Layout           | Example Output              |
| ---------- | --------------------------- | --------------------------- |
| `dateonly` | `2006-01-02`                | `2023-03-15`                |
| `timeonly` | `15:04:05`                  | `14:30:25`                  |
| `datetime` | `2006-01-02 15:04:05`       | `2023-03-15 14:30:25`       |
| `rfc3339`  | `2006-01-02T15:04:05Z07:00` | `2023-03-15T14:30:25-07:00` |
| `win32`    | Active Directory FILETIME   | `133234218250000000`        |

For the full list of named aliases (including `kitchen`, `rfc822`, `rfc1123`, `stamp`, and others), see Go's standard [time package constants](https://pkg.go.dev/time#pkg-constants).

{% hint style="info" %}
The `win32` format outputs the Windows FILETIME format used by Active Directory for attributes like `accountExpires`. This represents 100-nanosecond intervals since January 1, 1601 UTC.
{% endhint %}

**Notes:**

* Input must be a valid timestamp
* Use with [ASSUME\_TIME\_ZONE](#assume-time-zone) or [UTC\_TO\_TIME\_ZONE](#utc-to-time-zone) for time zone handling
* When parsing non-standard input dates, provide both output and input layouts

<details>

<summary>FIRST_N</summary>

### FIRST\_N

Picks the first N characters of a string. Useful for creating shortened identifiers or initials.

**Parameter Format**

Length (NUMBER, required): Number of characters to return

**Basic Usage**

* Destination Attribute: `initial`
* Formatter: `{first_name}`
* Then Apply: `| FIRST_N, 1`
* Result: If `first_name` = `John`, output is `J`

**In a Pipeline**

* Destination Attribute: `username`
* Formatter: `{first_name}.{last_name}`
* Then Apply: `| FIRST_N, 1 | LOWER`
* Result: If `first_name` = `John`, output is `j`

**Example**

* Destination Attribute: `username`
* Formatter: `{first_name}`
* Then Apply: `| FIRST_N, 1 | LOWER`
* Use case: Create abbreviated usernames in the format `j.smith` by combining the first initial with `{last_name}`

</details>

<details>

<summary>FOR_EACH</summary>

### FOR\_EACH

Iterates over the entities of one entity type that the evaluation holds and returns a value for each entity, joined into a single string. For each entity, `FOR_EACH` returns either one attribute or the result of an expression evaluated against that entity's attributes.

`FOR_EACH` does not use an input value, so the formatter begins with a pipe: `{| FOR_EACH, "EntityType", "attribute"}`.

**Parameter Format**

| Parameter           | Type   | Required | Description                                                                                                                                                   |
| ------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| EntityType          | STRING | Yes      | The entity type to iterate over, such as `AwsIamPolicy`. The value must match the entity type name exactly.                                                   |
| AttributeExpression | STRING | Yes      | An attribute name, such as `name`, or an expression to evaluate for each entity, such as `\{name\}: \{description\}`. Attribute names are not case-sensitive. |
| MaxCount            | NUMBER | No       | The maximum number of entities to include. `0` includes all entities.                                                                                         |
| Separator           | STRING | No       | The characters that join the results. The default is a comma followed by a space (`,` ). An empty string (`""`) joins the results with no separator.          |

To set `Separator` without a limit, enter `0` for `MaxCount`. `MaxCount` must be a number, so an empty value (`""`) is not accepted in that position.

**How It Works**

1. `FOR_EACH` finds the entities of type `EntityType` that the evaluation already holds. It does not query the Access Graph or follow relationships
2. If `AttributeExpression` is a single attribute name (no braces and no spaces), `FOR_EACH` returns that attribute from each entity. Otherwise, it evaluates `AttributeExpression` as an expression for each entity
3. If `MaxCount` is greater than `0`, `FOR_EACH` includes only the first `MaxCount` entities, in the order in which Veza reads them
4. `FOR_EACH` joins the results with `Separator`

**Entities Available in Lifecycle Management**

In a Provisioning Policy, `FOR_EACH` can iterate over these entities:

* The identity's entity from the primary source of identity
* One entity for each secondary source of identity that the identity has
* Entities that earlier actions in the same workflow run returned, including every entity that a [Get Node From Graph](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/features/lifecycle-management/policies-workflows/actions/get-node-from-graph.md) action retrieved

Veza does not load an identity's related entities, such as its groups or policies, automatically. To iterate over several entities of one type, add a **Get Node From Graph** action earlier in the workflow. In a condition, `FOR_EACH` sees at most one entity of each type.

**Escaping Braces in an Expression**

When `AttributeExpression` references attributes, escape each brace with a backslash: write `\{name\}` instead of `{name}`. `FOR_EACH` removes the backslashes and then evaluates the expression against each entity.

{% hint style="warning" %}
Without the escapes, the formatter resolves `{name}` against the identity before `FOR_EACH` runs, so every result has the identity's own value. For example, `{| FOR_EACH, "OktaGroup", "{name}"}` for an identity whose `name` is `Alice`, with two available `OktaGroup` entities, returns `{Alice}, {Alice}` instead of the group names.
{% endhint %}

**Special Behaviors**

| Scenario                                         | Behavior                                                                                                                                        |
| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| No entities of type `EntityType` are available   | Returns empty string `""` (no error)                                                                                                            |
| Attribute missing on an entity                   | That entity's result is the unresolved placeholder. For example, `arn1, {arn}, arn3`                                                            |
| Number attribute values                          | Returned as text. For example, `42, 100`                                                                                                        |
| Result ordering                                  | Results follow the order in which Veza reads the entities. Veza does not sort the results, so do not rely on which entities `MaxCount` includes |
| Expression fails for any entity                  | Returns the error `FOR_EACH failed to execute transformer for entity type <EntityType>`                                                         |
| `EntityType` or `AttributeExpression` is missing | Returns an error that required parameters are missing                                                                                           |
| `EntityType` or `AttributeExpression` is empty   | Returns an error that names the empty parameter                                                                                                 |
| `MaxCount` is not a number or is negative        | Returns an error                                                                                                                                |

{% hint style="warning" %}
`FOR_EACH` keeps an unresolved placeholder, such as `{arn}`, for each entity that is missing the attribute, and the placeholder text becomes part of the synced value. `FROM_MANY_ENTITIES_ATTRIBUTE` skips those entities instead. Test the formatter against entities that might lack the attribute.
{% endhint %}

**Usage Examples**

The examples assume that an earlier Get Node From Graph action in the workflow retrieved the entities.

*Example 1: Join one attribute from each entity*

```
{| FOR_EACH, "AwsIamPolicy", "name"}
```

* Available entities: three `AwsIamPolicy` entities named `AdminAccess`, `PowerUser`, and `ReadOnly`
* Returns: `AdminAccess, PowerUser, ReadOnly`

*Example 2: Limit the number of results*

```
{| FOR_EACH, "AwsIamPolicy", "name", 2}
```

* Available entities: four `AwsIamPolicy` entities named `Policy1` through `Policy4`
* Returns: `Policy1, Policy2`

*Example 3: Combine two attributes from each entity*

```
{| FOR_EACH, "OktaGroup", "\{name\}: \{description\}"}
```

* Available entities: `OktaGroup` entities `Admin` (`Manages system`), `User` (`Regular user`), and `Guest` (`View only`)
* Returns: `Admin: Manages system, User: Regular user, Guest: View only`

*Example 4: Use a custom separator with no limit*

```
{| FOR_EACH, "AwsIamPolicy", "\{name\} - \{arn\}", 0, " | "}
```

* Available entities: `AwsIamPolicy` entities `Policy1` (`arn1`) and `Policy2` (`arn2`)
* Returns: `Policy1 - arn1 | Policy2 - arn2`

</details>

<details>

<summary>FROM_ENTITY_ATTRIBUTE</summary>

### FROM\_ENTITY\_ATTRIBUTE

Looks up an entity in the Veza graph by matching an attribute value, then returns a different attribute from that entity. This is useful for cross-referencing related entities, such as finding a manager's email from an employee ID.

{% hint style="info" %}
This transformer operates within attribute mappings. To query the Access Graph as a standalone workflow action — for example, to branch logic based on whether an entity exists — use the [Get Node From Graph](https://docs.veza.com/4yItIzMvkpAvMVFAamTf/features/lifecycle-management/policies-workflows/actions/get-node-from-graph.md) action type instead.
{% endhint %}

**Parameter Format**

| Parameter       | Type   | Required | Description                                                                                                                                                       |
| --------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| EntityType      | STRING | Yes      | The type of graph entity to search (e.g., `Employee`, `OktaUser`, `ActiveDirectoryUser`)                                                                          |
| SourceAttribute | STRING | Yes      | The attribute on the entity to match against the input value                                                                                                      |
| TargetAttribute | STRING | Yes      | The attribute to return from the matched entity. Use `id` or `type` for built-in entity properties.                                                               |
| DefaultValue    | STRING | No       | Value to return when the input is empty, no matching entity is found, or the matched entity lacks `TargetAttribute`. Not used when the Access Graph lookup fails. |

**How It Works**

1. The input value (before the `|`) is used as the search term
2. The transformer finds an entity of type `EntityType` where `SourceAttribute` equals the input value
3. It returns the `TargetAttribute` value from that entity
4. If no entity is found and `DefaultValue` is provided, the default is returned; otherwise an error occurs

**Special Behaviors**

| Scenario                            | Behavior                                                                      |
| ----------------------------------- | ----------------------------------------------------------------------------- |
| Empty input value                   | Returns `DefaultValue` if provided; otherwise an empty string `""` (no error) |
| Input wrapped in brackets `[value]` | Brackets are automatically stripped before lookup                             |
| TargetAttribute is `id`             | Returns the entity's unique graph ID                                          |
| TargetAttribute is `type`           | Returns the entity's type name                                                |
| No entity found, no default         | Returns error with details about the failed lookup                            |
| Target attribute missing on entity  | Returns error (unless default provided)                                       |
| Access Graph lookup fails           | Returns error; `DefaultValue` is not used                                     |

When this transformer returns an error, a trigger condition that uses it is treated as not matching, so the workflow skips the identity for that run. Veza does not retry the skipped identity or record a workflow failure. On the next extraction, the workflow runs for the identity if it now matches, unless the workflow runs only when specific or used properties change. In that case, the workflow runs only after one of those properties changes again. When the error is in a condition on an action, Veza skips only the actions under that condition. A dry run shows a warning such as "Trigger condition could not be evaluated for 1 identity, so it was treated as not matching."

{% hint style="info" %}
When used in sync workflows, this transformer checks previously computed values from the current job before querying the graph cache. This optimization prevents redundant lookups during batch operations.
{% endhint %}

**Usage Examples**

*Example 1: Get manager's name from employee ID*

```
{12345 | FROM_ENTITY_ATTRIBUTE, "Employee", "employee_id", "manager_name"}
```

* Input: `12345` (an employee ID)
* Finds: An `Employee` entity where `employee_id` = `12345`
* Returns: The `manager_name` attribute from that employee (e.g., `Jane Smith`)

*Example 2: Get department from email with a default value*

```
{john.doe@company.com | FROM_ENTITY_ATTRIBUTE, "OktaUser", "email", "department", "Unknown"}
```

* Input: `john.doe@company.com`
* Finds: An `OktaUser` entity where `email` = `john.doe@company.com`
* Returns: The `department` attribute, or `Unknown` if no user is found

*Example 3: Chain with other transformers*

```
{$workday.employee_id | FROM_ENTITY_ATTRIBUTE, "Employee", "id", "cost_center" | UPPER}
```

* Takes the employee ID from Workday
* Looks up the employee's cost center
* Converts the result to uppercase

*Example 4: Get entity's graph ID*

```
{john.smith | FROM_ENTITY_ATTRIBUTE, "OktaUser", "login", "id"}
```

* Looks up an OktaUser by login
* Returns the entity's unique graph ID (useful for subsequent lookups)

*Example 5: Return a readable fallback that survives a downstream SPLIT*

```
{email | FROM_ENTITY_ATTRIBUTE, "OAA.HRB.HRISEmployee", "email", "email" | FROM_ENTITY_ATTRIBUTE, "OAA.indigo.User", "email", "identity_unique_id", "::Account not found" | SPLIT, "::", 1}
```

* Resolves an HR email, looks up the matching user's `identity_unique_id`, then splits the result on `::` and keeps index `1`
* On a match: returns the portion of `identity_unique_id` after `::`
* On a miss: the `DefaultValue` (`::Account not found`) is passed through `SPLIT` too. Splitting `::Account not found` on `::` places `Account not found` at index `1`, so the fallback text is returned
* A plain default such as `"Account not found"` (no `::`) would be a single segment, so index `1` is out of range and [SPLIT](#split) returns an empty string

</details>

<details>

<summary>FROM_MANY_ENTITIES_ATTRIBUTE</summary>

### FROM\_MANY\_ENTITIES\_ATTRIBUTE

Looks up multiple entities in the Veza graph by matching an attribute value, then returns a specified attribute from all matching entities as a combined string. Use this when an input value may match multiple entities and you need all their values.

**Parameter Format**

| Parameter       | Type   | Required | Description                                                                                           |
| --------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------- |
| EntityType      | STRING | Yes      | The type of graph entity to search (e.g., `Employee`, `OktaUser`)                                     |
| SourceAttribute | STRING | Yes      | The attribute on entities to match against the input value                                            |
| TargetAttribute | STRING | Yes      | The attribute to return from all matched entities. Use `id` or `type` for built-in entity properties. |
| Separator       | STRING | No       | Character(s) to join multiple results (defaults to `,`)                                               |

**How It Works**

1. The input value (before the `|`) is used as the search term
2. The transformer finds ALL entities of type `EntityType` where `SourceAttribute` equals the input value
3. It collects the `TargetAttribute` value from each matched entity
4. Results are joined using the separator (comma by default)
5. If no entities are found, returns an empty string

**Special Behaviors**

| Scenario                                  | Behavior                                                                  |
| ----------------------------------------- | ------------------------------------------------------------------------- |
| Empty input value                         | Returns empty string `""` (no error)                                      |
| Input wrapped in brackets `[value]`       | Brackets are automatically stripped before lookup                         |
| No entities found                         | Returns empty string `""` (no error)                                      |
| Target attribute missing on some entities | Those entities are skipped (no error logged)                              |
| TargetAttribute is `id`                   | Returns the entity's unique graph ID                                      |
| TargetAttribute is `type`                 | Returns the entity's type name                                            |
| Result ordering                           | Results appear in graph discovery order (not guaranteed to be consistent) |

{% hint style="warning" %}
Unlike `FROM_ENTITY_ATTRIBUTE`, this transformer does not error when entities are missing the target attribute—it silently skips them. Verify that the results include all expected values. FOR\_EACH instead keeps an unresolved placeholder, such as `{arn}`, for each such entity. See [FOR\_EACH](#for_each).
{% endhint %}

**Usage Examples**

*Example 1: Get all group names for a user*

```
{john.doe@company.com | FROM_MANY_ENTITIES_ATTRIBUTE, "OktaGroup", "member_email", "name"}
```

* Input: `john.doe@company.com`
* Finds: All `OktaGroup` entities where `member_email` = `john.doe@company.com`
* Returns: `Engineering,Sales,All-Employees` (comma-separated group names)

*Example 2: Custom separator for multi-value attributes*

```
{12345 | FROM_MANY_ENTITIES_ATTRIBUTE, "Application", "owner_id", "app_name", ";"}
```

* Input: `12345` (an owner ID)
* Finds: All `Application` entities owned by this user
* Returns: `Slack;Salesforce;Jira` (semicolon-separated)

*Example 3: Get all entity IDs*

```
{Engineering | FROM_MANY_ENTITIES_ATTRIBUTE, "Employee", "department", "id"}
```

* Finds all employees in the Engineering department
* Returns their graph IDs as a comma-separated list

*Example 4: Get entity types*

```
{john.doe@company.com | FROM_MANY_ENTITIES_ATTRIBUTE, "Identity", "email", "type"}
```

* Looks up all identity nodes with the given email
* Returns their type names (e.g., `OktaUser,ActiveDirectoryUser,WorkdayWorker`)

</details>

<details>

<summary>IF_EMPTY</summary>

### IF\_EMPTY

Returns a default value when the input is an empty string, and passes any other value through unchanged. A value that contains only whitespace is not empty.

IF\_EMPTY does not apply when the source attribute is missing from the identity. In that case, IF\_EMPTY does not return the default, and Veza reports a missing-attribute warning. To also replace a missing attribute, use IF\_EMPTY\_OR\_MISSING.

**Parameter Format**

DefaultValue (STRING, required). An empty string is allowed.

**Basic Usage**

* Formatter: `{location_code}`
* Then Apply: `| IF_EMPTY, "US"`
* Result: If `location_code` is an empty string, output is `US`. If `location_code` = `UK`, output is `UK`

**Example**

* Destination Attribute: `displayName`
* Formatter: `{preferred_name}`
* Then Apply: `| IF_EMPTY, {first_name}`
* Result: If `preferred_name` is an empty string and `first_name` = `James`, output is `James`
* Use case: The default can reference another attribute, which is used only when `preferred_name` is an empty string

</details>

<details>

<summary>IF_EMPTY_OR_MISSING</summary>

### IF\_EMPTY\_OR\_MISSING

Returns a default value when the input is an empty string or when the source attribute is missing from the identity, and passes any other value through unchanged. A missing attribute does not raise a missing-attribute warning.

IF\_EMPTY\_OR\_MISSING applies wherever it appears in the pipeline, including after other functions.

| Source attribute   | IF\_EMPTY                                                        | IF\_EMPTY\_OR\_MISSING         |
| ------------------ | ---------------------------------------------------------------- | ------------------------------ |
| Has a value        | Value passed through                                             | Value passed through           |
| Is an empty string | Default value                                                    | Default value                  |
| Is missing         | Default not applied, and a missing-attribute warning is reported | Default value, with no warning |

**Parameter Format**

DefaultValue (STRING, required). An empty string is allowed.

**Basic Usage**

* Formatter: `{location_code}`
* Then Apply: `| IF_EMPTY_OR_MISSING, "US"`
* Result: If `location_code` is missing or an empty string, output is `US`

**In a Pipeline**

*Default before UPPER*

* Formatter: `{middle_name}`
* Then Apply: `| IF_EMPTY_OR_MISSING, "n/a" | UPPER`
* Result: If `middle_name` is missing, output is `N/A`. Functions after IF\_EMPTY\_OR\_MISSING apply to the default value

*Default after UPPER*

* Formatter: `{middle_name}`
* Then Apply: `| UPPER | IF_EMPTY_OR_MISSING, "n/a"`
* Result: If `middle_name` is missing, output is `n/a`

**Example**

* Destination Attribute: `title`
* Formatter: `{job_title}`
* Then Apply: `| IF_EMPTY_OR_MISSING, "Employee"`
* Result: If the identity has no `job_title`, output is `Employee`, and no missing-attribute warning is reported

</details>

<details>

<summary>JSON_EXTRACT</summary>

### JSON\_EXTRACT

Extracts a value from a JSON string, using a path in [GJSON path syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md).

**Parameter Format**

| Parameter | Type   | Required | Description                                                                                                      |
| --------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------- |
| Path      | STRING | Yes      | The path to the value to extract. Cannot be empty.                                                               |
| Separator | STRING | No       | Characters that join the values when the path matches an array (defaults to `", "`). An empty string is allowed. |

**Path Syntax**

| Path                  | Extracts                                                    |
| --------------------- | ----------------------------------------------------------- |
| `a.b`                 | The `b` field of the `a` object                             |
| `arr.0`               | The element at index `0` of the `arr` array                 |
| `arr.#.field`         | The `field` value of every element of the `arr` array       |
| `arr.#(k=="v").field` | The `field` value of the `arr` element where `k` equals `v` |

In a formatter, escape each double quotation mark inside the path with a backslash, for example `| JSON_EXTRACT, "arr.#(k==\"v\").field"`.

**Special Behaviors**

| Scenario                              | Behavior                                                                    |
| ------------------------------------- | --------------------------------------------------------------------------- |
| Value is a string, number, or boolean | Returned as text                                                            |
| Path matches an array                 | Values are joined with the separator. Nested arrays are flattened one level |
| Value is an object                    | Returned as JSON text                                                       |
| Path does not exist, or value is null | Returns empty string `""` (no error)                                        |
| Empty input value                     | Returns empty string `""` (no error)                                        |
| Input is not valid JSON               | Fails with `JSON_EXTRACT failed to parse JSON input`                        |

{% hint style="warning" %}
A path that does not exist returns an empty string, not an error, so a mistyped path can sync an empty value. Test the formatter with a sample value before using it in a workflow. To supply a fallback, follow JSON\_EXTRACT with IF\_EMPTY.
{% endhint %}

**Usage Examples**

*Example 1: Extract a field*

* Formatter: `{policy_document}`
* Then Apply: `| JSON_EXTRACT, "Version"`
* Result: If `policy_document` = `{"Version":"2012-10-17","Statement":[]}`, output is `2012-10-17`

*Example 2: Extract a nested field*

* Formatter: `{payload}`
* Then Apply: `| JSON_EXTRACT, "data.nested.value"`
* Result: If `payload` = `{"data":{"nested":{"value":"test"}}}`, output is `test`

*Example 3: Extract a field from every array element*

* Formatter: `{policy_document}`
* Then Apply: `| JSON_EXTRACT, "Statement.#.Action"`
* Result: If `policy_document` = `{"Statement":[{"Action":"s3:GetObject"},{"Action":"s3:PutObject"},{"Action":"s3:DeleteObject"}]}`, output is `s3:GetObject, s3:PutObject, s3:DeleteObject`

*Example 4: Use a custom separator*

* Formatter: `{payload}`
* Then Apply: `| JSON_EXTRACT, "users.#.name", " | "`
* Result: If `payload` = `{"users":[{"name":"Alice"},{"name":"Bob"}]}`, output is `Alice | Bob`

*Example 5: Filter array elements*

* Formatter: `{policy_document}`
* Then Apply: `| JSON_EXTRACT, "Statement.#(Effect==\"Allow\").Action"`
* Result: If `policy_document` = `{"Statement":[{"Effect":"Allow","Action":"s3:GetObject"},{"Effect":"Deny","Action":"s3:DeleteObject"}]}`, output is `s3:GetObject`

</details>

<details>

<summary>JSON_FORMAT</summary>

### JSON\_FORMAT

Formats a JSON string with line breaks and indentation.

**Parameter Format**

| Parameter  | Type   | Required | Description                                                                                                                |
| ---------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------- |
| IndentSize | NUMBER | No       | Number of spaces for each indentation level, from `0` to `10` (defaults to `2`)                                            |
| IndentChar | STRING | No       | `"space"` or `"tab"` (defaults to `"space"`). With `"tab"`, each level is indented with one tab, and IndentSize is ignored |

**Special Behaviors**

| Scenario                               | Behavior                                                                      |
| -------------------------------------- | ----------------------------------------------------------------------------- |
| Empty input value                      | Returns empty string `""` (no error)                                          |
| Input is not valid JSON                | Fails with an error that starts with `JSON_FORMAT failed to parse JSON input` |
| IndentSize outside `0` to `10`         | Fails with `JSON_FORMAT IndentSize must be between 0 and 10, got: <value>`    |
| IndentChar other than `space` or `tab` | Fails with `JSON_FORMAT IndentChar must be "space" or "tab", got: <value>`    |

**Basic Usage**

* Formatter: `{trust_policy}`
* Then Apply: `| JSON_FORMAT`
* Result: If `trust_policy` = `{"name":"test","nested":{"value":123}}`, output is:

  ```json
  {
    "name": "test",
    "nested": {
      "value": 123
    }
  }
  ```

**Custom Indentation**

*Four spaces*

* Then Apply: `| JSON_FORMAT, 4`
* Result: If the input is `{"name":"test","value":123}`, each level is indented with four spaces

*Tabs*

* Then Apply: `| JSON_FORMAT, 1, "tab"`
* Result: If the input is `{"name":"test"}`, each level is indented with one tab

</details>

<details>

<summary>LANGUAGE_RFC5646</summary>

### LANGUAGE\_RFC5646

Transforms language to RFC 5646 format.

[RFC 5646](https://registry-page.isdcf.com/languages/) defines "Tags for Identifying Languages." It does not contain a fixed, exhaustive list of language codes within the RFC itself. Instead, it specifies the structure and rules for constructing language tags, which are then built using codes from various external standards and registries.

**Parameter Format**

None (no parameters required)

**Usage Example**

Input:

`{"Spanish" | LANGUAGE_RFC5646}`

Output:

`es`

</details>

<details>

<summary>LAST_N</summary>

### LAST\_N

Picks the last N characters of a string, where N is the number of characters to return.

**Parameter Format**

Length (NUMBER, required)

**Usage Example**

Input:

`{"helloworld" | LAST_N, 5}`

Output:

`world`

</details>

<details>

<summary>LEFT_PAD</summary>

### LEFT\_PAD

Adds padding characters to the left side of a string until it reaches the specified length. Useful for creating fixed-width identifiers.

**Parameter Format**

Length (NUMBER, required): Target string length Pad (CHARACTER, optional): Character to use for padding (default is space)

**Basic Usage**

* Destination Attribute: `employee_id`
* Formatter: `{id}`
* Then Apply: `| LEFT_PAD, 5, "0"`
* Result: If `id` = `123`, output is `00123`

**In a Pipeline**

* Destination Attribute: `formatted_code`
* Formatter: `{cost_center}`
* Then Apply: `| TRIM_CHARS, "0" | LEFT_PAD, 6, "0"`
* Result: If `cost_center` = `001234`, output is `001234` (first removes then re-applies padding)

**Example**

* Destination Attribute: `employee_id`
* Formatter: `{employee_id}`
* Then Apply: `| REMOVE_CHARS, "#" | TRIM_CHARS, "0" | LEFT_PAD, 6, "0"`
* Use case: Standardize employee IDs to 6-digit format (converts "##001234##" to "001234")

</details>

<details>

<summary>LOOKUP</summary>

### LOOKUP

Transforms a value using a lookup table defined in your Provisioning Policy. Essential for mapping codes to descriptive values or standardizing data across systems.

**Parameter Format**

| Parameter          | Type   | Required | Description                                       |
| ------------------ | ------ | -------- | ------------------------------------------------- |
| TableName          | STRING | Yes      | Name or ID of the lookup table                    |
| ColumnName         | STRING | Yes      | Column to search for the input value              |
| ReturnColumnName   | STRING | Yes      | Column whose value to return                      |
| DefaultReturnValue | STRING | No       | Value to return when the input value is not found |

**How It Works**

1. The transformer first tries to match `TableName` against configured lookup table names
2. If no name match is found, `TableName` is treated as a table ID
3. The input value is searched in `ColumnName`
4. If found, the corresponding `ReturnColumnName` value is returned
5. If not found and `DefaultReturnValue` is provided, the default is returned
6. If not found and no default, an error is returned

{% hint style="warning" %}
**Table name matching is case-sensitive.** Ensure the table name in your transformer exactly matches the lookup table name defined in your policy, including capitalization.
{% endhint %}

**Special Behaviors**

| Scenario                                   | Behavior                                           |
| ------------------------------------------ | -------------------------------------------------- |
| Table name not found                       | Falls back to treating the parameter as a table ID |
| Value not found in table, default provided | Returns the default value                          |
| Value not found in table, no default       | Returns error with lookup details                  |
| Other lookup errors                        | Returns error with full context                    |

**Basic Usage**

* Destination Attribute: `city`
* Formatter: `{location_code}`
* Then Apply: `| LOOKUP, "locationTable", "location_code", "city"`
* Result: If `location_code` = `IL001` and locationTable contains that code, output is `Chicago`

**With Default Value**

* Destination Attribute: `region`
* Formatter: `{office_code}`
* Then Apply: `| LOOKUP, "regionTable", "code", "region_name", "Unknown Region"`
* Result: Returns mapped region name, or `Unknown Region` if code not in table

**In a Pipeline**

* Destination Attribute: `office_email_domain`
* Formatter: `{office_code}`
* Then Apply: `| LOOKUP, "officeTable", "code", "domain" | LOWER`
* Result: Looks up domain from table, then converts to lowercase

**Example**

* Destination Attribute: `office_location`
* Formatter: `{location}`
* Then Apply: `| LOOKUP, "locationTable", "location_code", "city"`
* Use case: Convert abbreviated location codes (like "IL001", "CA002") to full city names for user profiles, maintaining consistency across different source systems

</details>

## LOWER

**Description:** Converts all characters in a string to lowercase.

**Syntax:** `{attribute | LOWER}`

**Parameters:**

| Parameter | Required | Type | Description                       |
| --------- | -------- | ---- | --------------------------------- |
| (none)    | —        | —    | This function takes no parameters |

**Returns:** String — the input value with all characters converted to lowercase

**Examples:**

| Input                    | Expression              | Output                   |
| ------------------------ | ----------------------- | ------------------------ |
| `JOHN`                   | `{first_name \| LOWER}` | `john`                   |
| `John.Smith@Company.com` | `{email \| LOWER}`      | `john.smith@company.com` |
| `MixedCase123`           | `{code \| LOWER}`       | `mixedcase123`           |

**Notes:** Only affects alphabetic characters. Numbers and special characters pass through unchanged.

<details>

<summary>LOWER_SNAKE_CASE</summary>

### LOWER\_SNAKE\_CASE

Transforms string to lowercase with underscores.

**Parameter Format**

None (no parameters required)

**Usage Example**

Input:

`{"Hello World" | LOWER_SNAKE_CASE}`

Output:

`hello_world`

</details>

<details>

<summary>LOWER_CAMEL_CASE</summary>

### LOWER\_CAMEL\_CASE

Transforms a string to lower camel case (also known as dromedaryCase). The first word is lowercase, and subsequent words are capitalized with no separators.

**Parameter Format**

None (no parameters required)

**Basic Usage**

* Destination Attribute: `identifier`
* Formatter: `{field_name}`
* Then Apply: `| LOWER_CAMEL_CASE`
* Result: If `field_name` = `hello world`, output is `helloWorld`

**In a Pipeline**

* Destination Attribute: `api_field`
* Formatter: `{attribute_name}`
* Then Apply: `| TRIM | LOWER_CAMEL_CASE`
* Result: If `attribute_name` = `User Display Name` , output is `userDisplayName`

**Example**

* Destination Attribute: `json_property`
* Formatter: `{column_name}`
* Then Apply: `| LOWER_CAMEL_CASE`
* Use case: Convert database column names or display names to JSON property names following JavaScript/TypeScript conventions

</details>

<details>

<summary>NEXT_NUMBER</summary>

### NEXT\_NUMBER

Generates a set of alternative values by appending sequential numbers. Essential for handling unique constraint conflicts during user provisioning. Returns an empty string first, then "2", "3", "4", etc.

**Parameter Format**

Start Integer (NUMBER, required): First number in sequence Length (NUMBER, required): How many alternatives to generate

**Basic Usage**

* Destination Attribute: `username`
* Formatter: `{first_name}.{last_name}`
* Then Apply: `| LOWER | NEXT_NUMBER, 2, 3`
* Result: Generates `john.smith`, `john.smith2`, `john.smith3`, `john.smith4` as fallback options

**In a Pipeline**

* Destination Attribute: `email`
* Formatter: `{first_name}{last_name}`
* Then Apply: `| LOWER | NEXT_NUMBER, 2, 5 | APPEND, "@company.com"`
* Result: Creates email alternatives: `johnsmith@company.com`, `johnsmith2@company.com`, etc.

**Example**

* Destination Attribute: `user_principal_name`
* Formatter: (see conditional example below)
* Then Apply: N/A (used within IF statement)
* Use case: Intelligent username generation with length-based fallbacks:

```
IF sys_attr__would_be_value_len le 20
  {first_name | LOWER}.{last_name | LOWER | NEXT_NUMBER, 2, 3}
ELSE IF sys_attr__would_be_value_len le 30
  {first_name | LOWER}.{last_name | LOWER | FIRST_N, 1 | NEXT_NUMBER, 2, 3}
ELSE
  {first_name | LOWER | FIRST_N, 1}.{last_name | LOWER | FIRST_N, 1 | NEXT_NUMBER, 2, 3}
```

This handles both name length constraints and uniqueness conflicts automatically.

</details>

<details>

<summary>NEXT_NUMBER Max Length</summary>

### NEXT\_NUMBER Max Length

This transformer supports an optional maximum length parameter to simplify complex username generation workflows. It automatically evaluates combined strings (such as `{first_name}_{last_name}`) and truncates to specified character limits before appending numerical suffixes.

Generates a set of integers as strings.

**Parameter Format**

Integer (NUMBER, required), Length (NUMBER, required)

**Usage Example**

Input:

`{"foobar" | NEXT_NUMBER, 1, 12, 4}`

Output:

`foob` `foo1` `foo2` `foo3` `foo4` `foo5` `foo6` `foo7` `foo8` `foo9` `fo10` `fo11` `fo12`

</details>

<details>

<summary>NOW</summary>

### NOW

Returns the current time in UTC. An optional argument indicates the outgoing time format; by default, the RFC3339 format.

**Parameter Format**

String (Optional) - Format

**Usage Example**

Input:

`{NOW}`

`{| NOW, "RFC3339"}`

`{NOW, "RFC3339"}`

`{NOW, "2006-01-02T15:04:05Z07:00"}`

</details>

<details>

<summary>PHONE_NUMBER_E164</summary>

### PHONE\_NUMBER\_E164

Transforms a phone number into the E.164 format.

E.164 numbers are formatted \[+] \[country code] \[subscriber number including area code] and can have a maximum of fifteen digits.

**Parameter Format**

Region (STRING, optional): ISO 3166-1 alpha-2 format

**Usage Example**

Input:

`{"+1-800-555-1212" | PHONE_NUMBER_E164}`

Output:

`+18005551212`

</details>

<details>

<summary>PREPEND</summary>

### PREPEND

Adds text to the beginning of attribute values. Useful for adding prefixes like organization codes or type indicators.

**Parameter Format**

Characters (STRING, required): Text to add at the beginning

**Basic Usage**

* Destination Attribute: `location_code`
* Formatter: `{city_code}`
* Then Apply: `| PREPEND, "CORP_"`
* Result: If `city_code` = `NYC`, output is `CORP_NYC`

**In a Pipeline**

* Destination Attribute: `contractor_username`
* Formatter: `{username}`
* Then Apply: `| PREPEND, "c-" | LOWER`
* Result: If `username` = `JSmith`, output is `c-jsmith`

**Example**

* Destination Attribute: `account_name`
* Formatter: `{username}`
* Then Apply: `| PREPEND, "c-"`
* Use case: Identify contractor accounts by prefixing their usernames (converts "jsmith" to "c-jsmith" to distinguish from employee accounts)

</details>

<details>

<summary>RANDOM_ALPHANUMERIC_GENERATOR</summary>

### RANDOM\_ALPHANUMERIC\_GENERATOR

Generates a random alphanumeric string.

**Parameter Format**

Length (NUMBER, required)

**Usage Example**

Input:

`{| RANDOM_ALPHANUMERIC_GENERATOR, 8}`

Output:

`a1B2c3D4`

Note: This transformer generates an alphanumeric string with eight characters.

</details>

<details>

<summary>RANDOM_INTEGER</summary>

### RANDOM\_INTEGER

Generates a random integer value between specified minimum and maximum values (inclusive). Useful for creating unique test IDs or temporary identifiers. Does not require an input value.

**Parameter Format**

Min (NUMBER, required): The minimum value (inclusive) Max (NUMBER, required): The maximum value (inclusive)

**Basic Usage**

* Destination Attribute: `test_id`
* Formatter: `TEST`
* Then Apply: `| RANDOM_INTEGER, 1000, 9999`
* Result: Output is `TEST` followed by random number like `TEST4827`

**In a Pipeline**

* Destination Attribute: `temp_username`
* Formatter: `user`
* Then Apply: `| RANDOM_INTEGER, 1, 100 | APPEND, "@temp.local"`
* Result: Output like `user42@temp.local`

**Example**

* Destination Attribute: `temporary_id`
* Formatter: `TEST`
* Then Apply: `| RANDOM_INTEGER, 1000, 9999`
* Use case: Generate unique test identifiers for sandbox environments (produces values like "TEST4827", "TEST8391")

</details>

<details>

<summary>RANDOM_NUMBER_GENERATOR</summary>

### RANDOM\_NUMBER\_GENERATOR

Generates a random number string.

**Parameter Format**

Length (NUMBER, required)

**Usage Example**

Input:

`{| RANDOM_NUMBER_GENERATOR, 4}`

Output:

`4829`

Note: This transformer generates a random numeric string with four characters.

</details>

<details>

<summary>RANDOM_STRING_GENERATOR</summary>

### RANDOM\_STRING\_GENERATOR

Generates a random string.

**Parameter Format**

Length (NUMBER, required)

**Usage Example**

Input:

`{| RANDOM_STRING_GENERATOR, 6}`

Output:

`uFkLxw`

Note: This transformer generates a random alpha string with six characters.

</details>

<details>

<summary>REMOVE_CHARS</summary>

### REMOVE\_CHARS

Removes all instances of specified characters from a string. Useful for cleaning up data and removing unwanted punctuation or special characters.

**Parameter Format**

Characters (STRING, required): String containing all characters to be removed

**Basic Usage**

* Destination Attribute: `username`
* Formatter: `{email}`
* Then Apply: `| REMOVE_CHARS, "@."`
* Result: If `email` = `john.doe@example.com`, output is `johndoeexamplecom`

**In a Pipeline**

* Destination Attribute: `phone`
* Formatter: `{phone_number}`
* Then Apply: `| REMOVE_CHARS, "()- "`
* Result: If `phone_number` = `(123) 456-7890`, output is `1234567890`

**Example**

* Destination Attribute: `user_id`
* Formatter: `{email}`
* Then Apply: `| REMOVE_CHARS, "-"`
* Use case: Create clean user IDs from email addresses by removing hyphens (converts "<john-doe@example.com>" to "<johndoe@example.com>")

</details>

<details>

<summary>REMOVE_DIACRITICS</summary>

### REMOVE\_DIACRITICS

Removes diacritics (accents, etc.) from input string.

**Parameter Format**

None (no parameters required)

**Usage Example**

Input:

`{"José" | REMOVE_DIACRITICS}`

Output:

`Jose`

</details>

<details>

<summary>REMOVE_DOMAIN</summary>

### REMOVE\_DOMAIN

Removes the domain portion from an email address, leaving only the username. One of the most frequently used transformers for generating usernames from email addresses.

**Parameter Format**

None (no parameters required)

**Basic Usage**

* Destination Attribute: `username`
* Formatter: `{email}`
* Then Apply: `| REMOVE_DOMAIN`
* Result: If `email` = `john.smith@company.com`, output is `john.smith`

**In a Pipeline**

* Destination Attribute: `login_name`
* Formatter: `{email}`
* Then Apply: `| REMOVE_DOMAIN | REPLACE_ALL, ".", "_"`
* Result: If `email` = `john.smith@company.com`, output is `john_smith`

**Example**

* Destination Attribute: `username`
* Formatter: `{email}`
* Then Apply: `| REMOVE_DOMAIN`
* Use case: Extract usernames for target systems that don't use email-style logins (converts "<jsmith@company.com>" to "jsmith")

</details>

<details>

<summary>REMOVE_WHITESPACE</summary>

### REMOVE\_WHITESPACE

Removes all whitespace characters (spaces, tabs, newlines) from a string. Useful for creating compact identifiers and ensuring data consistency.

**Parameter Format**

None (no parameters required)

**Basic Usage**

* Destination Attribute: `username`
* Formatter: `{display_name}`
* Then Apply: `| REMOVE_WHITESPACE`
* Result: If `display_name` = `John A. Doe`, output is `JohnA.Doe`

**In a Pipeline**

* Destination Attribute: `tag`
* Formatter: `{department}`
* Then Apply: `| REMOVE_WHITESPACE | LOWER`
* Result: If `department` = `Human Resources`, output is `humanresources`

**Example**

* Destination Attribute: `cost_center_code`
* Formatter: `{cost_center}`
* Then Apply: `| REMOVE_WHITESPACE`
* Use case: Ensure cost center codes have no embedded spaces for system integration (converts "CC 12345" to "CC12345")

</details>

## REPLACE\_ALL

**Description:** Replaces all occurrences of a substring with a replacement string.

**Syntax:** `{attribute | REPLACE_ALL, "search", "replacement"}`

**Parameters:**

| Parameter   | Required | Type   | Description                        |
| ----------- | -------- | ------ | ---------------------------------- |
| search      | Yes      | String | The substring to find              |
| replacement | Yes      | String | The string to replace matches with |

**Returns:** String — the input with all occurrences of `search` replaced by `replacement`

**Examples:**

| Input                   | Expression                                | Output                  |
| ----------------------- | ----------------------------------------- | ----------------------- |
| `John Smith`            | `{display_name \| REPLACE_ALL, " ", "_"}` | `John_Smith`            |
| `EMP-12345`             | `{employee_id \| REPLACE_ALL, "-", ""}`   | `EMP12345`              |
| `john smith@domain.com` | `{email \| REPLACE_ALL, " ", "."}`        | `john.smith@domain.com` |

**Notes:**

* Case-sensitive matching
* To remove characters, use an empty string as the replacement: `REPLACE_ALL, "x", ""`
* For removing multiple different characters, consider [REMOVE\_CHARS](#remove-chars) instead

<details>

<summary>RIGHT_PAD</summary>

### RIGHT\_PAD

Right pads a string with a character.

**Parameter Format**

Length (NUMBER, required),

Pad (CHARACTER, optional): Default is space

**Usage Example**

Input:

`{"123" | RIGHT_PAD, 5, "0"}`

Output:

`12300`

</details>

<details>

<summary>SENTENCE_CASE</summary>

### SENTENCE\_CASE

Capitalizes only the first non-whitespace character of a string and lowercases the rest. Preserves any leading whitespace. Useful for standardizing sentence-formatted text fields.

**Parameter Format**

None (no parameters required)

**Basic Usage**

* Destination Attribute: `description`
* Formatter: `{notes}`
* Then Apply: `| SENTENCE_CASE`
* Result: If `notes` = `THE QUICK BROWN FOX`, output is `The quick brown fox`

**In a Pipeline**

* Destination Attribute: `formatted_notes`
* Formatter: `{comment}`
* Then Apply: `| TRIM | SENTENCE_CASE`
* Result: If `comment` = `IMPORTANT MESSAGE HERE` , output is `Important message here`

**Example**

* Destination Attribute: `job_description`
* Formatter: `{job_title}`
* Then Apply: `| SENTENCE_CASE`
* Use case: Normalize job descriptions from all-caps source data to sentence case for cleaner display

</details>

<details>

<summary>SPLIT</summary>

### SPLIT

Splits a string and returns the string at the given index.

**Parameter Format**

Split String (STRING, required), Index (NUMBER, required)

**Usage Example**

Input:

`{"first.last@domain.com" | SPLIT, "@", 0}`

Output:

`first.last`

**Notes**

* The index is zero-based (the first segment is index `0`).
* If the index is greater than or equal to the number of segments the split produces, `SPLIT` returns an empty string `""` (not an error), and any remaining pipeline functions still run.
* When `SPLIT` follows a lookup such as [FROM\_ENTITY\_ATTRIBUTE](#from-entity-attribute), the `DefaultValue` from that lookup is also passed through `SPLIT`. A default that doesn't contain the split delimiter is treated as a single segment, so index `1` (or higher) returns an empty string. To surface a readable fallback through a split, include the delimiter in the default so the text lands at the target index. For example, a default of `"::Not found"` split on `"::"` at index `1` returns `Not found`.

</details>

## SUB\_STRING

**Description:** Extracts a portion of a string starting at a specified position.

**Syntax:** `{attribute | SUB_STRING, offset, length}`

**Parameters:**

| Parameter | Required | Type    | Description                       |
| --------- | -------- | ------- | --------------------------------- |
| offset    | Yes      | Integer | Starting position (0-based index) |
| length    | Yes      | Integer | Number of characters to extract   |

**Returns:** String — the extracted substring

**Examples:**

| Input                    | Expression                          | Output       |
| ------------------------ | ----------------------------------- | ------------ |
| `John`                   | `{first_name \| SUB_STRING, 0, 1}`  | `J`          |
| `EMP12345`               | `{employee_id \| SUB_STRING, 3, 4}` | `1234`       |
| `john.smith@company.com` | `{email \| SUB_STRING, 0, 10}`      | `john.smith` |

**Notes:**

* Index is 0-based (first character is position 0)
* If offset + length exceeds the string length, returns characters up to the end
* For extracting just the first N characters, consider [FIRST\_N](#first-n) as a simpler alternative

<details>

<summary>TITLE_CASE</summary>

### TITLE\_CASE

Capitalizes the first letter of each word and lowercases the rest. Also handles dot-separated values by capitalizing the first letter of each segment. Useful for formatting names and titles.

**Parameter Format**

None (no parameters required)

**Basic Usage**

* Destination Attribute: `display_name`
* Formatter: `{full_name}`
* Then Apply: `| TITLE_CASE`
* Result: If `full_name` = `john doe`, output is `John Doe`

**In a Pipeline**

* Destination Attribute: `formatted_name`
* Formatter: `{name}`
* Then Apply: `| TRIM | TITLE_CASE`
* Result: If `name` = `JANE SMITH` , output is `Jane Smith`

**Example**

* Destination Attribute: `display_name`
* Formatter: `{username}`
* Then Apply: `| TITLE_CASE`
* Use case: Format dot-separated usernames for display (converts `john.doe` to `John.Doe`)

</details>

<details>

<summary>TRIM</summary>

### TRIM

Removes leading and trailing whitespace from a string. Essential for cleaning up data from external systems.

**Parameter Format**

None (no parameters required)

**Basic Usage**

* Destination Attribute: `username`
* Formatter: `{display_name}`
* Then Apply: `| TRIM`
* Result: If `display_name` = `" John Doe "`, output is `John Doe`

**In a Pipeline**

* Destination Attribute: `email`
* Formatter: `{email_address}`
* Then Apply: `| TRIM | LOWER`
* Result: If `email_address` = `" John.Smith@Company.com "`, output is `john.smith@company.com`

**Example**

* Destination Attribute: `display_name`
* Formatter: `{display_name}`
* Then Apply: `| TRIM`
* Use case: Clean up imported user data that may have padding whitespace from CSV files or database fields

</details>

<details>

<summary>TRIM_CHARS</summary>

### TRIM\_CHARS

Removes all specified characters from both the beginning and end of a string. Useful for removing padding characters or cleaning up formatted data.

**Parameter Format**

Characters (STRING, required): String containing all characters to remove from both ends

**Basic Usage**

* Destination Attribute: `employee_id`
* Formatter: `{id_number}`
* Then Apply: `| TRIM_CHARS, "0."`
* Result: If `id_number` = `000.123.000`, output is `123`

**In a Pipeline**

* Destination Attribute: `clean_code`
* Formatter: `{code}`
* Then Apply: `| TRIM_CHARS, "-_" | UPPER`
* Result: If `code` = `---ABC123___`, output is `ABC123`

**Example**

* Destination Attribute: `office_code`
* Formatter: `{office_code}`
* Then Apply: `| TRIM_CHARS, ".0" | TRIM_CHARS_RIGHT, ".USCA"`
* Use case: Clean up office codes with variable padding (converts `000.8675309.USCA` to `8675309`)

</details>

<details>

<summary>TRIM_CHARS_LEFT</summary>

### TRIM\_CHARS\_LEFT

Removes all specified characters from the beginning of a string only. Useful for removing leading zeros or prefixes.

**Parameter Format**

Characters (STRING, required): String containing all characters to remove from the beginning

**Basic Usage**

* Destination Attribute: `cost_center`
* Formatter: `{cost_center_code}`
* Then Apply: `| TRIM_CHARS_LEFT, "0"`
* Result: If `cost_center_code` = `00012345`, output is `12345`

**In a Pipeline**

* Destination Attribute: `identifier`
* Formatter: `{raw_id}`
* Then Apply: `| TRIM_CHARS_LEFT, "x" | UPPER`
* Result: If `raw_id` = `xxxABC123`, output is `ABC123`

**Example**

* Destination Attribute: `cost_center`
* Formatter: `{cost_center}`
* Then Apply: `| TRIM_CHARS_LEFT, "0"`
* Use case: Remove leading zeros from cost center codes while preserving trailing zeros (converts "00012345" to "12345")

</details>

<details>

<summary>TRIM_CHARS_RIGHT</summary>

### TRIM\_CHARS\_RIGHT

Removes all specified characters from the end of a string only. Useful for removing trailing characters or suffixes.

**Parameter Format**

Characters (STRING, required): String containing all characters to remove from the end

**Basic Usage**

* Destination Attribute: `office_code`
* Formatter: `{raw_office_code}`
* Then Apply: `| TRIM_CHARS_RIGHT, "0"`
* Result: If `raw_office_code` = `ABC12300`, output is `ABC123`

**In a Pipeline**

* Destination Attribute: `clean_code`
* Formatter: `{code}`
* Then Apply: `| TRIM_CHARS_RIGHT, "temp" | UPPER`
* Result: If `code` = `ABC123temp`, output is `ABC123`

**Example**

* Destination Attribute: `office_code`
* Formatter: `{office_code}`
* Then Apply: `| TRIM_CHARS_RIGHT, "0"`
* Use case: Remove trailing zeros from office codes while preserving leading zeros (converts "ABC12300" to "ABC123")

</details>

## UPPER

**Description:** Converts all characters in a string to uppercase.

**Syntax:** `{attribute | UPPER}`

**Parameters:**

| Parameter | Required | Type | Description                       |
| --------- | -------- | ---- | --------------------------------- |
| (none)    | —        | —    | This function takes no parameters |

**Returns:** String — the input value with all characters converted to uppercase

**Examples:**

| Input        | Expression                                 | Output      |
| ------------ | ------------------------------------------ | ----------- |
| `sales`      | `{department \| UPPER}`                    | `SALES`     |
| `john smith` | `{username \| REMOVE_WHITESPACE \| UPPER}` | `JOHNSMITH` |
| `Smith`      | `{name \| UPPER}`                          | `SMITH`     |

**Notes:** Only affects alphabetic characters. Numbers and special characters pass through unchanged.

<details>

<summary>UPPER_CAMEL_CASE</summary>

### UPPER\_CAMEL\_CASE

Transforms a string to upper camel case.

**Parameter Format**

None (no parameters required)

**Usage Example**

Input:

`{"hello world" | UPPER_CAMEL_CASE}`

Output:

`HelloWorld`

</details>

<details>

<summary>UPPER_SNAKE_CASE</summary>

### UPPER\_SNAKE\_CASE

Transforms string to uppercase with underscores.

**Parameter Format**

None (no parameters required)

**Usage Example**

Input:

`{"hello world" | UPPER_SNAKE_CASE}`

Output:

`HELLO_WORLD`

</details>

<details>

<summary>UTC_TO_TIME_ZONE</summary>

### UTC\_TO\_TIME\_ZONE

Interprets the incoming time string as if it were in UTC and then converts it to the specified time zone. (example: if the input is "1/2/2025 11pm" and the specified time zone is `America/Los_Angeles` the function will treat "1/2/2025 11pm" as the UTC time zone and output the corresponding `America/Los_Angeles` time "1/2/2025 3pm") Note: When using the time zone parameter, a named time zone (`America/Los_Angeles`) accounts for daylight saving time, whereas a time zone offset (`-07:00`) is always calculated from UTC, ignoring daylight saving time.

**Parameter Format**

String - Time Zone String (Optional) - Format

**Usage Example**

Input:

`{activation_date | UTC_TO_TIME_ZONE, "America/Los_Angeles"}`

`{activation_date | UTC_TO_TIME_ZONE, "America/Los_Angeles", "RFC3339"}`

`{activation_date | UTC_TO_TIME_ZONE, "-07:00"}`

`{activation_date | UTC_TO_TIME_ZONE, "-07:00", "RFC3339"}`

</details>

<details>

<summary>UUID_GENERATOR</summary>

### UUID\_GENERATOR

Generates a UUID.

A UUID (Universally Unique Identifier) is a 128-bit identifier used to uniquely identify information in computer systems.

**Parameter Format**

None (no parameters required)

**Usage Example**

Input:

`{| UUID_GENERATOR}`

Output:

`123e4567-e89b-12d3-a456-426614174000`

</details>

<details>

<summary>ZERO_PAD</summary>

### ZERO\_PAD

Adds left zero-padding to numerical string values until they reach the specified length. If the input is non-numeric, it passes through unchanged. If the numeric value is already longer than the specified length, it remains unchanged.

**Parameter Format**

Length (NUMBER, required): Target string length for zero-padding

**Basic Usage**

* Destination Attribute: `employee_id`
* Formatter: `{id}`
* Then Apply: `| ZERO_PAD, 6`
* Result: If `id` = `1234`, output is `001234`

**Example**

* Destination Attribute: `badge_number`
* Formatter: `{badge_id}`
* Then Apply: `| ZERO_PAD, 6`
* Use case: Standardize badge numbers to 6-digit format for access control systems (converts "1234" to "001234", leaves "12345678" unchanged, and passes non-numeric values like "admin" through unchanged)

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.veza.com/4yItIzMvkpAvMVFAamTf/features/lifecycle-management/transformers/transformer-reference.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
