Skip to main content

🧠 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.

c6c87a85-c072-486b-a78b-2fd8421e2741.png​

❓ If (Conditional)​

The If component executes a set of actions only if a specified condition is met.

8ae73d88-406a-4dc3-9bd2-6395671b4b0c.png

πŸ“ Component Details​

Name: If
Category: Logic​

πŸ”§ Parameters​

  1. Condition
    • Type: Expression
    • Description: A logical expression that determines whether the subsequent actions should be executed.
    • Required: Yes
    • Example:
      user.age > 18

πŸš€ How to Use​

  1. Drag and drop the If component into your SmartFlow workspace.
  2. Specify the condition that must be true for the actions to execute.
  3. 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.

5cf60501-b723-44ba-b7f0-d9e11b9c4fc5.png

πŸ“ Component Details​

Name: Else
Category: Logic


πŸ”§ Usage​

  1. Place this component immediately after an If block.
  2. 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.

14c2bdfb-8bdf-499c-b582-9500ecc3e8c9.png

πŸ“ Component Details​

Name: Else If
Category: Logic


πŸ”§ Parameters​

  1. Condition
    • Type: Expression
    • Description: An alternative condition to test.
    • Required: Yes
    • Example:
      user.hasPremiumAccount

πŸš€ How to Use​

  1. Add an Else If block directly after an If block.
  2. Specify the alternative condition.
  3. 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.

93cd72ca-8b19-4cff-8e04-d60843fa11de.png

πŸ“ Component Details​

Name: End If
Category: Logic


πŸ”§ Usage​

  1. Place this component after all conditional blocks (If, Else If, and Else).
  2. 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.

0e0eeb00-0feb-4027-ac49-e6b3e0800239.png

πŸ“ Component Details​

Name: If No Message
Category: Logic


πŸ”§ Usage​

  1. Add this component at the end of multiple conditional blocks.
  2. Define fallback actions or defaults when no conditions are true.

πŸ•’ Scheduler​

The Scheduler component allows you to delay or plan the execution of workflows.

96e48de2-9228-4f53-9d7c-737aa57902bb.png

πŸ“ Component Details​

Name: Scheduler
Category: Logic


πŸ”§ Parameters​

  1. Timeframe

    • Type: Number
    • Description: The amount of time to wait before executing the workflow.
    • Required: Yes
    • Example:
      1 (Days)
  2. Specific Time

    • Type: Time
    • Description: The exact time of day to execute the workflow.
    • Required: Optional
    • Example:
      09:00

πŸš€ How to Use​

  1. Add the Scheduler component to your workflow.
  2. Set the desired timeframe and time for execution.
  3. Connect it to the flow logic or actions.

🌟 Full Example Workflow​

Here’s a complete example using the logic components:

  1. If
    • Condition: user.isLoggedIn
    • Actions: Notify the user with a welcome message.
  2. Else If
    • Condition: user.isGuest
    • Actions: Redirect the user to the signup page.
  3. Else
    • Actions: Display an error message.
  4. 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 or If No Message component to handle edge cases.