In this tutorial, you will learn more about chatbot elements and complete two exercises to get started with designing your chatbot. In Exercise 1, you will learn how to customize your bot’s welcome message, add extra replies, and ensure the bot’s responses vary. In Exercise 2, you will teach your bot to answer specific questions, like 'What movies are on?', by creating intents and adding variations to responses. By the end of this tutorial, you will have learned the basics of chatbot creation.
Start a dialog
The first step in designing a chatbot is creating a dialog in the dialog editor.
In the left menu, go to Build > Dialogs to open the Dialogs overview. From here, select the Main Dialog. You have now opened your first Dialog in the Dialog Editor. We’ve already created some flows for you!
Dialog elements
User start: The starting point for your chatbot. From here, you can add questions and answers to your bot. In the dialog editor, we call those turns.
Turn: Just like in real conversation, chatbots and chatbot users take turns to talk to each other. When it’s the user’s turn, the bot stays quiet and the other way round. In the dialog editor, user turns are green and chatbot turns are blue.
Dialog: A number of turns together form a dialog. In the chatbot in our example, there are two dialogs: one for greeting, and one for a client that really wants to speak to a customer representative.
Tip for Designing Your Conversation
'Welcome' and 'Speak to an agent' are important dialogs in a chatbot. After all, a bot needs somewhere to start. And while a chatbot is really good at answering straightforward questions, when a customer is upset, there's nothing better than human contact.
Exercises
Introduction
Time to take some baby bot steps! In this exercise, you will say hi to your bot for the first time, customize your bot's welcome text, and add an extra bot reply.
Start up your test chatbot
In the Dialog Editor, click the green chat bubble in the lower right corner. This opens a chat window where you can test your chatbot design.
Time to say hi
Step 1: Type 'Hi', hit enter, and see what happens.
As you can see, the bot follows the turns in the flow system.greeting.
Customize your chatbot's welcome message
Step 1: In the Dialog Editor, click on the blue bot reply that contains your bot's welcome message.
Step 2: This opens the Turn Editor on the right-hand side. In the Replies field, change some of your bot's welcome text, and click Save.
Step 3: Open your test chatbot and see the updated welcome message when you say 'Hi'.
Add a follow-up question
Step 1: Click the green + symbol at the bottom of a turn to add another turn.
Step 2: Select Bot from the drop-down menu to add another bot turn.
Step 3: Choose Reply and enter 'How can I help you?' in the Replies field, then click Save.
Step 4: Test your chatbot to see the follow-up question in action.
Add variations
Step 1: Open the Turn Editor.
Step 2: Click on the plus icon after "Add reply variations".
Step 3: Add reply variations like 'What would you like to know about?' or 'What can I do for you?'.
Oh no! I clicked on delete, and now my dialog looks weird!
Does your dialog look something like this, with a loose flow in the right side? This happens when you delete the link that connects the turns in your dialog. Don't worry, you can always connect your flow back to the user start node again.
Step 1: Go to the Default start dialog and click on the link symbol. The dialog editor will only show those turns that you can link to.
Step 2: Look for the message you want to connect and click on the link symbol again.
Step 3: You’ve reconnected your flow and fixed the issue.
You can only link from a higher level turn to a lower level turn, not the other way round.
Great!
You have learned how to:
- Use the test chatbot to see your bot in action
- Edit the text of a bot message
- Add an extra turn to your bot's reply
- Link messages together
Introduction
In this exercise, you will teach your chatbot to answer the question 'What movies are on?'
Create an intent
Step 1: In the Dialog Editor, go to User start and add a user turn. Click the green + symbol to add it.
Step 2: In the Turn Editor, set the node type to 'User'.
Step 3: Enter the intent 'show.movie.list'.
Step 4: In Primary utterance, enter 'What movies are on?' and at least five additional utterances. Ideally, enter around ten. Remember that an utterance is what the user actually says, so use your own words.
Remember: the more utterances you add, the better your bot will become at recognizing user questions and finding the right answer.
Step 5: Save your work. In the Dialog editor, your user turn now displays the intent and your primary utterance.
Add a bot reply
Did you note the red warning icon in your intent? That's because you haven't created a bot reply yet.
Step 1: Enter a bot reply such as 'Tonight, we have The Joker, Little Women, and 1917. Which one would you like?'
Step 2: Add reply variations such as 'We've got some great movies tonight!', 'What about The Joker?' or 'I recommend Little Women if you're in a romantic mood.'
Conversation design tip💡
Not sure how long your turns should be? Take the one-breath test. If you can say your bot turn out loud without taking a breath, you're good to go! If not, try to shorten your bot turn, or add one or two extra text bubbles to split up the bot turn.
Train your chatbot
When you create an intent, your bot needs training to recognize the new utterances and respond correctly. When your bot needs training, it will show a symbol:
The training process might take a while.
Test your bot
After the training, test your bot once more by asking 'What movies are on?' to see how well it responds to the new intent and utterances.
Great!
You have learned:
- The basic concepts of chatbots: intents, utterances, and responses
- How to create an intent
- How to add utterances that help your bot recognize intents
- How to add answer variations
- How to train your bot