Last week, we started discussing the different nodes available for use in the Workflows, starting with the Match node. Back then, we stated how important it was to perform a Match, so the Workflow knows with which dataset it should work.
However, it is possible to create a Condition node that checks if there was a match made, allowing you to set up different automation flows for that eventuality. In the same way, you can set up a Condition node for different kinds of conditions.
When you drag a Condition node into the workflow, it will immediately look like this:
The red animation (not shown in the picture above) shows that it still requires some input. Until that input is given, the Workflow will not be able to operate. The left branch and right branch will be the different brances that will be followed when the condition is determined to be either true or false.
Clicking on the pencil icon will open the following screen:
The ‘Title’ field will allow you to give the node a title that is visible in the Workflow screen, so you can easily recognize what is checked in the Condition.
In the black field, you can enter the condition that is required to be checked. For example, in order to check if the Match Variable that was to be filled in the Match step has actually been filled, you can check for the ‘matched’ field in that Variable. This is a binary field that will be set to ‘true’ if it has been filled with a matched record.
In order to check for any field in a variable, you will want to use the syntax of ‘variablename.fieldname’. For the example of checking if a match has been found in the database during the match step, that would be ‘MatchData.matched’.
Checking for it to be set to ‘true’ would look like this:
After clicking on ‘Ok’ on this screen with the data above, the node will change to reflect the new contents that have been entered:
Now, you can start filling out the different branches. The ‘Yes’ branch will be followed when the Condition turns out to be true, while the ‘No’ branch will be followed when it is is decided to be false.
Of course, the Condition node doesn’t only need to check the ‘Matched’ field. Additional examples of things that could be checked in the Condition field is whether a field contains specific data, like the answer to a ‘yes’ or ‘no’ question in the form that started the Workflow, or the presence of specific data, like an email address to send any emails to.
Next week, we are going to continue with the Workflow nodes, paying attention to the ‘Await Events’ node and the newest, recently created node called ‘Await Time’.