Add an If Action

You add an If action to evaluate an expression based on conditions and return a 'true' outcome if the expression evaluates to true, and a 'false' outcome otherwise. You use this action typically to execute custom logic, say to validate data before you actually call REST APIs in your action chain.

To add an If action to an action chain:

  1. Open the Actions editor, for example, at the page level.
  2. Create an action chain, or open an existing action chain to add the action in the editor.
  3. Drag If from the Logic section in the Actions palette into the action chain.

    You can drag the action onto the Add icon ( Add icon ) in the action chain, or between existing actions in the chain. The Properties pane opens when you add the action to the chain.

  4. Update the ID field in the Properties pane to make the action more easily identifiable.
  5. In the Condition property, add a condition, for example, [[ $page.variables.selectedEmployee == null ]].
  6. Add actions for the true and false branches to define what should happen when the If action's outcome evaluates to true and false. Here's one possible scenario: