Logic OR Component
Use the Logic OR component to check if at least one of multiple conditions is met. This component acts as a gate that allows the workflow to proceed down the "Verified" path if any of its inputs evaluates to true
.
Why this matters
What You’ll Configure
- Understand the Logic
- Provide Inputs
- Handle the Outputs
- Best Practices
- Troubleshooting Tips
- What to Try Next
Step 1: Understand the Logic
The component takes multiple inputs and provides two outputs: Verified
and Unverified
. The Verified
path is triggered if any of the inputs are true
. The Unverified
path is only triggered if all inputs are false
.
In this context:
True
: Any input that has a value (e.g., a non-empty string, any number, the booleantrue
, an object, an array).False
: Any input that is empty,null
,undefined
, or the booleanfalse
.
Operational Rules
Input 1 | Input 2 | Verified Path (Outputs true ) | Unverified Path (Outputs true ) |
---|---|---|---|
True | True | Active | Inactive |
True | False | Active | Inactive |
False | True | Active | Inactive |
False | False | Inactive | Active |
Step 2: Provide Inputs
You can add two or more inputs to the component. These inputs will typically be connected to the outputs of previous components in your workflow.
Action | Description |
---|---|
Add Input | Click the + icon to add a new input field. Give it a descriptive name that reflects the condition you are checking. |
Step 3: Handle the Outputs
The component has two output branches, allowing you to direct the workflow based on whether any of the conditions were met.
Output | Description |
---|---|
Verified | This path executes if at least one of the inputs evaluates to true . |
Unverified | This path executes only if all of the inputs evaluate to false . |
Branching Your Workflow
Best Practices
- Checking for Presence: Use
Logic OR
to check if a user has provided at least one of several optional contact methods. - Handling Multiple Success States: If an
API Call
can return several different success codes (e.g., 200, 201, 202), you can check for each of them with anOR
condition to proceed. - Consolidating Error Conditions: You can use
Logic OR
to check for multiple possible error states. If any of them are true, you can route the workflow to a single, centralized error-handling block. - Keep Inputs Related: For clarity, the inputs to a single
Logic OR
component should represent related conditions (e.g., checking different types of user IDs, not mixing a user ID check with a payment status check).
Troubleshooting Tips
If your logic isn't branching as expected...
What to Try Next
- Use
Logic OR
in combination with Logic AND to build complex conditional flows, such as "(Condition A is true OR Condition B is true) AND Condition C is true." - Use the output of a ForEach Loop to check if at least one item in a list met a certain criteria.
- Create a user validation flow that checks for an account ID OR an email address OR a phone number to identify a user.