Chatbot (Flow Builder)

Message Processing

Updated on January 31, 2026

Overview

The Chatbot Builder processes incoming messages through a structured flow-based system where each conversation follows a predefined path composed of interconnected blocks (neurons). When a message arrives, the system first checks whether this is the first message of the session with the virtual agent. If it is the first message, processing begins at the entry point—the initial non-editable block of the Bot Builder, which serves as the starting point where all conversations originate. If it is not the first message, the system resumes from where the conversation previously paused, continuing from the last processed block.

Once the starting point is determined, the system evaluates the current block to determine its type: a simple send block or a send block with response reception (requiring user input). Blocks can have two stages: a send stage and a receive stage. Both stages may include message preparation phases that involve external API calls, such as integrations with CRM systems like SGP and IXC. For example, the system might send a request to the CRM to identify contracts for a user, receive the API response, prepare a message based on that response, send it to the user, and then wait for the user to select which account they want to proceed with.

After sending a message to the user, the system may or may not wait for user input, depending on whether the block has a reception element. If the block includes reception and the user provides input, the flow is triggered again from the point where the conversation paused. The system recognizes this as a response and processes the response block, finalizing it based on the conditions met. Depending on the condition reached, the block may have multiple outputs, and the system selects the appropriate output to proceed to the next neuron, effectively restarting the entire process with validation stages. This cycle continues until the conversation reaches an endpoint or completes its intended flow.

Message Processing Flow

The following sequence diagram illustrates the complete message processing flow: click here to open in a new tab

Message Processing Flow

During message processing, the Chatbot Builder maintains conversation state, which includes variables, user data, and the current position in the flow. This state persists across multiple message exchanges, allowing the chatbot to remember context, track progress through multi-step processes, and make decisions based on previous interactions. The system also handles error scenarios gracefully, routing conversations to error handling blocks when API calls fail, when validation errors occur, or when unexpected conditions are encountered, ensuring that users always receive appropriate responses even when something goes wrong.

Developers can extend the Chatbot Builder's functionality by integrating with their own APIs. API integrations support two different integration methods, each suited for different use cases and requirements. For detailed information about neuron types and integration methods, refer to the Neurons documentation.