Use multiple conditions in workflows
Last Update: Nov 2024 • Est. Read Time: 2 MINWhen adding multiple conditions in a condition step in a workflow, you may need to decide whether all, or only one, of the conditions in your list should be met.
This guide explains when to choose Multiple Conditions (or) or Multiple Conditions (and) for a list of conditions.
Who can access this feature? | |
User types | Admins can access the Workflows page. |
In this article:
- Prerequisites
- Create a condition step with multiple conditions
- When to use Multiple Conditions (or)
- When Not to use Multiple Conditions (or)
- When to use Multiple Conditions (and)
Prerequisites
Before following this article, we recommend that you are comfortable with the basics of using workflows.
Create a condition step with multiple conditions
Before or after any action step in a workflow, add a condition step. Let's say you want this step to have more than one condition, or a list of conditions to check against.
You will be prompted to choose Multiple Conditions (or) or Multiple Conditions (and) as soon as you add a second condition.
When to use Multiple Conditions (or)
Use Multiple Conditions (or) if only one in the list of conditions needs to be met.
For example, let's say you have the following conditions:
- Conversation is assigned to the Email Team.
- Conversation is in the Email Queue.
- Conversation channel includes Email.
Selecting Multiple Conditions (or) will check the object against the list of conditions, in the order they are listed, from top to bottom.
In this example, this will allow conversations matching only one of these attributes to pass the condition step.
You can also use Multiple Conditions (or) for a set of negative conditions, but only if the object needs to match just one condition, and not all.
In the below example, you can use the 'or' option if the object needs to match only one condition to proceed with the rest of the workflow steps:
- Conversation is not in Done status.
- Conversation is not assigned to a user.
- Conversation does not have an assigned team.
When not to use Multiple Conditions (or)
Do not use Multiple Conditions (or) for a set of negative conditions, if you want them all to be met.
For instance, you want conversations matching the below conditions, to be marked done, or closed, by a workflow:
- Conversation is not from a VIP client.
- Conversation is not related to a complaint.
- Conversation is not in the Escalations queue.
Instead of using 'or', you will use Multiple Conditions (and) in this scenario, since you want the conversation not to be from a VIP client, nor be a complaint, nor be in the Escalations queue.
If you use the 'or' option, then a conversation that is not from a VIP client, but is a complaint, will pass the condition check, as it will have met the first 'or' condition on the list, and will be marked done.
When to use Multiple Conditions (and)
Use Multiple Conditions (and) if all conditions on the list need to be met.
This goes for a set of positive conditions (for example, exists, contains, or equals):
or a list of negative conditions (for example, does not equal, does not contain, or does not exist):