Workflow Builder - If/Else Conditional Event

If/ Else Branches in Topline OS allow you to control the flow of your code based on certain conditions. The "if" statement is used to check if a certain condition is true, and if it is, a block of code will be executed. The "else" statement is used to provide an alternative block of code to be executed if the condition in the "if" statement is false. This allows for different actions to be taken based on different scenarios.

Please Note: 

info icon
There are several conditional parameters in Workflow Builder where you'll have the option to specify "Includes" or "Does not include" such as Tags and other multiple-option custom fields (checkbox fields, dropdown pickers, etc.)Creating an And condition:

In the example below we are using the AND condition. The system is searching to make sure that the contact Tags - "Does NOT include" both the 'consultation_booked' AND 'consultation_confirmed' tags.

 If one of the two tags is present on the respective contact, then the condition will fail

In this example in order for this contact to go down the "YES" path, both tags would NOT be present on the contact profile/record.


Creating an Or Condition

If your intention is to create an "OR" scenario, you would want to break the two tags into separate conditions and choose the OR option like this:

In this case, if the contact meets ONE or both of the "Or tags" then the condition is true. The system is only looking for one or both conditions to be correct before pushing the contact down the "Yes" path.


If/ Else Branches

Click If/Else

Scroll down and click If/Else action under internal tools, you can add to tailor subsequent actions based on the contact's engagement or characteristics.

preview

Add "Action Name"

Add a name for your action based on your preferences.

preview

Fill Branches

Add branches name to create a unique set of actions for a new contact.

preview

Set Condition

Select the specific condition of the actions that you want to evaluate. Alternatively, you can select and choose the conditions from the drop-down menu.

preview

Select the "Contains" operator.

You can select the contains option by clicking on the drop-down arrow. With the "Contains" operator, you can check if a certain value or substring exists within a larger string. As a result, this operator is particularly useful when performing text search or filtering operations, it is also convenient and quick way to identify if an element is present in a dataset.

preview

Add Tag

Fill in this field with a tag. Adding a tag to a dataset can improve the efficiency to determine whether or not an element exists.

preview

Fill Non Branch

The non branch will be created automatically based on the conditions in the event that the conditions lead to failure.

preview

Click "Save Action"

To proceed to the next step, click on Save action.

preview

Click "Save"

After the action and rules have been added, click on the save button to save the workflow.

preview

Please Note:

info icon
If or else branches support up to 10 different outcomes per event.

What happens when two branches are both true? Will the lead go down both paths?

No, the system will push the lead down the first correct path/branch in your setup. So it goes top down in the order you built the conditions/branches.


Time Comparison Operators

Time Comparison Operators are essential components in workflows used to compare the current date and time with a specified input value. These operators enable workflow automation systems to make informed decisions based on time conditions. The different date and time units that can be compared using these operators include the current day of the week, the current day of the month, the current month, the current year, and the current hour.

Once you choose the specific Time Parameter for which you want to use a Time Comparison Operator for, you need to choose the Time Comparison Operator from the drop down forSelect Operator:


The "Is" Operator

The "Is" comparison operator checks whether the selected date unit is the same as the input value. For instance, "Current Day of the Week Is Monday" will only return true if today is Monday. Similarly, "Current Month Is January" will only return true if it is currently January. For the options like Current day of the Month is, you need to specify the date of the current month like the 1st, 2nd, 3rd .

The "Is Not" Operator

The "Is not" operator, on the other hand, checks if the selected date unit is different than the provided input. For instance, "Current Day of the Week Is Not Saturday" will return true for all days except Saturday.


The "Is After" Operator

The "Is after" operator checks if the selected date unit is after the provided input. However, in the case of hours, this operator only considers minutes that start on the next hour. For instance, "Current Hour Is After 6 PM" will only return true if the time is 7:00 PM onwards because 6:59 PM is still considered inside of 6 PM.

The "Is on or After" Operator

The "Is on or after" operator checks if the selected date unit is on or after the provided input. For hours, this operator considers minutes from the same hour and onwards. For instance, "Current Hour Is On or After 6 PM" will return true for 6:59 PM because it is considered to be "On" 6 PM. And it will also be true for any time after 6PM because of the on or After logic in it.

The "Is before" Operator

The "Is before" operator checks if the selected date unit is before the provided input. For example, "Current Month Is Before June" will return true for all months before June.

The "Is on or before" Operator

The "Is on or before" operator checks if the selected date unit is on or before the provided input. For hours, this operator also considers minutes from the same hour. For instance, "Current Hour Is On or Before 6 PM" will return true for 6:59 PM because it is considered to be "On" 6 PM.


The "Is not empty" or "Is empty" Operator

Lastly, the "Is not empty" operator checks if the field has a value, while the "Is empty" operator checks if the field does not have any value. These two operators are used to ensure that the workflow automation system receives valid input values.


In terms of conditions, here are some guidelines:

info icon
By default, when you are in a list of conditions, if any of the conditions are true, then it will go down the yes path as it is part of the design of the system.

The only way it will go down to no path is if all conditions fail inside your history tab.

System is looking for any true result. If any conditions are true, system will go down yes path. Only way it will go down no path if all result are false.

Did this answer your question?
😞
😐
😁