Conditional Block

The Conditional Block is a fundamental component in Scout Workflows, enabling decision-making processes based on specified conditions. It allows for dynamic branching within workflows by executing different blocks depending on the evaluation of a condition.

Input (Required)

Condition
boolRequired

The Condition parameter must evaluate to either true or false. It serves as the core logic that determines the path the workflow will take. Ensure that the logic you use here correctly reflects the decision criteria needed for your specific use case.

Block On True
stringRequired

The Block On True parameter specifies the block_id of the block to be executed when the Condition evaluates to True. This allows the workflow to dynamically proceed with a specific set of actions based on the condition being met.

Block On False
stringRequired

The Block On False parameter designates the block_id of the block to be run when the Condition evaluates to False. This ensures that an alternative set of actions is taken when the initial condition is not satisfied.

See Workflow Logic & State > State Management for details on referencing Block IDs and Workflow logic.

Best Practices

  • Validate Conditions: Regularly verify that the conditions within the Conditional Block are correctly implemented and accurately reflect the decision logic required for your workflow.
  • Manage Complexity: When using multiple Conditional Blocks, consider the complexity and readability of your workflow to maintain clarity and ease of maintenance.
  • Debugging: Utilize logging and debugging tools to monitor the flow through Conditional Blocks, ensuring that conditions are evaluated as expected and correct paths are followed.