Logic: If
The “Logic: If” task splits the execution of a workflow into two branches based on the conditional statements that you define.
The returned evaluation of your conditional statements must be either True
or False
. You can then define a downstream task for the On True or On False condition.
Task settings
On the Condition tab, enter the if-clause in Liquid and the returned evaluation must be either True
or False
. True
and False
must be spelled with the first letter capitalized.
If you want to use a Liquid variable that is defined in an upstream task in the current task, you must select Skip Validation. Otherwise, the variable cannot be parsed.
Examples
Here is an example of the conditional statements for evaluating the size of an array and the two branches created after this “Logic: If” task.
{% if Data.Subscription.size > 0 %} True {% else %} False {% endif %}
For more examples, see the following articles: