If
The If node enables conditional branching in workflows, allowing you to create different execution paths based on data evaluation. This is essential for building intelligent automation that responds to varying conditions in your logistics operations.
Overview
The If node evaluates data from previous workflow steps and routes execution down different paths based on whether conditions are met. This allows workflows to:
- Handle exceptions - Route delayed shipments to alert workflows
- Process different data types - Handle various file formats or API responses
- Implement business logic - Apply different rules based on customer types or shipment values
- Filter data - Only process records that meet specific criteria
Configuration
Paths
Each If node starts with a Default path and allows you to add multiple conditional paths:
- Default Path - Executed when no conditions are met
- Conditional Paths - Created using the Add Path button, each with specific conditions
Condition Types
Data Type Checks
- Exists - Verify if a field has any value
- Is Boolean - Check if value is true/false
- Is Numeric - Verify if value is a number
- Is Timestamp - Check if value is a valid date/time
- Is String - Verify if value is text
Boolean Operations
- Equal - Value matches exactly (true/false)
- Not Equal - Value does not match
Numeric Operations
- Less Than - Value is smaller than specified number
- Less Than Equal - Value is smaller than or equal to number
- Equal - Value matches exactly
- Greater Than - Value is larger than specified number
- Greater Than Equal - Value is larger than or equal to number
String Operations
- Equal - Text matches exactly (case-sensitive)
- Matches - Text matches a pattern or regular expression
Condition Logic
Combine Options
- ANY - Path executes if any condition is true (OR logic)
- ALL - Path executes only if all conditions are true (AND logic)
Negation
Use the Not switch to invert any condition (e.g., "does not equal" instead of "equals")
Execution Behavior
- Multiple paths can execute - If conditions overlap, multiple paths may run simultaneously
- Independent evaluation - Each path is checked separately
- Default fallback - If no conditional paths match, the Default path executes
- Data inheritance - All paths receive the same input data from previous nodes
Example Usage
Shipment Status Routing
Input: Shipment tracking data
Condition 1: status equals "Delayed" → Send alert email
Condition 2: status equals "Delivered" → Update customer system
Default: Log status for monitoring
Value-Based Processing
Input: Invoice data
Condition 1: amount > 10000 → Require approval workflow
Condition 2: amount < 100 → Auto-approve payment
Default: Standard approval process
File Type Handling
Input: Uploaded file
Condition 1: filename matches ".pdf" → Extract PDF data
Condition 2: filename matches ".csv" → Parse CSV file
Default: Reject unsupported format
Best Practices
Condition Design
- Be specific - Use precise conditions to avoid unexpected path execution
- Test edge cases - Verify behavior with null, empty, or unexpected values
- Order matters - Consider which paths should execute first if multiple match
Performance
- Minimize complex conditions - Simple comparisons execute faster
- Use appropriate data types - Ensure data matches expected condition types
- Limit path count - Too many paths can make workflows hard to maintain
Maintenance
- Document conditions - Use clear path names and descriptions
- Regular testing - Verify conditions still work as data formats change
- Monitor execution - Track which paths execute most frequently
Common Patterns
Exception Handling
Route errors or exceptions to specialized handling workflows while allowing normal processing to continue.
Data Validation
Check data quality and completeness before proceeding with expensive operations like API calls.
Business Rules
Implement company-specific logic like approval thresholds, customer classifications, or regional processing rules.
Multi-format Support
Handle different data formats or API versions in a single workflow by detecting and routing appropriately.