# Merge

<!-- meta: type=merge; location=Logic; category=Logic; platforms=Joomla and WordPress (where applicable) -->

## Overview

Waits until every branch wired into this node has finished, then combines their results into one bundle for the next step.

This step executes when the flow reaches it along a wired path. It does not call external services by itself unless combined with API or CMS steps — it shapes *how* the flow continues.

## Why use this node

Merge is a **logic step** in the **Logic** group. Logic steps control how data moves through the flow: branch on conditions, loop over lists, pause, merge parallel paths, or reshape payloads.

Typical reasons teams add **Merge** to a flow:

- Combine parallel API lookups before building a single email body
- Wait for both a CMS update and an external notification to finish
- Join branches after an If node split tasks across paths

## Example workflows

Common patterns on the canvas:

1. **Trigger** → **Merge** → **Send Email** / **API REST POST**
2. Parallel branches → **Merge** → **Merge** → downstream action

## How to set it up

On the Design tab, choose how to combine the incoming data — keep each branch separate, merge lightly, or merge deeply.

## Good to know

If one branch fails, merge still continues. Add a Check Condition afterward if you need to handle errors.

## Properties panel

The designer shows these tabs for this node:

| Tab | Purpose |
|-----|---------|
| **Info** | Plain-language description and output payload fields for downstream steps |
| **General** | Canvas label and read-only node ID |
| **AI** | Optional assistant to help draft settings from plain language |
| **Design** | Node-specific configuration fields |

### System (automatic — not edited by the user)

These fields are managed by the designer or runtime — you do not type into them directly:

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `_nodeId` | Node ID | `node-id` | No | — | — |
| `_payloadFields` | Available Fields | `payload-panel` | No | — | — |

### User-configured — General tab

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `label` | Label | `text` | No | — | Node label |

### User-configured — Design tab

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `mergeMode` | Output shape | `select` (`parents_only` \| `shallow_merge` \| `deep_merge`; default: `parents_only`) | No | — | One input port: connect multiple upstream branches with separate edges into that port. your site waits until every wired parent has finished. If any parent reports failure, the merge fails and downstream still runs with that error payload. |

### CMS site configuration (not on this node's properties panel)

Credentials, API keys, mailers, SMTP, and integration defaults are configured in the CMS plugin under **Node Configuration**, not per step on this node. Link the flow to a domain before testing CMS-backed fields.

## Output payload fields

After this step runs, later nodes can reference these fields using placeholders such as
`{{merge._passthrough}}`.

| Field key | Type | Description |
|-----------|------|-------------|
| `_passthrough` | note | Merge waits for all upstream branches and forwards their combined payload — it does not add its own fields. |

## Related nodes

Other steps in the same area of the palette:

- **Array to String** (`join-array-to-text`) — Logic
- **Check Condition** (`if`) — Logic
- **Filter List** (`filter-list`) — Logic
- **Logger** (`debug`) — Logic
- **Match Text** (`match-regex`) — Logic
