With the FlowMattic version 1.5.0, we introduced a featured that allows you to execute an action step only if certain conditions meet. You can set the conditions as per your requirements.
Conditions are a way to ensure the action step get performed only if data is as per your requirement. With conditional logic for action steps, you set a specific condition to get to the granularity you need.
For instance, you can set up a the conditions to pass only if emails are from a specific domain or only if order data has a specific product. So when the data from your workflow meets the conditions, it executes that action step. If a conditions does not pass, the action step won't get executed, and will be skipped. The workflow execution will continue to the next steps.
Setting up conditions
In your action step, scroll down to the bottom, and you will see an option box titled "Enable Conditional Execution".
Once you check the box against Execute This Step Only if Conditions Meet, you'll see options to set your conditional logic for the step. You can set conditions as per your requirements with AND / OR statements as well.
The second field "Choose Condition" is the most important field, as it determines how to check the data. Here's an example table that will help you understand how each condition rule works.
Rule | Value | Examples that would pass | Examples that wouldn’t pass |
---|---|---|---|
(Text) Contains | Apples and bananas | Apples Apple Apples and bananas | Strawberries |
(Text) Does not contain | Apples and bananas | Strawberries | Apple |
(Text) Exactly matches | Apples | Apples | Apple (not plural) apple (not uppercase) |
(Text) Does not exactly match | Apples | Apple Banana And more | Apples |
(Text) Is in | Apples, bananas | Apples Bananas | Apple Banana Strawberries |
(Text) Is not in | Apples, bananas | Strawberries Apple | Apples Bananas |
(Text) Starts with | App | Apples Applesauce | Apricots Bananas |
(Text) Does not start with | App | Apricots Bananas | Apples Applesauce |
(Text) Ends with | s | Bananas Apple and bananas | Apple |
(Text) Does not end with | s | Apple Banana | Apples Bananas |
(Number) Greater than | 10 | 11100 | 9-1 |
(Number) Less than | 10 | 9-1 | 100 |
(Date/time) After | 12/31/2018 1:00 | 01/01/2019 12/31/2018 01:01 | 12/31/2017 |
(Date/time) Before | 12/31/2018 1:00 | 12/31/2017 | 01/01/2019 |
(Date/time) Equals | 12/31/2018 1:00 | 12/31/2018 1:00 | 12/31/2019 12/31/2018 00:00 |
Exists | n/a | Apple 10 01/01/2019 | |
Does not exist | n/a | Apple 10 01/01/2019 |
There are five types of condition rules: text, number, date/time, boolean, and generic.
Text conditions
Text filters only work with text data. Text data can be anything between a-z A-Z 0-9 or symbol as well.
- Contains: Checks if the field contains a value. This is not case-sensitive.
- Does not contain: The opposite of Contains, this checks that the field does not contain a value. This is not case-sensitive.
- Exactly matches: Checks if the field matches a value letter-for-letter. This is case-sensitive.
- Does not exactly match: Checks if the field does not match a value letter-for-letter. This is case-sensitive.
- Is in: Checks if a field is in a list of values. This is not case-sensitive.
- Is not in: Checks if a field is not in a list of values. This is not case-sensitive.
- Starts with: Checks if a field begins with a certain value. This is not case-sensitive.
- Does not start with: Checks if a field does not begin with a certain value. This is not case-sensitive.
- Ends with: Checks if a field ends with a certain value. This is not case-sensitive.
- Does not end with: Checks if a field doesn’t end with a certain value. This is not case-sensitive.
Number conditions
Number condition rule only work with numeric values, like 1 or 100. They do not work with written forms of numbers (one, two, one hundred) or dates.
- Greater than: Checks if a field is greater than a certain number.
- Less than: Checks if a field is less than a certain number.
- Date/time
- After: Checks if a date is after a certain date.
- Before: Checks if a date is before a certain date.
- Equals: Checks if two dates are identical.
Boolean conditions
- Is true: Checks is a boolean value is true.
- Is false: Checks if a boolean value is false.
Generic conditions
- Exists: Checks if a value exists (can be used with any type of field).
- Does not exist: Checks if a value doesn’t exist (can be used with any type of field).
On Conditions Meet
If you conditions meet, the action step you configured the conditions for, will be executed and response from the app or service will be returned to the workflow. Then you can map the data in the next steps.
On Conditions Fail
If you conditions does not meet, only that action step will not get executed and it will be skipped to the next action steps in the workflow and your workflow will be executed.