> ## Documentation Index
> Fetch the complete documentation index at: https://auth0-cq3uo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Logic

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.

<Frame>![](https://images.ctfassets.net/cdy7uua7fh8z/4ehTUSu8W1LibUd1uj3x5s/00d76b15c68746ed74e44127804c9557/if-then-condition-action.png)</Frame>

### Input settings

<table class="table">
  <thead>
    <tr>
      <th><b>Parameter</b></th>
      <th><b>Description</b></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Condition</td>

      <td>
        Customizable conditional action that triggers <code>True</code> / <code>False</code> branches depending on its result. You can use the <code>AND</code> / <code>OR</code> operators to nest different conditions.
      </td>
    </tr>
  </tbody>
</table>

### Output response

<table class="table">
  <thead>
    <tr>
      <th><b>Property</b></th>
      <th><b>Type</b></th>
      <th><b>Description</b></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><code>result</code></td>
      <td>Boolean</td>
      <td>Returns a <code>true</code> or <code>false</code> response based on the condition result.</td>
    </tr>
  </tbody>
</table>

### 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/customize/forms/variables).

<Frame>![](https://images.ctfassets.net/cdy7uua7fh8z/4MO9wvChhnCJOg9OAdWuEf/98182a2bd8b6cf4c4baebefb96bce121/stored-shared-variable.png)</Frame>

### Input settings

<table class="table">
  <thead>
    <tr>
      <th><b>Parameter</b></th>
      <th><b>Description</b></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Data fields</td>

      <td>
        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.
      </td>
    </tr>
  </tbody>
</table>

## 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.
</Warning>

<Frame>![](https://images.ctfassets.net/cdy7uua7fh8z/1Kd4SyaBtAC9S8nfWFeGfh/6e42b16c0ab69dc6d026fb3601133fbe/show-error-message-flow-action.png)</Frame>

### Input settings

<table class="table">
  <thead>
    <tr>
      <th><b>Parameter</b></th>
      <th><b>Description</b></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Error message</td>

      <td>
        The error message to be displayed to the user.
      </td>
    </tr>
  </tbody>
</table>

## Input value mapping

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

<Frame>![](https://images.ctfassets.net/cdy7uua7fh8z/4VtAr4vCSXtKlSaxtiXQhV/bcb07221f688483aa2010d80394ae630/input-value-mapping.png)</Frame>

### Input settings

<table class="table">
  <thead>
    <tr>
      <th><b>Parameter</b></th>
      <th><b>Description</b></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Input value (required)</td>

      <td>
        The input variable.
      </td>
    </tr>

    <tr>
      <td>Mapping table</td>

      <td>
        Map an input variable value an output.
      </td>
    </tr>

    <tr>
      <td>Default output value</td>

      <td>
        Sets a default output value to be used when no output value is set in the mapping table.
      </td>
    </tr>
  </tbody>
</table>

### Output response

<table class="table">
  <thead>
    <tr>
      <th>Property</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><code>result</code></td>
      <td>String</td>
      <td>Returns the value mapped to an input.</td>
    </tr>
  </tbody>
</table>

### Output object example

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