> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Append params to parent process

> It is a type of action that allows you to send data from a subprocess to a parent process.

**Why is it important?**  If you are using subprocesses that produce data that needs to be sent back to the main **process**, you can do that by using an **Append Params to Parent Process** action.

<Info>
  This action writes data into the **parent process data model** permanently. To push real-time updates to the parent UI without modifying the data model, use [Send data to user interface](./send-data-to-user-interface) with Target Process set to Parent. For a comparison of all data passing mechanisms, see [Subprocess management - How data flows](../process/subprocess#how-data-flows-between-subprocess-and-parent).
</Info>

## When to use this action

In a synchronous subprocess (Start Async = OFF on the Start Subprocess action), prefer **Data Mapping** on the Start Subprocess action — it propagates results back to the parent automatically when the subprocess ends, without an extra action.

Append Params to Parent Process is the right choice when:

* **The subprocess runs asynchronously** (Start Async = ON on the Start Subprocess action). The parent doesn't wait for the subprocess to finish, so Data Mapping doesn't apply — the subprocess must push results to the parent itself.
* **The subprocess is long-running** (LLM agents, slow integrations, batch jobs) and you want fire-and-forget execution while the user continues in the UI.

<Frame>
  ![Main process with two async subprocesses started in parallel before a converging gateway](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/append_param_1.png)
</Frame>

### Combined with Send data to user interface

To both persist the result AND notify the user's UI in a single step, attach two actions to the final node of the async subprocess:

1. **Append Params to Parent Process** — writes the result into the parent's data model.
2. **Send data to user interface** with Target Process set to Parent — pushes a UI update over SSE.

This is the standard pattern for async agent results: data is persisted so downstream nodes can read it, and the user sees the update appear without refreshing.

<Frame>
  ![Two actions configured on the final node of an async subprocess — Append Params to Parent Process and Send data to user interface](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/append_param_2.png)
</Frame>

## Configuring an Append params to parent process

After you create a process designed to be used as a [subprocess](../process/subprocess), you can configure the action. To do this, you need to add an **Append Params to Parent Process** on a [**Task node**](../node/task-node) in the subprocess.

The following properties must be configured:

* [Action Edit](#action-edit)
* [Parameters](#parameters)
* [Data to send (for Manual actions)](#data-to-send)

### Action edit

* **Name** — internal identifier for the action. We recommend defining a naming standard so actions are easy to find.
* **Action Type** — set to **Append Params to Parent Process**.

The remaining options are grouped into three columns:

**Trigger**

* **Manual** — when ON, the action runs only after a user triggers it (for example, from a button in a UI Task). When OFF, the action runs automatically as soon as the token reaches the node. For Append Params, leave this OFF in most cases.
* **Repeatable** — when ON, the action can be triggered multiple times.

**Execution**

* **Optional** — automatic actions cannot be optional. Manual actions can be optional or required.
* **Autorun Children?** — when ON, child actions (mandatory and automatic) run immediately after this action finishes.

**Navigation**

* **Allow back to this action** — when ON, the user can return to this action via the back-in-process functionality. The toggle is enabled only when **Manual** is ON. For details, see [Moving a token backwards in a process](../../flowx-designer/managing-a-project-flow/moving-a-token-backwards-in-a-process).

### Parameters

All three fields below are mandatory.

* **Copy from current state** - data that you want to be copied back to the parent process
* **Destination in the parent state** - on what key to copy the param values
* **Show Target Process** - ID of the parent process where the params are written. Set this to `${parentProcessInstanceId}` if the variable was defined when you [started the subprocess](./start-subprocess-action). If this value is missing or cannot be parsed as a process instance ID, the action raises a `MISSCONFIG_SUBPROCESS` incident on the parent process — it does not fail silently.

<Check>
  To recap: if you have a **Copy from current state** with a simple **JSON** -`{"age": 17}`, that needs to be available in the parent process, on the `application.client.age` key, you will need to set this field (**Destination in the parent state**) with `application.client`, which will be the key to append to in the parent process.
</Check>

<Warning>
  **The payload always lands at the destination key — don't repeat the key in both fields.** If **Copy from current state** is `{"clickCount": ${clickCount}}` and **Destination in the parent state** is `clickCount`, the parent receives a nested object at `clickCount.clickCount`, not the value at `clickCount`. To write a single value to a top-level parent key, use a raw value reference instead: set **Copy from current state** to `${clickCount}` and **Destination in the parent state** to `clickCount`. Raw references work for numbers, booleans, objects, and arrays; wrap string values in quotes (`"${myKey}"`).

  **The action replaces the value at the destination key.** If the destination key already contains a nested object — for example `application.client = {"name": "Alice", "age": 30}` — sending `{"age": 35}` to destination `application.client` overwrites the entire object and `name` is lost. To preserve siblings, write to a destination key that doesn't conflict with existing parent state (for example, `application.subprocessResult.client` instead of `application.client`), or use [Send data to user interface](./send-data-to-user-interface) with Target Process set to Parent for non-destructive updates.
</Warning>

### Data to send

* **Keys** - are used when data is sent from the frontend via an action to validate the data (you can find more information in the [User Task configuration](../node/user-task-node) section)

<Warning>
  **Data to send** is configurable only when the **Manual** toggle is ON.
</Warning>

## Example

We have a subprocess that allows us to enter the age of the client on the **data.client.age** key, and we want to copy the value back to the parent process. The key to which we want to receive this value in the parent process is **application.client.age**.

This is the configuration to apply the above scenario:

**Parameters**

* **Copy from current state** - `{"age": ${data.client.age}}` — the JSON payload to send to the parent
* **Destination in the parent state** - `application.client` — the key on the parent where the payload is written. Combined with the payload above, the value lands at `application.client.age`.
* **Show Target Process** - `${parentProcessInstanceId}` — required, identifies the parent process
