AltScore
Builder Rules

Connection Rules

Connections define the execution path of your conversational flow. The builder enforces several rules to ensure connections create valid, executable flows.

General Rules

No Self-Reference

A node cannot connect to itself. This rule prevents infinite loops within a single node.

Invalid:

Node A → Node A  ❌

No Duplicate Connections

Each connection between two nodes must be unique. You cannot create multiple identical connections between the same source and target nodes.

Invalid:

Node A → Node B (connection 1)
Node A → Node B (connection 2)  ❌

No Circular Dependencies

While some looping patterns are allowed in flows, direct circular dependencies that could cause infinite loops are prevented by the validator.

Connection Limits by Node Type

Each node type has specific limits on how many outgoing connections it can have:

Single Output Nodes

Most nodes have a single outgoing connection:

Node TypeMax Connections
START1
MESSAGE1
ASK QUESTION1
ASK EMAIL1
ASK PHONE1
ASK DATE1
ASK FILE1
SET VARIABLE1
END0

Multiple Output Nodes

Some nodes support multiple outgoing connections based on their configuration:

Node TypeMax ConnectionsNotes
INTERACTIVE OPTIONSN + 1N = number of options configured
CONDITIONAL3True, False, Default branches
LOGIN3Success, Error, Not registered
OTP VERIFICATION3Verified, Failed, Max attempts
WORKFLOW EXECUTE2Success, Error
HTTP REQUESTN + 1Based on response handlers
AI ROUTERN + 1N = number of routes
OPT-IN2Accepted, Rejected
GLOBAL KEYWORDSN + 1N = number of keywords

Connection Handles

Some nodes have specific connection handles (output points) for different scenarios:

Conditional Node

  • output-true - When condition evaluates to true
  • output-false - When condition evaluates to false
  • output-default - Default fallback

Login Node

  • output-success - Authentication successful
  • output-error - Authentication failed
  • output-not-registered - User not found

Workflow Execute Node

  • output-success - Workflow completed successfully
  • output-error - Workflow failed

Valid Connection Patterns

Sequential Flow

START → MESSAGE → ASK QUESTION → MESSAGE → END

Branching Flow

START → CONDITIONAL
        ├── (true) → MESSAGE A → END
        └── (false) → MESSAGE B → END

Interactive Options

START → INTERACTIVE OPTIONS
        ├── Option 1 → MESSAGE A
        ├── Option 2 → MESSAGE B
        └── Option 3 → MESSAGE C

Invalid Connection Patterns

Self-Reference

MESSAGE → MESSAGE (same node)  ❌

Direct INTERACTIVE to INTERACTIVE

INTERACTIVE OPTIONS → INTERACTIVE OPTIONS  ❌

Solution: Add a MESSAGE or other non-interactive node between them.

Missing Required Connections

CONDITIONAL with only "true" branch connected  ❌

Solution: Connect all required branches or use the default branch.