# Merge Filters Template

### Overview

Run the **Merge Filters Template** action from a handler.

This action merges a saved **Filter Template** into the **Filter Panel**. It updates matching fields. It does not apply conditions.

### Handlers and actions

* **Handler**: defines what happens when a user clicks a Kanban UI element.
* **Action**: an executable operation triggered by the handler.
* **Primary action here**: `Kanban API → Merge Filters Template`.
* **Optional follow-ups**: configure extra actions on success or failure.

See [Configuring Handlers](https://docs.flexikanban.ai/standard-kanban/tools/configuring-handlers).

### Key concepts

**Filter Template**\
A saved set of filter conditions.\
Templates can contain placeholders populated at runtime.

**Filter Panel**\
The panel where active filter conditions are displayed and managed.

### Configuration

Configure the handler on the interactive element.

**Primary action type**\
`Kanban API`

**Primary action**\
`Merge Filters Template`

**Action parameters**\
JSON object used to select the template and provide substitution values.

{% hint style="info" %}
This action **does not** replace all filters. It updates or adds filters by field. Users still must click **Apply**.
{% endhint %}

### Parameters

<table data-header-hidden><thead><tr><th width="107.53515625"></th><th width="512.14453125"></th><th></th></tr></thead><tbody><tr><td>Name</td><td>Description</td><td>Required</td></tr><tr><td><code>template</code></td><td>The name of the <strong>Filter Template</strong> to load.</td><td>Yes</td></tr><tr><td><code>values</code></td><td>JSON object containing values used to populate filter items defined in the template.</td><td>No</td></tr></tbody></table>

#### `values` notes

* Keys must match the template’s field names.
* Values can be static values or runtime expressions.

### Example

```json
{
  "template": "My Template A",
  "values": {
    "Opportunity.AccountId": "{Opportunity.AccountId}",
    "Opportunity.StageName": "Prospecting",
    "Opportunity.CloseDate": "{$System.Today}"
  }
}
```

### Behavior

When the handler runs the action:

1. Retrieves the filters list from the specified **Filter Template**.
2. Applies provided values to the template filter items.
3. Merges the result into the existing filters in the **Filter Panel**:
   * If a filter for the same field already exists, its value is overridden with the template value.
   * If no filter for the field exists, a new filter is added.
4. Does not apply conditions automatically — the user must click **Apply** in the Filter Panel to activate the updated filters.

### Related actions

* [Apply Filters Template](https://docs.flexikanban.ai/references/handlers/kanban-api-handler-types/filters/apply-filters-template) (replace panel filters and auto-apply)
* [Select Filters Template](https://docs.flexikanban.ai/references/handlers/kanban-api-handler-types/filters/select-filters-template) (replace panel filters, no auto-apply)
* [Apply Filter Conditions](https://docs.flexikanban.ai/references/handlers/kanban-api-handler-types/filters/apply-filter-conditions) (equivalent to clicking **Apply**)

### Troubleshooting

**The Filter Panel does not show template filters.**\
The `template` value may reference a missing template.\
Names are case-sensitive.

**An existing filter was not updated.**\
Merge uses the field name.\
If names differ, a new filter is added.

**Template values are not substituted.**\
Keys in `values` must match the template’s field names.\
Use API names like `Opportunity.StageName`.

**Dynamic expressions in `values` are not resolving.**\
Expressions like `{Opportunity.AccountId}` resolve only when that context exists.\
Place the element where the referenced fields are available.

**Filters update, but the board does not change.**\
This action does not apply conditions.\
Users must click **Apply**.
