This guide shows how to create a workflow with multiple if-conditions.
- Okta Workflows
Using the If/Else card
Workflows has the Branching – If/Else card that specifies one condition.
- In the following example, the card is checking if Notify count < 3:
The Branching – If/Else card does not support specifying multiple conditions.
Using the Compare and the And cards
Use the True/False – Compare card to create multiple if-conditions.
Three conditions must be checked:
Notify count < 5 AND Division == 'Sales' AND Department == 'Marketing'
Using the Compare card, the flow looks like this:
The flow works like this:
- The flow has three Compare cards.
- Each Compare card is a single if-statement.
- The Compare card output is true or false.
- The result from each Compare card is passed to the True/False – And card.
- The And card acts as the card with multiple if-statements.
If the outcome of the three Compare cards is true, then the outcome of the And card will be true. It looks like this:
If one of the conditions evaluates to false, then the And card will evaluate to false. In this example, the third condition evaluates to false:
Using the Compare and the Or cards
Also, use the True/False – Or card. The Or card will evaluate to true (since one of the inputs is true):
The True/False card has other functions that can be used:
- All False?
- And
- Any False?
- Compare
- Expression
- Not
- Or
- Or (Exclusive)
- XNOR
Read the True/False card documentation.
Related References
