In the following example, we’ll build together a simple chatbot that takes coffee orders.
What will you learn in this tutorial
- how to create a new story and add various interactions
- how to use different bot responses and actions: text, carousel, go to and more
- you will know how to create and use user entities
- become the master of using attributes
Before even entering the ChatBot dashboard, decide what do you want your chatbot to do. Maybe you need a bot that answers frequent questions, gets leads or takes orders. Take a pencil and draw the main bot’s step.
In this tutorial, we’ll be building a simple bot that takes coffee orders and shows the menu. Take a look at the bot’s plan. Each circle visualizes a potential interaction with users. As you can see, the bot will be able to take and complete orders, sum it up the and show the menu.
It’s time to create your first chatbot!
- First, you need to go to https://www.chatbot.com/ and log in to your account. If you haven’t created your account yet, follow these steps. When you’re successfully logged in, you should see your dashboard. If you’re here for the first time this screen may look different.
Click new to add a new story and give it a unique name and a short description.
So far, there isn’t so much to see in our story view. We’ve got only two default interactions and an empty one. Before to start editing our story, let’s teach our bot crucial vocabulary -– the coffee types. To do so, go to Entities.
Add a new entity and name it
coffee-types. Inside add the coffee types that you want to sell in your cafe.
Good job! Go back to your story and add a new interaction that will show coffee options. Name it Menu to keep it simple.
Click If to enter the user says section. Here we will be adding all the phrases that should trigger the menu interaction. Don’t worry if you don’t have so many ideas. You can master your bot later using the training feature.
Go to the bot responses section. Here we’re telling the bot what to answer if the user asks the question entered in the user says.
Add the carousel response by clicking it or dragging from the responses section.
A carousel can have multiple cards, each of them built from an image, title, description and action buttons. Let’s start building it up! First, add the image URL, name and short description.
Now, add the action button that will be used to order the coffee. You can see that the button can perform a call, open a web page, jump to another interaction or directly pass a message to the chatbot. Type the coffee type in the postback field, so the bot knows what coffee has been ordered.
Great job! Save your interaction and return to the story view. Add a new interaction to the root of your story and name it Order. Interactions in the root are available from every step of the story so your clients will be able to get the coffee without browsing the whole menu.
Go to the user says section of your new interaction. It’s time to use the entities we’ve created. To do so, type double curly brackets
…and select our entity.
As the final part of the conversation, the bot will confirm taking the coffee order. Move to the bot responses and add a text response.
Use again the double curly brackets to confirm the coffee order.
Last but not least, we can work on our welcome message that is marked as
STARTin your story view. This default interaction is always automatically added to your story. First, let’s delete the random text message that is already there.
Add a nice greeting and the button response that can redirect our clients to the menu.
Edit the button’s action so it redirects the user to the café menu when clicked.
I think we’re ready to test out our chatbot!
If you want to publish your chatbot, go to the integrations and choose the chat widget that allows building beautiful chat windows in a few seconds.
In just a few steps we have managed to create a chatbot that’s able to take orders, recognize words important for our business and confirm it. The user can click buttons or just type the coffee type into the chat window. And that’s just the beginning of your journey with ChatBot!