# Define conditions for a workflow step

## Apply a condition

### Sample use case

> Let's say if you want to create two branches in a process. There is a field named as "Total Amount" in a form where you are applying the workflow. We need to apply a condition as follows
>
> If Total amount is > 10000 then a new branch of workflow is created
>
> If Total amount <= 10000 then a seperate branch is created

<figure><img src="/files/dizghPCcHuXoO9OuDIik" alt=""><figcaption></figcaption></figure>

### Start of a workflow

A workflow starts when a form is submitted, so when you start configuring a workflow the first item you will see is a "submit" button step. Submit button step has the following properties

<figure><img src="/files/MLMW41bwlzrDjzTJFQN0" alt=""><figcaption><p><em>Workflow Initial Step</em></p></figcaption></figure>

1. **Node ID:** This ID helps identify a step in the workflow. it follows a sequence n-1, n-2, n-3 ....etc
2. **Settings icon:** Clicking on this icon helps you provide the process log when the form is submitted.
3. **"+" icon**: which helps you define the further steps of the workflow

### Let's apply a condition in the workflow builder

When you click the "**+**" icon next to the button system asks if you need to "apply a condition"

<figure><img src="/files/sSQuV18NrboLsRpYzGhP" alt=""><figcaption><p><em>Apply a condition on Initial Step</em></p></figcaption></figure>

&#x20;The **Set condition** window is displayed on the right. Click on "**Add rule**" to define the criteria

<figure><img src="/files/Bxv4wK9IlZvxqia0xuuW" alt=""><figcaption><p><em>Add Rule for conditions</em></p></figcaption></figure>

2\.    You can select the form field, Operator, and value while adding a rule

> Example: In a process you want to create a condition, if "Total Amount" is > 10000 then create a branch&#x20;

<figure><img src="/files/74cWjCMna3vQxwmxGWZx" alt=""><figcaption><p><em>Set Condition (Total Amount>10000)</em></p></figcaption></figure>

3\.    To save this condition, click **Apply** at the bottom right.  The condition is added to the workflow in the following manner.

<figure><img src="/files/CHJlfC7B4HlEjiFWEXWB" alt=""><figcaption><p><em>Condition Added</em></p></figcaption></figure>

{% hint style="info" %}
**Question:** Now that we know how to add a condition, can you add the condition: Total Amount <= 10000 similarly?&#x20;

**Answer:** Click on "**+**" icon again in front of submit button and repeat the above steps
{% endhint %}

The final result will look like this:

<figure><img src="/files/RgICT1z3svpIoYUVfKdH" alt=""><figcaption><p><em>Both Conditions added</em></p></figcaption></figure>

{% hint style="info" %}
You can add multiple conditions at a step as per the process requirement
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.senpiper.com/workflow-builder/how-to-create-workflows/defining-conditions-for-a-step.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
