Linear experience is never enough, so it’s a good idea to have at least a few different scenarios to make your bot more diverse. In this article you’ll learn how to route users through your bot based on the responses they provide to the bot’s questions.
Visit the Chatfuel Dashboard to find an existing template that will give you a practical look at how to make your bot more diverse.
Now let’s get into details. Say we’re building a bot for a vacation rental in Amsterdam. To branch out later you need to start with the basics, such as a question and a couple of quick reply buttons that save the answer to a user attribute:
These two buttons are two separate routes for your users to follow. To create these routes you’ll need the Go To Block plugin, which, depending on what answer the user chooses, will lead them to different blocks.
So, to provide those who pressed “First time” with the basic information, you need to create a Go To Block card right after the step which collects the attribute for further routing (be it Quick Reply, User Input or Set Up User Attribute). The Go To Block Plugin is where you assign the user attribute you’ve received earlier with the same value as the answer. This will create a filter you can see in the picture below, thanks to which the user will be routed to the specific “Must-know facts” block.
It is possible to set up several target blocks, and in this case the user will be redirected to one of them randomly. To enable this, you need to toggle the “Random” switch.
Note how you can also skip the step of creating filters in this case, so all users who have clicked “Been here before” will be redirected to any of the blocks listed.