Tracking code installation
Tracking page visits
Intents and Entities
Building Dialogflow agent and connecting to Activechat
Sending user input to NLP engine
Triggering bot skills by intents and events
Working with entities
NLP best practices
Sending order updates
OK, conversational design is definitely a huge thing, but you want to get up and running fast, right? So we prepared this quick-start guide to help you with your first bot on Activechat Visual Builder.
We’ll not be covering some basic steps here, so 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 use a template to see how concepts work.
There are two basic skills that are common for each and every chatbot. They are “start” and “default”.
“Start” is something that happens when user starts communicating with your chatbot for the first time. Usually it is some kind of personalized greeting and a small onboarding sequence – like telling the user what this bot is good for and how to get most of it.
Next comes “default” and this is something that happens when user is sending any message to your chatbot. Based on your bot functions it makes sense to check what this message is about and choose specific conversation flow based on message content. Easy, eh?
No surprise that you have “start” and “default” skills pre-built into every bot you create with Activechat.
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 happens here? We’re using DATA block to set total number of orders for this user to zero, and then send him/her a couple of welcome messages (TEXT blocks) followed by a simple chatbot menu – LISTEN block with some ready-made quick replies, each triggering specific skill in the bot. If you forget what skills are – check this article Conversation elements – skills, blocks, events and checkpoints
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.
This is the simplest (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 button-based menu.
This method lets you search for specific keywords in the message sent by user and start specific skills when a keyword is detected. This can easily be achieved through the use of SWITCH block as shown in example below (againg, taken 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 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 SEND block. If none of these keywords are detected, we send “Not sure about this, sorry” message followed by a redirection to small persistent block with menu built from quick replies (the same as in “start” sequence).
And finally the most advanced technique 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 this agent to Activechat, every intent will convert into bot skill which you can build to help users with their requests.
A good example is “FAQ bot with NLP” chatbot template that we have – please check it to see how it works.
In this case “default” skill would just be forwarding user’s message to NLP engine with NLP block.
When you’ve built these two basic skills (“start” and “default”), your bot is ready to start accepting real user conversations. Don’t forget to check conversations history in “Users” tab and change your flow based on what you learn from there!