Condition
The Condition action allows you to evaluate specific variables or user inputs and split your flow depending on the values.
You might use Condition:
-
If the day of the week is a day the office is closed, play audio requesting to call during days the office is open.
-
If the time of day the call comes in is when the office is closed, play audio requesting to call during times the office is open.
-
If the sentiment of a text equals an unacceptable sentiment, direct the text sender to receive a coupon.
To add a condition, click +.
When you use Condition, you can check for more than one item. In this case, the action checks to ensure all conditions are true before continuing to the next step in the flow.
Note: If you have multiple conditions and the results of one specific condition matter later on for data analytics purposes (for example, knowing whether an individual condition was true or false), that Condition should be evaluated by itself. This action only returns a true or false without details about which specific Condition is false.
Available Variables
Available Variables are placeholders for information that are automatically determined based on the contents of your flow. For example, if your flow begins with an Inbound Call trigger, the caller's phone number is stored as a $ANI variable. Later on in your flow, you can send a follow up SMS to the caller by adding the $ANI variable in the Send SMS/MMS action Inputs.
Check out How to Use Variables in SmartFlows for more information.
Inputs
Configure the following inputs to set up this action:
Input Name | Description | Default |
---|---|---|
Variable | The variable to be evaluated for a specific condition. You can create a custom variable or use existing system variables. | User Input Required |
Rename | Assign a name to any custom variable you are using. | User Input Required |
Condition |
Similar to math operations, this is used to compare the Variable and the Value: equals, not equals, contains, string contains, less than, greater than, or between. Note: Use "Contains" to evaluate a literal value vs. "Contains Variable" to evaluate a variable. |
User Input Required |
Value |
The value being checked for. Note: This field is case sensitive. |
User Input Required |
Action
Each Condition action includes two exit ports corresponding to the following outcomes:
-
If All Conditions True: The course of the flow if all the conditions are true (port 1)
-
On False: The course of the flow if one condition is false (port 2)
Example
In this example, the Condition action looks for the system variable for the day of the week to equal Sunday. If the day is Sunday, the flow could be configured to play audio that explains your office is closed and to call back on a business day.
Note: Our Switch action is similar to Condition, but with Switch the flow continues through the path of the first true statement.