# Transformations ## Understand how data transformation work. Transformations let you adjust and format both user data and event data as they move through Krenalis. They keep information consistent and easy to interpret across sources and destinations, so every connected tool — from marketing platforms to databases — can read and use it correctly. They also define how events collected from your sources are delivered to destination applications during activation. ## When transformations happen Transformations happen at five key moments in the Krenalis data lifecycle: ## Transformation methods You can define transformations using any of the following methods — [Visual Mapping](https://www.krenalis.com/docs/transformations/transformations/visual-mapping.md), [JavaScript](https://www.krenalis.com/docs/transformations/transformations/javascript.md), and [Python](https://www.krenalis.com/docs/transformations/transformations/python.md). Each method performs the same activation logic, so you can choose the one that best fits your workflow and switch methods at any time.

Configure property mappings visually, apply simple expressions, and preview results in real time.

Use JavaScript to orchestrate complex logic, conditionals, and lookups for each record.

Run Python transforms in your Lambda environment for advanced data shaping and enrichment.

Visual Mapping transformation
JavaScript transformation
Python transformation
| Method | Description | Best for | |-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| | [Visual Mapping](https://www.krenalis.com/docs/transformations/transformations/visual-mapping.md) | A form-based interface to map source fields to destination fields and apply simple expressions. It runs directly in Krenalis through the **built-in expression engine**, with no external setup required. | Suitable for simple or routine transformations managed by marketing, operations, or data teams that don't require coding. | | [JavaScript](https://www.krenalis.com/docs/transformations/transformations/javascript.md) | Executes a custom JavaScript function for each record (user or event) to perform advanced operations such as conditional logic, lookups, calculations, or complete schema transformations. These functions run in your **AWS Lambda** environment and require an active Lambda integration. | Suitable for complex, conditional, or large-scale transformations created by developers or data engineers who need full flexibility and control. | | [Python](https://www.krenalis.com/docs/transformations/transformations/python.md) | Executes a custom Python function for each record (user or event) to perform advanced operations such as conditional logic, lookups, calculations, or complete schema transformations. These functions run in your **AWS Lambda** environment and require an active Lambda integration. | Suitable for complex, conditional, or large-scale transformations created by developers or data engineers who need full flexibility and control. | ## What transformations solve Transformations solve the inconsistencies that arise when data moves between different systems. Each platform that handles customer data defines its own schema — with unique field names, data types, and formats. When this data flows across tools, mismatches are inevitable. For example, a CRM might use `FirstName`, while your warehouse expects `first_name`. Transformations reconcile these differences by translating, cleaning, and standardizing data as it passes through Krenalis, so both technical and marketing teams can trust and use the same accurate information. **Typical use cases** Transformations can be applied in different situations depending on your goals and data structure. The most common use cases include: * **Data alignment** - Map or rename fields so that properties match your customer model. * **Data enrichment** - Combine multiple values, calculate new metrics, or derive properties used for segmentation or scoring. * **Data normalization** - Format dates, phone numbers, or identifiers consistently across systems. ## Summary Transformations connect every stage of your data flow — from collection to activation — ensuring that information remains structured and meaningful throughout. They unify how customer data is represented, so every system in your stack interprets it the same way. * Choose Visual Mapping for clear, fast configuration. * Choose JavaScript or Python functions when you need complex, conditional, or large-scale logic. Defining transformations thoughtfully helps you preserve accuracy, consistency, and trust across all your customer data.