Using Filter Conditions
Using Filter Conditions
You can use Filter Conditions to add conditional logic to your Bots. Check for the value of an output field and do actions based on that. You can compare numbers, text data, or see if an output field is empty or no and create the next action accordingly.
Example: If you have a Wufoo form on the website that contains a field like 'Inquiry type'. And you want to add the data to your Salesforce only if the type of inquiry is 'Sales'. Filter app allows you to do that.
How to use the ‘Continue If’ filter
Use the ‘Continue If’ Action checks for a condition and continues the Bot only if the condition evaluates to True. I.e all the Actions after it will Not be executed if the condition evaluates to False.
How to setup
- Choose the ‘Filters’ option from the Apps drop-down and select the ‘Continue If’ action.
2. For ‘Parameter 1’ you can drag an Output Field from the Trigger or a preceding Action.
3. Choose the condition to use, from the ‘Operator’ field.
If you are checking for the existence of a certain text, you may use the Contains – Ignore case option
For comparing numbers, you can use the Greater than, less than, equals options.
You can also check if a certain output field has any value or not, by using the Empty, or Not Empty options.
4. For Operator 2 you can either manually enter a value you want to check against or drag another output field.
How to know the value of the output fields
If you are unsure about the value contained in the Output field you used for Parameter 1, you can find it out by doing a test run. Just Save the Bot with temporary data in Parameter 2, and do a test run. Then go to the Bot's Activity page, and open the most recent activity item. You will see the data of all Output fields listed there.
Using AND / OR Conditions
If you have more than one conditions to check you can use following options
You can add an additional OR condition using the option shown here
Below image is an example of 'OR' Condition. The Slack message Action will run only when the 'Dropdown' output field used in parameter 1 contains text 'Continue' OR 'Proceed'.
You can add any number of OR conditions within a single 'Continue If' action.
The 'Continue If' action does Not provide an option to add an AND option just like the OR action above.
This can, however, be achieved by using Two 'Continue If' actions side by side.
How to add Yes/No paths after a condition?
IF-THEN-ELSE kind of branching is not possible within a single bot. However, it can be done by setting up multiple Bots. One for each of the possible paths.
For example, let's say you have Wufoo form where you have multiple choice and you want to create a branching condition based on Choice.
1. If Choice is 'YES' Update a Task in Asana
2. If Choice is 'NO' Add a Task in Asana.
You will then need 2 Bots like this.
Bot1 will have a Filter condition that checks for 'Yes'
Bot2 will have a Filter condition that will check for No