Skip to main content

Flows

Flows are the backbone of your bot's conversation structure in Botnex. A flow is a visual representation of the possible paths a conversation can take, designed using an intuitive canvas that connects various nodes to create a cohesive dialogue experience.

What are Flows?

A flow is essentially a blueprint of your bot's conversational logic that imposes deterministic behavior on your bot's interactions. It defines how your bot responds to user inputs, processes information, and guides users through interactions in a predictable and consistent manner. Think of a flow as a sophisticated flowchart that maps out every possible turn a conversation might take, ensuring your bot behaves reliably across all user sessions.

Flow Architecture

Core Components

Nodes: The primary building blocks that represent distinct conversation states:

  • Start Node: The entry point of your flow where conversations begin. Every flow has exactly one start node that acts as the gateway to that flow's conversational logic.
  • Story Nodes: Contains the content (messages, questions) and logic (intents, conditions) of your conversation
  • Transition Nodes: Connect different parts of your flow based on conditions or user responses
  • Add Nodes: Placeholders that let you expand your flow incrementally

Edges: The connections between nodes that define possible conversation paths. Edges determine where a conversation goes next based on user inputs or system conditions.

Steps: Components within nodes that define what your bot communicates:

  • Message Steps: Text or rich content delivered to the user
  • JSON Steps: Structured data handling for integrations and complex logic
  • Other Specialized Steps: Additional components for specific functions

Actions: Decision points within nodes that determine the conversation's direction:

  • Intent Actions: Respond to recognized user intentions
  • Branch Actions: Create conditional paths based on variables or expressions

Fallbacks: Default handling for unexpected inputs or errors, ensuring conversations never reach a dead end.

Start Node Behavior

Every flow contains exactly one start node that serves as the entry point to that flow's conversational logic. The start node has special session-based behavior that makes it particularly useful for certain types of interactions:

  • First-Pass Execution: Any steps and actions added to a start node will only execute on the first pass through for each user session
  • Welcome Messages: This makes start nodes ideal for welcome messages, introductions, or setup logic that should only be displayed once per session
  • Cyclical Flow Support: Even if your flow architecture is cyclical and transitions back to the start of the flow, the start node's steps won't re-execute, preventing repetitive welcome messages or duplicate setup actions

How Flows Work

When a user interacts with your bot, they enter the flow at the Start Node. As the conversation progresses, the flow determines which nodes to activate based on:

  • Recognized Intents: Understanding what the user wants to accomplish
  • Extracted Entities: Important information captured from user messages
  • Satisfied Conditions: Logic based on context variables and conversation history
  • Pre-defined Sequences: Structured conversation paths you've designed

The bot navigates through nodes, executing steps and evaluating actions, creating a dynamic conversation that adapts to user needs while following your designed structure.

The Default Start Flow

Every bot created in Botnex includes a Default Start Flow that serves as the foundation of your conversational experience. This special, automatically generated structure provides your bot with its initial conversation path and starting point.

Key characteristics:

  • Automatically Created: The Default Start Flow is generated automatically when you create a new bot
  • Cannot be Deleted: This flow is essential for bot functionality and cannot be removed from your bot
  • Entry Point: Serves as the main entry point for all user interactions with your bot
  • Flexible Architecture: Can be customized to match your specific needs and use cases

Usage Patterns:

  • Simple Bots: For straightforward conversational experiences, you can use just the single Default Start Flow to handle all user interactions
  • Complex Bots: More sophisticated bots can use the Default Start Flow as a hub that transitions to multiple specialized flows based on user needs or conversation context
  • Scalable Design: Start with the Default Start Flow and add additional flows as your bot's capabilities grow