MultiConditionalNodeEditor Overview
The MultiConditionalNodeEditor is a custom editor component within the Vantage analytics platform that allows users to define a set of conditional rules. These rules determine how data is routed to various branches based on specific conditions. The evaluation of these rules follows a top-to-bottom approach where the first matching rule will dictate the branch data is routed to, while any unmatched data is directed to an "Else" branch.
Settings
The MultiConditionalNodeEditor has several settings that govern its functionality. Each setting is critical for determining how the rules are configured and how data is processed within this node. The settings detailed below include their names, input types, behaviors, and default values.
1. Rules
- Setting Name: Rules
- Input Type: Array of objects
- Description: This setting contains the defined rules for data branch routing. Each entry in this array represents a conditional rule. The rules include fields that specify the column being evaluated, the operator to apply, the value to compare against, and an optional label for organization.
- Default Value:
[](Empty array)
Each rule object within the rules array typically contains the following fields:
a. Column
- Setting Name: Column
- Input Type: String (select dropdown)
- Description: The column from the upstream data that is used in the conditional evaluation. Users can select from the available columns derived from the upstream data. Changing this setting alters which data column is being evaluated for the condition.
- Default Value:
''(Empty string)
b. Operator
- Setting Name: Operator
- Input Type: String (select dropdown)
- Description: The operator defines the type of condition to be checked against the selected column. Operators include comparisons (like equals, not equals), text checks (like contains, not contains), and numerical comparisons (like greater than, less than). Modifying this value directly affects the condition applied to the data.
- Default Value:
'equals'
c. Value
- Setting Name: Value
- Input Type: String (text input)
- Description: This field represents the value against which the column's data will be compared. The input expectations for this field depend on the selected operator, where some operators require a value and others do not. Altering this value will change the condition's evaluation criteria.
- Default Value:
''(Empty string)
d. Label
- Setting Name: Label
- Input Type: String (text input)
- Description: Users can assign a label to each rule for easy identification. This label does not influence the functionality but is a helpful annotation for organization and clarity in complex workflows.
- Default Value:
''(Empty string) or automatically generated as “Branch X”, where X is the rule number.
How It Works
The MultiConditionalNodeEditor operates by allowing users to define multiple conditional rules that interact with upstream data. Conditions are highly flexible, supporting multiple operator types, which in turn affect data routing. Each time a new condition is added, it is appended to the end of the list and evaluated during data processing.
Rule Management Functions:
- Add Rule: Creates a new rule with a default setup.
- Update Rule: Modifies an existing rule based on the input parameters.
- Remove Rule: Deletes a specified rule from the list.
- Move Rule: Reorders rules to adjust their priority of evaluation.
Data Expectations
This component is designed to work with upstream data structured in columns, allowing the selection of column names to be part of each rule definition. The data passed to this editor is expected to conform to the standard formats established within the Vantage platform, typically including string and numeric types that are appropriate for rule evaluations.
Use Cases & Examples
Use Case 1: User Segmentation
A marketing team wants to create conditions for segmenting customer data based on user interaction metrics. They want to evaluate "last purchase date" to route users into different campaigns depending on whether they've made a purchase recently or not.
Use Case 2: Data Quality Checks
In an operational dashboard, a data quality team uses this node to validate incoming data against known standards, such as checking whether a field is empty or conforms to a regex pattern to ensure data integrity before processing it further.
Use Case 3: Conditional Event Triggers
An operations team sets conditions to trigger alerts whenever certain financial thresholds are breached, allowing for fast responses to data anomalies.
Example Configuration for Use Case 1: User Segmentation
To segment users based on their last purchase date:
{
"rules": [
{
"column": "lastPurchaseDate",
"operator": "greaterThan",
"value": "30",
"label": "Recent Buyers"
},
{
"column": "lastPurchaseDate",
"operator": "lessThanOrEqual",
"value": "30",
"label": "Inactive Users"
}
]
}In this configuration, users who made a purchase within the last 30 days are classified as "Recent Buyers," while those who have not made any purchases in that timeframe are categorized as "Inactive Users."