The CHOICE node evaluates conditions and routes flow execution to different branches based on the result.Documentation Index
Fetch the complete documentation index at: https://hypha-docs.plinqx.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
CHOICE nodes enable:- Conditional Logic: Branch based on expressions
- Multiple Branches: Define multiple condition branches
- Default Branch: Fallback branch when no conditions match
- First Match Wins: First matching condition executes
How It Works
Condition Syntax
Conditions use JavaScript expressions with variable substitution:- Variable Access:
{{node.field}}→ replaced with actual value - JavaScript Operators:
==,!=,>,<,>=,<=,&&,|| - Functions: String, number, and array functions available
Example Conditions
Configuring Branches
Branch Output
CHOICE node provides output about which branch was taken:Best Practices
Order Matters
Place most specific conditions first
Use Default
Always include a default branch
Clear Labels
Label branches clearly for readability
Test Conditions
Test all branch conditions thoroughly
Common Patterns
Status-Based Routing
Value Range Checking
Method-Based Routing
Next Steps
PARALLEL Node
Execute multiple branches in parallel
FOREACH Node
Loop over arrays