Conditional Logic
Last updated: Jan 2026
ORCFLO provides the Criteria Check node for conditional branching in your workflows. This AI-powered node evaluates conditions using natural language criteria, making it ideal for decisions that require understanding context, sentiment, intent, or other nuanced aspects of your data.
Criteria Check Node
The Criteria Check node uses AI to evaluate whether input data meets specified criteria. Unlike traditional rule-based conditions, it can understand context, interpret meaning, and make nuanced judgments based on natural language descriptions.
Configuration
| Setting | Description |
|---|---|
| Input Value | The data to evaluate. Reference an upstream step output that contains the content to check. |
| Criteria | Natural language description of what makes the condition true. Be specific and clear about what you're looking for. |
How It Works
When the Criteria Check node executes, it sends your input value and criteria to an AI model which evaluates whether the input meets the specified criteria. The node then returns either true or false, routing execution to the appropriate branch.
Token Usage
Criteria Check uses AI tokens for each evaluation. Write clear, concise criteria to optimize token usage while maintaining accuracy.
Writing Effective Criteria
The quality of your criteria directly impacts how accurately the node evaluates your conditions. Follow these guidelines to write effective criteria.
| Guideline | Example |
|---|---|
| Be specific | Instead of "negative sentiment", write "The customer is expressing frustration, anger, or dissatisfaction with the service." |
| Provide examples | Include examples of phrases or patterns that meet the criteria: "...such as 'this is unacceptable' or 'I'm very disappointed'" |
| Define boundaries | Clarify what doesn't meet the criteria: "Neutral statements or mild concerns do not qualify." |
| Use clear language | Avoid ambiguous terms. Instead of "good quality", specify what makes content high quality. |
Criteria:
The customer message indicates they want to cancel their subscription or
close their account. This includes:
- Explicit requests to cancel, unsubscribe, or close the account
- Expressions of intent like "I want to stop using" or "please remove me"
- Questions about how to cancel or end their membership
Do NOT consider as cancellation requests:
- Complaints without cancellation intent
- Questions about pausing or downgrading
- General dissatisfaction without action requestsBranching Execution
The Criteria Check node has two output handles that route execution based on the evaluation result.
| Branch | Handle Position | When Executed |
|---|---|---|
| True Branch (Green) | Top output handle | When the input meets the criteria. Connect to nodes that handle the positive case. |
| False Branch (Red) | Bottom output handle | When the input does not meet the criteria. Connect to fallback or alternative nodes. |
Input --> Criteria Check (is customer frustrated?)
|
+-- True (top) --> Escalate to Manager
|
+-- False (bottom) --> Send Auto-ReplyOptional Branches
You don't have to connect both branches. If you only care about one case, connect just that branch. The other path simply won't execute any additional steps.
Examples
Sentiment-Based Routing
Criteria Check Configuration:
Input Value: The customer message from the parse_email step
Criteria:
The customer is expressing dissatisfaction, frustration, or anger.
Look for words like "disappointed", "frustrated", "unacceptable",
"terrible", or phrases indicating a negative experience.
Neutral or positive messages do not meet this criteria.
True Branch --> Escalate to Support Lead
False Branch --> Route to Standard SupportContent Quality Gate
Criteria Check Configuration:
Input Value: The draft from the generate_content step
Criteria:
The content needs improvement. Consider it incomplete if:
- It lacks specific examples or data points
- The tone is inconsistent or unprofessional
- Key topics mentioned in the outline are not covered
- Grammar or spelling errors are present
- It's shorter than 300 words
True Branch --> Refine Content (loop back)
False Branch --> Proceed to PublishingIntent Classification
Criteria Check Configuration:
Input Value: The incoming message from the receive_message step
Criteria:
The message indicates interest in purchasing, pricing, or sales.
This includes:
- Questions about pricing, plans, or costs
- Requests for quotes or demos
- Expressions of buying intent ("I'd like to purchase", "we're looking for")
- Questions about features with purchase context
Support questions, complaints, or general inquiries do not qualify.
True Branch --> Route to Sales Team
False Branch --> Route to Support TeamCompliance Check
Criteria Check Configuration:
Input Value: The generated response from the draft_reply step
Criteria:
The response contains any of the following compliance issues:
- Promises or guarantees about future performance
- Specific financial advice or recommendations
- Claims that aren't supported by provided facts
- Personal opinions presented as company policy
- Disclosure of internal processes or confidential information
True Branch --> Flag for Human Review
False Branch --> Send ResponseBest Practices
- Write detailed criteria: The more specific your criteria, the more accurate the evaluation. Include examples of what should and shouldn't meet the criteria.
- Test with edge cases: Try inputs that are borderline or ambiguous to ensure the criteria handles them correctly.
- Test both branches: Always verify that both true and false paths work correctly with appropriate test inputs.
- Handle empty inputs: Consider what should happen if the input is empty or null. Add this to your criteria if needed.
- Keep criteria focused: Each Criteria Check should evaluate one clear condition. For complex logic, use multiple Criteria Check nodes in sequence.
Common Mistakes to Avoid
| Mistake | Fix |
|---|---|
| Vague or ambiguous criteria | Write specific, detailed criteria with concrete examples |
| Not defining negative cases | Explicitly state what should NOT meet the criteria |
| Combining multiple conditions | Use separate Criteria Check nodes for each distinct condition |
| Not testing edge cases | Test with ambiguous, empty, and borderline inputs |
| Overly complex criteria | Keep criteria concise and focused on one evaluation |