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

# Logic

> Learn how to configure your logic flow actions to add if/then conditions, store shared variables, show error messages or map values.

This list of logic actions allows you to add form conditional logic, store shared variables, map values, and to display custom error messages.

## If/then condition

Adds a conditional action with True / False branches to customize the behavior of the flow based on input or properties.

![](https://mintlify.s3.us-west-1.amazonaws.com/docs-dev/images/cdy7uua7fh8z/4ehTUSu8W1LibUd1uj3x5s/00d76b15c68746ed74e44127804c9557/if-then-condition-action.png)

### Input settings

| Parameter | Description |
| - | - |
| Condition | Customizable conditional action that triggers `True` / `False` branches depending on its result. You can use the `AND` / `OR` operators to nest different conditions. |

### Output object

| Property | Type | Description |
| - | - | - |
| `result` | Boolean | Returns a `true` or `false` response based on the condition result. |

### Output object example

```json lines theme={null}
{
  "result": true
}
```

## Store shared variable

Stores variables in a private state that is available in your form and across its flows.

You can reference these shared variables using `{{vars.*}}`**.** To learn more, read [Variables](/docs/docs/customize/forms/variables).

![](https://mintlify.s3.us-west-1.amazonaws.com/docs-dev/images/cdy7uua7fh8z/4MO9wvChhnCJOg9OAdWuEf/98182a2bd8b6cf4c4baebefb96bce121/stored-shared-variable.png)

### Input settings

| Parameter | Description |
| - | - |
| Data fields | The variables to be stored in a private state for use in your form and across its flow. Use key/value pairs to add variables. |

## Show error message

Displays a custom error message to the user.

> [!WARNING]
>
> This flow action terminates the Flow. Any actions inserted after it won't be executed.

![](https://mintlify.s3.us-west-1.amazonaws.com/docs-dev/images/cdy7uua7fh8z/1Kd4SyaBtAC9S8nfWFeGfh/6e42b16c0ab69dc6d026fb3601133fbe/show-error-message-flow-action.png)

### Input settings

| Parameter | Description |
| - | - |
| Error message | The error message to be displayed to the user. |

## Input value mapping

Maps an input variable to an output based on its values.

![](https://mintlify.s3.us-west-1.amazonaws.com/docs-dev/images/cdy7uua7fh8z/4VtAr4vCSXtKlSaxtiXQhV/bcb07221f688483aa2010d80394ae630/input-value-mapping.png)

### Input settings

| Parameter | Description |
| - | - |
| Input value (required) | The input variable. |
| Mapping table | Map an input variable value an output. |
| Default output value | Sets a default output value to be used when no output value is set in the mapping table. |

### Output object

| Property | Type | Description |
| - | - | - |
| `result` | String | Returns the value mapped to an input. |

### Output object example

```json lines theme={null}
{
	"result": "Please enter a valid email address."
}
```
