> For the complete documentation index, see [llms.txt](https://guide.plumber.gov.sg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.plumber.gov.sg/user-guides/actions/if-then.md).

# If-then

## What is If-then?

If-then **allows one Pipe to perform different actions based on rules you define.** Using conditional logic, these rules determine the subsequent steps, for example, If response is A, then do X. If response is B, then do Y.

## If-then

| Field        | Description                                                                     | Required?            |
| ------------ | ------------------------------------------------------------------------------- | -------------------- |
| Branch name  | Give a name for this branch. We would suggest using the condition as your name. | :heavy\_check\_mark: |
| Field        | Select the variable that you want to check                                      | :heavy\_check\_mark: |
| Is or is not | Set the logical condition                                                       | :heavy\_check\_mark: |
| Condition    | Set the logical condition                                                       | :heavy\_check\_mark: |
| Value        | Set the value that you want to compare the variable against                     | :heavy\_check\_mark: |

## Check step

You can expect one of these two results when you **Check step**.

<table><thead><tr><th width="118.28125">Result</th><th>Description</th></tr></thead><tbody><tr><td>true</td><td>The condition you set is met. Your Pipe will continue to the next steps.</td></tr><tr><td>false</td><td>The condition you set is not met. Your Pipe will stop here.</td></tr></tbody></table>

{% hint style="info" %}
**Check Step** is like a “preview” to see if your rule is working, according to sample data. When your Pipe is running, the result might change because the data that comes in for each execution is different.
{% endhint %}

## Common errors

<details>

<summary>Non-number used in value/field for comparison</summary>

This happens because you are comparing text against a number or vice versa.&#x20;

Make sure that your Field and Value fields are using numbers, if you are using conditions made for numbers (Greater than, Greater than or equals to, Less than, Less than or equals to)&#x20;

</details>
