IF element

Test against an expression and if it evaluates to a truthy value, execute the Then flow container. You can also add Else If elements into the Else If flow for additional cases. Lastly, you can add elements to the Else flow as a fallback.

When to use?

Whenever you have a condition that dictates the flow of a part of your skill, you can use this element to junction these possible outcomes.

How to use:

  1. In the Test field, enter any expression that you want to evaluate. For example, ${result.number == correctNumber}
  2. Add the elements you wish to execute if the expression is truthy in the Then flow.
  3. In the Else If flow, you can place special Else If elements that also have a Test property and a Then flow. These can be used to test for other cases so that you don't have to chain If elements.
  4. Lastly, in the Else flow, you can place elements that will trigger in case the expression evaluates to a falsy value.