For the complete documentation index, see llms.txt. This page is also available as Markdown.

Multiple Selection

Overview

The Conditional Switch Case Component (identified in the system by the technical name switch_case) is a flow control node focused on multi-level routing and complex data segmentation. Its main function is to go beyond the binary branching of the traditional IF component, allowing the automation to evaluate a single variable or expression against multiple test scenarios (cases) simultaneously. When processing the contact, the system checks the condition blocks from top to bottom and directs the user specifically to the output port of the first criterion that returns a positive result.

Configuration Parameters

The node parameterization operates through a dynamic list of validations grouped under the section Label and expression:

  • Title: The name or descriptive label given to that specific condition (e.g., "Score 4 or 5"). This text serves to organize the visual editor and name the corresponding physical output port.

  • Expression: Structured field for receiving validation formulas enclosed by double curly brace syntax {{ ... }}. It is the mathematical or textual criterion that determines the success of the branching.

  • Button + Add option: Management control that inserts a new pair of fields (Title + Expression) in the component check list.

  • Trash Icon: Quick delete button fixed in the upper-right corner of each option block to remove obsolete rules from the node.

Visual Builder

The builder interface is designed vertically and modularly, adapting the graphical connection map to the volume of rules inserted by the administrator:

  • Mapping Multiple Output Ports: Unlike common nodes, the physical morphology of this block in the flow design editor is completely mutable. Each new option added by the + Add option button generates a new corresponding side output port, identified exactly by the text entered in the field Title.

  • Default Output Block (Fallback): As displayed at the bottom of the interface of image_3b7aa4.png, the last option is configured as a "Fallback" (or escape route). It has the Expression field intentionally left empty. If the contact goes through all previous expressions and none match, the engine automatically triggers the output port of the Fallback to prevent the customer from getting stuck in the flow.

Special Operators

The logical properties of this component manage continuous syntactic validation and native string analysis methods in JavaScript:

  • Character Inclusion Analysis (.includes()): As illustrated in the panel, the interpreter accepts modern string validation methods, such as {{$data?.first_message.includes("4") || $data?.first_message.includes("5")}}. The method .includes() checks whether the term entered by the user contains that specific character anywhere in the sentence, rather than requiring an exact match.

  • Linear Cascade Prioritization: The engine processes the rules in a strictly linear way (from top to bottom). If a contact matches criteria 1 and criteria 2 simultaneously, the system will route through path 1 because of the reading order, ignoring the lower checks.

  • Instant Synchronous Computation: Just like the IF component, the Switch Case is resolved in microseconds directly in server memory, distributing contacts across the output ports asynchronously and instantly.

Practical Examples

The table below shows classic scenarios for configuring expressions to create intelligent service distributions on the platform:

Option Title (Output)

Configured JavaScript Expression

Type of Validation Performed

Practical Use Case

Score 4 or 5

{{$data?.first_message.includes("4") \| $data?.first_message.includes("5")}}

Partial character search in string (OR).

Analyze the score entered by the customer in a quick survey. Scores 4 or 5 direct the contact to the very satisfied customers output.

Score 3

{{$data?.first_message.includes("3")}}

Partial character search in string.

Identifies users who gave a neutral score (3) to send them to a branch of service focused on improvements.

Score 1 or 2

{{$data?.first_message.includes("1") \| $data?.first_message.includes("2")}}

Partial character search in string (OR).

Immediately isolate dissatisfied customers (scores 1 or 2) to direct the contact with maximum priority to the human retention queue.

Fallback

Empty (No expression)

Automatic escape route by exclusion.

If the customer types random text or a score outside the standard (e.g., "liked it"), the system takes the Fallback output to send a message asking them to enter a valid number.

Last updated

Was this helpful?