# Data Mapping

**Data Mapping** is a fundamental aspect of system integration in ONEWEB.\
It defines how input and output parameters are transferred between components to ensure that data flows correctly across the application.

In ONEWEB, data mapping is handled through a **visual, drag‑and‑drop interface**, allowing developers to connect parameters between UI components, Microflows, and integration nodes **without writing low‑level mapping code**.

Proper data mapping ensures **consistency, clarity, and maintainability** of integration logic.

***

### Purpose of Data Mapping in ONEWEB

Data Mapping enables applications to:

* Transfer data between different components
* Maintain clear contracts between UI and backend logic
* Reduce integration errors caused by mismatched parameters
* Visualize data flow across integration layers

By making data movement explicit, data mapping improves both **readability** and **long‑term maintainability** of Microflows.

***

### Data Mapping Between Smart Form and Microflow

ONEWEB provides an intuitive mapping screen that allows data to be mapped between **Smart Forms (App Designer)** and **Microflows**.

This mapping typically occurs when a Microflow is invoked from a UI interaction, such as a button click or field change.

#### Input Parameter Mapping

When passing data from a Smart Form to a Microflow:

* Smart Form fields are mapped to Microflow input parameters
* The mapping is defined visually using drag‑and‑drop
* Mapped values are automatically passed when the Microflow is executed

This approach ensures that Microflows receive all required input data in a structured and predictable way.

<figure><img src="/files/30pvghGfgzPFRBH77DFb" alt=""><figcaption></figcaption></figure>

***

#### Output (Response) Mapping

When a Microflow returns data to the UI:

* Output parameters from the Microflow are mapped to Smart Form fields
* The mapping is defined in the **Response Mapping** configuration
* UI fields are updated dynamically based on Microflow execution results

Typical use cases include:

* Populating form fields using backend data
* Displaying calculated or validated values
* Showing data retrieved from external systems

<figure><img src="/files/YAwwHMUQ1Z0onaR1GlZ0" alt=""><figcaption></figcaption></figure>

***

### Data Mapping Within Microflow Execution

Data mapping also plays a critical role **inside Microflow Designer**, where parameters are passed between nodes.

ONEWEB provides a dedicated **Parameter Mapping interface** to map data between:

* Microflow‑level input parameters
* Node‑level inputs
* Outputs from one node to inputs of another node

Each integration node (such as Database, Web Service, or File Read) includes its own mapping configuration to control how data enters and exits that node.

<figure><img src="/files/ukoy710mkfpdqdsXqwqH" alt=""><figcaption></figcaption></figure>

This visual mapping ensures that:

* Data transformations are explicit and traceable
* Node interactions are easy to understand
* Integration logic remains maintainable as flows grow in complexity

***

### Best Practices for Data Mapping

To ensure reliable and maintainable integrations, follow these guidelines:

* Clearly define input and output parameters before configuring mappings
* Use meaningful and consistent parameter names
* Avoid unnecessary duplication of parameters
* Reuse business objects consistently across Microflows
* Validate response mappings to prevent UI inconsistencies

Well‑designed data mapping significantly reduces runtime errors and improves overall integration quality.

***

### Summary

Data Mapping in ONEWEB provides a **visual and intuitive mechanism** for transferring data between UI components, Microflows, and integration nodes.

Using ONEWEB’s data mapping features, developers can:

* Map Smart Form fields to Microflow input parameters
* Map Microflow outputs back to UI fields
* Configure data flow between nodes within a Microflow
* Maintain clear and readable integration logic

Effective data mapping is a key enabler for building **robust, scalable, and maintainable integrations** in Microflow Designer.


---

# 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.onewebstack.com/designer-reference/microflow-designer/data-mapping.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.
