How to create a block in a chatbot to split it
How do I create a block in a chatbot to split it?
This article explains how to branch your chatbot based on user responses. Follow these steps to set up routing rules. This ensures customers see targeted content.
In this article, you will learn how to
- Add a Split by condition block to your chatbot.
- Fix setup problems inside the block settings.
Before you start
Before creating a block in a chatbot to split it, make sure you have:
- An existing chatbot to add a Split by condition block.
- An earlier block on the same path whose result you want to check, for example Send rich message, Wait for a reply, Detect intent, or HTTP request.
How to create a block in a chatbot to split it
- Log in to your Flownally workspace.
- Go to the Chatbots tab.
- Click an existing chatbot to edit it, or create a new one to open the editor automatically.
- Click on Add step after a block, or on the + icon on a connecting line, to add a new block.
- Choose the Split by condition block.
- Choose a condition for the chatbot to split:
- In Previous step, choose one of the blocks on this path, for example:
- Send rich message
- Wait for a reply
- Detect intent
- HTTP request
- In Output, choose the result of that block to check.
- In Operator, choose how to compare it: is, is not, contains, is empty, or is not empty.
- In Value, type the value to compare with.
- In Previous step, choose one of the blocks on this path, for example:
- Add the next steps for both paths: Yes for conversations that match the condition, and No for all other conversations.
Important: You can click Use advanced mode to write the condition as an expression. Click Back to simple mode to return.
What happens after creating a block in a chatbot to split it?
After creating a block in a chatbot to split it, your assistant can divide the conversation layout. The system checks the chosen result automatically and sends users down the Yes or No path.
Troubleshooting
Contacts go down the wrong path
This occurs because your condition values do not match the data exactly. You need to verify your condition criteria, for example the operator and the spelling of the value.
Chatbot can't be activated yet because of an expression
This happens because your written expression contains incorrect formatting or is unfinished. The block shows This step contains an unfinished expression. You must check your expression syntax and clear any formatting mistakes.