OK, the conversational design itself is definitely a huge thing, but you just want to build a chatbot fast, right? So we’ve prepared this quick-start guide to help you with your first bot on Activechat Visual Chatbot Builder.
We will not be covering some basic things here, so here are some links to keep you up:
You can build bot both from scratch or from any of our ready-made templates, everything described in this article applies to both. Also, it’s a great idea to reverse engineer a couple of templates to see how concepts work.
The big idea
Activechat visual chatbot platform is based on the concept of bot skills. Skill is a simple chatbot conversation that (hopefully) gives some value to the end-user. It can be setting up an appointment, making a purchase, getting an answer to a specific question and so on. You get the idea.
We have a whole education course on conversational design in our Chatbot Academy, but for now, let’s just scratch the surface. You should try to split your complex chatbots into many different skills – it will make your conversations easy to manage, analyze and improve.
There are two basic skills that are common for each and every chatbot. They are “start” and “default”.
“Start” skill is triggered when the user starts communicating with your chatbot for the first time. Usually, it contains some kind of personalized greeting and a small onboarding sequence – like telling the user what this bot can do and how to get most of it.
“Default” skill is triggered when the user is sending any message to your chatbot. Based on your bot purpose and available features it makes sense to check what this message is about and choose specific conversation flow (skill) based on message content. Easy, eh?
No surprise that you have “start” and “default” skills pre-built into every bot you create with Activechat.
Step 1 – Build a chatbot onboarding sequence
So, first of all, you should add something to your “start” skill. Here is a simple example from our Restaurant chatbot template and resulting message sequence in Messenger (click on the images to enlarge).
What’s happening here? Note the use of the CATCH block to listen to the “start” event and execute everything else in this skill when this event is triggered.
Next, we’re using the TEXT block to display a simple welcome message to new bot users. Notice the use of $_first_name system variable (attribute) to personalize that message with the user-specific first name that bot is getting from Facebook.
And finally, we’re using the GALLERY block to display a scrollable carousel that will act as a chatbot menu. Notice the use of another CATCH listening to “main_menu” event – it allows you to trigger that event anywhere else in the bot with the SEND block later to jump the conversation to this menu again.
Each card in this gallery contains three buttons that trigger different bot skills. Nice and easy chatbot navigation.
Step 2 – Teach a chatbot to answer users
Now when you have your onboarding sequence in place, it’s time to decide how the bot should react to incoming messages from its users. And there are three basic approaches to this.
No incoming messages allowed
This is the easiest (although, not the smartest) option. It is supposed that you build every possible interaction with your chatbot user through buttons and quick replies and do not expect any free-form input (strictly decision-tree-based conversation model).
In this case, all you have to do in the “default” block is put some “no messages accepted” message and then forward the user to the button-based menu. We’re doing this with the event button that triggers the “main_menu” event – when the user clicks this button, the bot will jump to the main menu that we added to the “start” skill.
Simple keyword detection
If you want to build a chatbot that will understand what users say, you should either use keywords or natural language understanding. Let’s start with keywords, i.e. when your chatbot is looking for specific keywords in the message sent by the user and start specific skills when a keyword is detected. This can easily be achieved through the use of the SWITCH block as shown in the example below (it’s from our Restaurant bot template – feel free to explore it and customize!)
What exactly is happening here? We’re checking if system variable $_last_user_input (guess what? it always contains the last message that bot received from the user!) contains any of four keywords “menu”, “reservation”, “direction” or “call”, triggering specific skill for each of these keywords with the SEND block. If none of these keywords are detected, the bot will type “Not sure about this, sorry” message followed by a redirection to small persistent block with a menu built from quick replies (the same as in “start” sequence).
Natural language understanding
And finally, the most advanced technology to make your bot understand its users is natural language understanding through machine learning. We’re using 3rd party solutions for this, specifically Dialogflow by Google.
All you have to do is build your Dialogflow agent and teach it some basic intents. When you connect Dialogflow agent to Activechat, every intent will convert into bot skill which you can build to help users with their requests.
A good example is the “FAQ bot with NLP” chatbot template that we have – please check it to see how it works.
In this case, the “default” skill would just be forwarding the user’s message to the NLP engine with the NLP block.
Step 3 – Test and refine
Congratulations! When you’ve done with these two basic skills (“start” and “default”), your bot is ready to start talking to real users! Now it’s time to connect it to Facebook Messenger and mark “build a chatbot” item as done in your daily TO-DO list. Don’t forget to check conversations history occasionally and improve your flow based on what you learn from there!