5 min readUpdated Mar 2, 2026

multiConditional Documentation

Overview

The multiConditional Logic component is designed to evaluate each row of input data against a set of conditional rules, routing matching rows to specific output ports based on first successful matching conditions. It effectively allows for complex branching logic in data workflows, where unmatched rows can be routed to an "else" branch. Its efficiency in handling large datasets is significant, performing evaluations with linear complexity relative to the number of rules and rows.

Settings

The configuration for the multiConditional component is flexible and extensive, enabling users to define a variety of rules for data processing. Below are the detailed explanations for each setting.

Rules

  1. Setting Name: rules
    • Input Type: Array of Objects
    • Description: This setting defines the conditions used to evaluate the input rows. Each rule consists of three properties: column, operator, and value. The first matching rule for each row determines its routing.
    • Default Value: Empty Array ([])
    • Effect of Changes: Adding or modifying rules will directly impact how input data is analyzed and routed. An increase in the number of rules can lead to more complex workflows and increase the chance of rows being routed to specific outputs based on the matching conditions.

Output Ports

The multiConditional component creates one output port for each rule defined in the rules array, along with a default "else" output for unmatched rows.

How It Works

The multiConditional component processes input data in a step-by-step manner:

  1. Unwrapping Input Data: It extracts rows from the input data structure, ensuring it operates in an array format.
  2. Bucket Creation: It initializes output buckets corresponding to each rule and the "else" category.
  3. Rule Evaluation: For each row, it performs nested iterations over the defined rules:
    • Checks if the row's value for the specified column meets the rule's condition using the designated operator.
    • If a row matches a rule, it is routed to the corresponding output port, and the evaluation process stops for that row (first match wins).
    • Rows that do not meet any condition are sent to the "else" bucket.
  4. Returning Results: Finally, the function wraps the results so that each output key maintains a consistent format, { data: [...] }.

Expected Data

Input Data Format

The multiConditional component expects the following structure for the incoming data:

Example Input

json
[
    { "status": "active", "revenue": 1200 },
    { "status": "inactive", "revenue": 800 },
    { "status": "active", "revenue": 600 }
]

Use Cases & Examples

Use Cases

  1. Marketing Campaign Segmentation:

    • Business analysts can use the multiConditional component to segment customers based on their interaction status (active/inactive) and purchase history (revenue thresholds). This segmentation can aid in targeted marketing efforts.
  2. Order Processing:

    • E-commerce platforms can route order records based on payment status (paid/unpaid) and order value (high/low) to different processing workflows, ensuring that orders are handled according to their characteristics.
  3. Customer Support Routing:

    • Support platforms can evaluate incoming tickets based on urgency (high/low) and customer satisfaction levels, directing tickets to appropriate support channels based on defined criteria.

Configuration Example

Use Case: Segmenting active customers for a special promotion based on revenue.

Sample Input Configuration

json
{
  "inputs": {
    "input1": {
      "data": [
        { "status": "active", "revenue": 1500 },
        { "status": "inactive", "revenue": 700 },
        { "status": "active", "revenue": 3000 },
        { "status": "active", "revenue": 900 },
        { "status": "inactive", "revenue": 2000 }
      ]
    }
  },
  "config": {
    "rules": [
      { "column": "status", "operator": "equals", "value": "active", "label": "Active" },
      { "column": "revenue", "operator": "greaterThan", "value": "1000", "label": "High Value" }
    ]
  }
}

Expected Output

Given the above configuration, the output could look like this:

json
{
  "output1": {
    "data": [
      { "status": "active", "revenue": 1500 },
      { "status": "active", "revenue": 3000 }
    ]
  },
  "output2": {
    "data": []
  },
  "else": {
    "data": [
      { "status": "inactive", "revenue": 700 },
      { "status": "active", "revenue": 900 },
      { "status": "inactive", "revenue": 2000 }
    ]
  }
}

In this example:

Additional Details

This comprehensive documentation aims to provide a thorough understanding of the multiConditional Logic component, from its purpose and settings to practical applications in various business scenarios.