🧠Logic Components
These components allow you to define conditions, alternatives, and scheduled flows in your SmartFlow workflows. They form a powerful foundation for automating processes based on specific rules.
​
❓ If (Conditional)​
The If
component executes a set of actions only if a specified condition is met.
📝 Component Details​
Name: If
Category: Logic​
🔧 Parameters​
- Condition
- Type:
Expression
- Description: A logical expression that determines whether the subsequent actions should be executed.
- Required: Yes
- Example:
user.age > 18
- Type:
🚀 How to Use​
- Drag and drop the
If
component into your SmartFlow workspace. - Specify the condition that must be true for the actions to execute.
- Connect it to subsequent components or actions.
➡ Else​
The Else
component specifies the actions to execute if the condition of the preceding If
block is not met.
📝 Component Details​
Name: Else
Category: Logic
🔧 Usage​
- Place this component immediately after an
If
block. - Define the actions that will run when the condition in the
If
block is false.
🔄 Else If​
The Else If
component allows you to define an alternative condition to check if the first If
block condition is false. Use this to test multiple conditions in a single flow.
📝 Component Details​
Name: Else If
Category: Logic
🔧 Parameters​
- Condition
- Type:
Expression
- Description: An alternative condition to test.
- Required: Yes
- Example:
user.hasPremiumAccount
- Type:
🚀 How to Use​
- Add an
Else If
block directly after anIf
block. - Specify the alternative condition.
- Connect it to actions or subsequent logic.
❗ End If​
The End If
component marks the conclusion of a conditional block. No additional conditional actions will be executed after this component.
📝 Component Details​
Name: End If
Category: Logic
🔧 Usage​
- Place this component after all conditional blocks (
If
,Else If
, andElse
). - Ensure proper closure of the logic to maintain flow integrity.
❓ If No Message​
The If No Message
component is used to handle cases where none of the previously defined conditions are met.
📝 Component Details​
Name: If No Message
Category: Logic
🔧 Usage​
- Add this component at the end of multiple conditional blocks.
- Define fallback actions or defaults when no conditions are true.
🕒 Scheduler​
The Scheduler
component allows you to delay or plan the execution of workflows.
📝 Component Details​
Name: Scheduler
Category: Logic
🔧 Parameters​
-
Timeframe
- Type: Number
- Description: The amount of time to wait before executing the workflow.
- Required: Yes
- Example:
1 (Days)
-
Specific Time
- Type: Time
- Description: The exact time of day to execute the workflow.
- Required: Optional
- Example:
09:00
🚀 How to Use​
- Add the
Scheduler
component to your workflow. - Set the desired timeframe and time for execution.
- Connect it to the flow logic or actions.
🌟 Full Example Workflow​
Here’s a complete example using the logic components:
- If
- Condition:
user.isLoggedIn
- Actions: Notify the user with a welcome message.
- Condition:
- Else If
- Condition:
user.isGuest
- Actions: Redirect the user to the signup page.
- Condition:
- Else
- Actions: Display an error message.
- End If
💡 Best Practices​
- Keep Conditions Simple: Break down complex logic into smaller, manageable conditions.
- Test Before Deploying: Simulate each flow to ensure the logic behaves as expected.
- Fallback Actions: Always use the
Else
orIf No Message
component to handle edge cases.