&nbsp;

### Data Preparation

&nbsp;

Data Preparation provides an AI-assisted environment for creating and managing transformation rules that convert raw device messages into the Cumulocity data model.

IoT devices send data in many different formats, from simple JSON payloads to device-specific message structures. Data Preparation empowers you to standardize this data before it is used by Cumulocity applications and services.

Data Preparation uses smart functions to process incoming messages and produce Cumulocity-compliant measurements, events, alarms, or managed objects. The AI assistant helps you describe your business context and generate JavaScript-based transformation logic, which you can review, edit, test, and deploy as part of a rule.

&nbsp;

### Prerequisites

&nbsp;

✅ **AI Provider:**

- Enable the AI Agent Manager public preview (available next to this Data Preparation preview feature).
- Configure a global AI provider in the Agent Manager. See [Getting started by configuring a global provider](https://cumulocity.com/docs/ai/aim-introduction/#getting-started-by-configuring-a-global-provider).

✅ **Permissions:**
To get started, ensure your user role is configured with the following ADMIN permissions:

- **Data Preparation rules** – Create, edit, and delete draft rules.
- **Data Preparation deployments** – Deploy rules in production.

By default, both permissions are included in the "Admin" role.

&nbsp;

### Why use Data Preparation?

&nbsp;

✅ **Convert raw device payloads:** Transform incoming messages into standard Cumulocity measurements, events, alarms, and managed objects.

✅ **Use AI-assisted rule creation:** Describe the required transformation in natural language, or automatically generate the transformation from your device data.

✅ **Validate before deployment:** Test transformations with sample payloads or live MQTT messages and compare the generated Cumulocity output before deploying.

✅ **Process live MQTT traffic:** Deploy rules that listen to MQTT Service topics and process matching incoming messages automatically.

✅ **Prepare data for use by other applications:** Normalize raw device messages into Cumulocity-compliant objects before they are used by applications such as Streaming Analytics.

&nbsp;

For step-by-step onboarding and first rule deployment, refer to the [Getting started](https://cumulocity.com/docs/data-preparation/getting-started-dataprep/#create-rule) section in the Data Preparation documentation.

&nbsp;

For more details, refer to the [Data Preparation documentation](https://cumulocity.com/docs/data-preparation/data-preparation-introduction/#datapreparation).
