If Else Integration

Overview

The If Else integration allows you to add conditional logic to a Decimal workflow. It evaluates a condition and determines whether the workflow should proceed based on the result.

This node is used to:

  • Make decisions inside workflows

  • Branch logic based on data values

  • Validate API responses

  • Control execution flow dynamically

If Else is a core control node and is commonly used after API calls, data transformations, or variable assignments.


Available Module

If Else

Evaluates a comparison between two values and returns a boolean result that can be used to control downstream workflow execution.


When to Use If Else

Use If Else when:

  • You need to compare values (numbers or strings)

  • Workflow behavior depends on runtime data

  • You want to validate conditions before proceeding

  • You want to prevent invalid or unsafe actions

Typical use cases include:

  • Checking API response values

  • Comparing token prices or balances

  • Validating status codes

  • Enforcing thresholds or limits


Adding If Else to a Workflow

  1. Open the Decimal workflow editor

  2. Add a Trigger or connect from an existing node

  3. From Control, select If Else

  4. Connect the node to the previous step in the workflow

Once added, the If Else Settings panel opens automatically.


Module Configuration

Left Value Path

The Left Value Path defines the value to evaluate from the current workflow context.

  • Uses dot or bracket notation

  • Refers to data produced by previous nodes

Example:

httpResult[0].responseData.bitcoin.usd

This field is required. If empty or invalid, the node will not execute.


Operator

Select the comparison operator to apply.

Supported operators include:

  • Equals (==)

  • Not Equals (!=)

  • Greater Than (>)

  • Less Than (<)

  • Greater Than or Equal To (>=)

  • Less Than or Equal To (<=)

Choose the operator based on the type of comparison required.


Right Value

The Right Value is the value to compare against.

  • Can be a number or a string

  • Must match the expected type of the left value

Example:

113000

This field is required.


Result Variable Name

Defines the variable name that will store the boolean result of the condition.

Default example:

conditionResult

The result will be:

  • true if the condition passes

  • false if the condition fails

This variable is available to all downstream nodes.


Output & Variables

After execution, the If Else node stores the result as a boolean variable.

Example usage:

conditionResult === true

This result can be used to:

  • Control branching logic

  • Gate critical actions

  • Trigger follow-up steps conditionally


Example Workflow

Use Case: Execute logic only when a condition is met.

Workflow:

  1. Trigger

  2. Call API (fetch data)

  3. If Else (validate condition)

  4. Execute next step only if condition passes

This allows workflows to behave dynamically based on real-time data.


Last updated