Logic AND Component
Use the Logic AND component to verify that multiple conditions are all met simultaneously. This component acts as a gate, only allowing the workflow to proceed down the "Verified" path if every single one 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 only triggered if all inputs are true
. If even one input is false
, the Unverified
path is triggered.
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 | Inactive | Active |
False | True | Inactive | Active |
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 all conditions were met.
Output | Description |
---|---|
Verified | This path executes if all inputs evaluate to true . It outputs the boolean value true . |
Unverified | This path executes if any of the inputs evaluate to false . It also outputs the boolean value true . |
Branching Your Workflow
Best Practices
- Validate User Input: Use
Logic AND
to ensure multiple required fields from a user form are all filled out before attempting to process the data. - Combine Status Checks: If you run several
API Calls
, you can feed their success statuses into aLogic AND
to confirm they all completed successfully before moving on. - Simplify Nested Conditions: Instead of nesting multiple Condition components, use a single
Logic AND
component to check all conditions at once. This makes your workflow much cleaner and easier to read. - Name Your Inputs Clearly: Give each input a descriptive name (e.g.,
isUserAuthenticated
,isPaymentSuccessful
) so you can easily understand the purpose of the logical check.
Troubleshooting Tips
If your logic isn't branching as expected...
What to Try Next
- Use
Logic AND
in combination with Logic OR and Logic XOR to build complex conditional flows. - Connect the outputs of several Classifier Components to a
Logic AND
to verify that a user's request meets multiple criteria. - Place a
Logic AND
after a ForEach Loop to check if a specific condition was met for all items in the array.