# Workflow Action: If/Else

Using the If/Else Workflow condition allows you to create different paths within a Workflow. This allows you to customize Workflows on a deeper level to enhance your business. There are numerous options for customizing the If/Else condition by adding one or multiple “and” & “or” filters to customize the setup as you need.

Perhaps you want one set of actions to happen for contacts who live in a certain geographic area, and you want a different set of actions for those in another area. Or maybe you want people with an email address to receive a series of email follow-ups, and people without an email address to be scheduled for a series of call follow-ups. Again, there are several options for customizing this condition in Workflows. Let’s take a look at how to set it up.

{% embed url="<https://lh5.googleusercontent.com/IXm22oTFJhTlRSJXZ8AbuQ81LNFg4MOQWsbfnsKVyq1BeHnuwkKPrmmbl1cnkL87NSe7cgVJftardNVZsvJl9OTEZw8fDeKacZwft5Q63_hA3xh_4UOHUUwwjqbZjefRIZ6WTOjKDfofCIMVOnkUKw>" %}

**Step 1: Create a Workflow**

* Create a new Workflow or edit an existing one.
* Set up your Workflow triggers.

**Step 2: Add the If/Else Condition Event**

* Click the + to add an action to the Workflow.
* Choose the “If/Else” condition.

{% embed url="<https://lh4.googleusercontent.com/qZu-z7RmJNWam0w_R54FFdGa-KPf-INwWpjBVt_UGXiPr96Pq75ib-UXDBJe_DqGsMx0JNTo2FNNH2O0Fsk_g9uPDidNE0iVPf5IByQ0N_HkwJUFccF8WYOTKHyXPjzEj4cpekMqGtp992IkVXqLSw>" %}

* Add one or more **Segments** and **Operators**, choosing from the dropdowns to customize the action. (In the GIF above, I set the condition so anyone with “Los Angeles” as their City, and anyone without the name Bob, would go down 1 path of the workflow. Anyone else would go down the 2nd path.)
  * **NOTE:** You can toggle between “And” and “Or” to decide if you want 1 or more operators to function together or independently. AND implies that both conditions must be met. OR implies any one of the conditions must be met. The first Or that the system runs into will be considered

**Please Note:** You would use conditions to filter as specifically as possible when necessary. You would separate these into multiple segments to dial on specific scenarios.

In the example below, the contact will enter the branch based on an Appointment status trigger at the beginning of the workflow and only if they were tagged for opening an email. Or they will enter the branch if the same trigger caused them to enter the workflow and the contact was tagged for completing a call. (see screenshot below)

{% embed url="<https://lh5.googleusercontent.com/YDjkKwYF99u_6EOsVWb4Z1jj1O3-Moiq5IC06_EfJeK_NdB95WZcbFo8c4FgyAt0aIFpFSy_qAUarAwiVGEtz-uIKT42gAtkIv8XeB7WuVI6c_FnVP2VVa9MfjF58CsHg3KXBze25y643l9XFWDpvas>" %}

**PRO TIP:**

You can add multiple options, or paths, for your If/Else condition to completely customize the Workflow experience.

{% embed url="<https://lh5.googleusercontent.com/p_UvWe6zESDddHbM1nuxO_F81wFY-tzZJ0bb9Q5nE0U1K19KlMaJ8Ph5DfWrDZhVT6fLbS0a3hbvmwIXCjOJ3zdzFJOnudykKCvb2XYQUhMByfIVJrviKyxgea1nSXQYYp8ytX88B9bU2BkL58nPnSI>" %}

**Please note:** The maximum number of branches for a single condition is ten. While you can branch this many scenarios it is recommended to utilize multiple workflows for separation. This makes it easier to troubleshoot and track what is happening in a workflow.

{% embed url="<https://lh5.googleusercontent.com/5-99e2WTw0CUGl48qLwRn0Sa0AnwDJ4B0sFUYWzSZ8NkOQmIbtZMFF58jGg3etd3LD-jpXLwlT6y8UnZ8KuNe6vSUJaCfYqcUw9BnxZ1nFcrQ8FIuvDWfSiUxBjA_k03hrfFa3dezsIjS6Yrw2k95eg>" %}

* To use branches click on add branch and fill out conditions and segments as needed

{% embed url="<https://lh4.googleusercontent.com/R2603RJZ-nTQU50cGudovbGxW8qTH93TigZf4xw0KAUWWFcZSvT0zoXxTqkCfxlIvg-7S1J09u3hlgvgZ0YvqEs8fx7ZV4lFsXg_TBiGEodZLfOVDXZLnmT-zzUSTPETLeRO-NMRXhxg2WlLZTw89ck>" %}

* This will add a branch option

{% embed url="<https://lh5.googleusercontent.com/MiaW5pxTIOb2T-l6XOx06gfrobNQCMFZzPBrSrDIbyFt2qimTfO3SynCggUTqyJcHpzECIrhridQ1vn1wC9jNXfGvIt0i8kXNiR49jBix34dCT9IY7mauuIfpL_KkzF8pKlJfbdLNuarrVo9AVx-jGo>" %}

**Please Note:** It is recommended to use a naming convention for troubleshooting, updating, and organization.

**Note:** None is a branch that exists if none of the conditions, segments, and branches are met. This branch can be used for additional functionality depending on your setup.

**Step 3: Add Additional Workflow Events/Actions**

* Once you’ve added the If/Else condition, you will see a split in the Workflow path with “Yes” and “No”. Based on the filters from your If/Else condition, contacts will go down one of the two paths, and you can customize additional events. In this example, anyone with Los Angeles as their city and *not* having Bob as their first name would receive an SMS under the “Yes” path. Anyone in the “No” path would receive an email and a manual call.

{% embed url="<https://lh4.googleusercontent.com/5Ge0-UhF8UCQvQ9w2EZfsqtceimn_5V8CFDdNtL2Dq2G8LmPUKsSJnLl5uH9P0K2NJzg8SKDGGKqcxyVYBtc4T34put3fxKnmevClhArzVNdJh2l1R3y50HlY0q6R_YeaFBDkAeh-wOXmGf3Oz-x6Q>" %}

* Switch it from Draft > Publish mode for it to function.
* Save and confirm any changes to your Workflow.


---

# 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://software-help-docs.gitbook.io/knowledge-base/software-guide/workflow-actions/workflow-action-if-else.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.
