π§ 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 Ifcomponent 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 Ifblock.
- Define the actions that will run when the condition in the Ifblock 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 Ifblock directly after anIfblock.
- 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 Schedulercomponent 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 ElseorIf No Messagecomponent to handle edge cases.