Links

2. Creating a new bot

Never built a bot before? We got you. Follow this bot tutorial with key steps on how to build a chatbot from scratch on Chatlayer!
Are you working on an existing bot? Then you don't need to set up a new one, just skip ahead to the next tutorial:

Creating a new bot

What better way to learn how to build a bot than building one! To help you get started, we'll go through a bot-building tutorial together.
In this tutorial, you will create a bot called Choo Choo: a digital assistant that can help people book train tickets.
To get started, you need a Chatlayer account. Don't have an account yet? Create a trial account here. Have a problem with your account? Contact our support team here.
  1. 1.
    Go to https://app.chatlayer.ai/ and log in using your credentials
  2. 2.
    To build a new bot, click the + Build from scratch button on the top left corner. You can add template bots to your account later
View of the template menu on the My Bots page on Chatlayer. Either build a bot from scratch or use a template.
4. Now enter Choo Choo + your first name as the name of the bot, so you can easily find it again
5. Then select your primary language. This is the language that your bot will use. If you'd like to create a multilingual bot, you can add extra languages.
6. Now click Create and your first bot is created! 👏

Creating bot dialogs

  1. 1.
    In the menu on the left, click on Bot dialogs
  2. 2.
    Then go to the Generalflow:
Flows are a way to group bot dialogs that are about the same topic or use case. You will learn more about them later.
3. In the 'general' flow, you will see an overview of all the bot dialogs that are part of this flow. When creating a new bot, you always start with a few predefined dialogs:
  • Not understood
  • Introduction
  • Offloading open
  • Offloading closed
  • Bot disabled
  • Error occurred
  • ...
Default dialogs appearing in the General Flow once a bot is created on Chatlayer.
To navigate the screen, you can zoom in or out by using the scrolling wheel, or with your trackpad. You can also click and drag to move through the dialog tree.

Step 1: Adding an introduction

Edit the introduction dialog

The first thing you'll need to do is create an introduction. The introduction dialog is the first message your users will see, the dialog your bot will use to introduce itself and help users understand its functionalities. Introductions are crucial to set the proper expectations of a bot.
  • You can edit the introduction by clicking the introduction bot dialog.
A bot dialog is a something that the bot will say or do in response to the user. Learn more about dialogs and flows here.
Since this is our first bot and our first message, let's start with a simple text message:
  • Delete the predefined greeting message by selecting the following text:
This is the first message your bot will send to the user. Use it to introduce your bot and briefly explain what it can do. Tip: mention the 3 most common use cases your bot can help the user with.
  • Replace it with the following text:
Hello there, I'm Choo Choo, your digital assistant
  • Click on Text in the section Add bot message to create a second message and enter the following text:
How can I help you today?
  • The result will be:
Modified Introduction message for the ChooChoo bot.
  • Click on Save. You just wrote your first dialog! 👏

Add random messages

Now, let's make this introduction seem more natural.
Using random messages means that different messages will be alternated within a same dialog, making the conversation feel more human-like.
Just like in real conversations, your users will find it odd if your bot always replies with the exact same message. Even worse: they might not like using it at all and this could lead to an increasing drop-off rate. So imagining a bunch of different ways for your bot to say the same thing is valuable.
  • To add a random message, open your Introduction dialog again and click on + Add random message to enter the following text:
What can I do for you?
  • The result should be:
Add random messages to your dialogs to make the conversation feel more natural.
  • Click on Save. You made an Introduction dialog with different ways to say the same thing and that is fitted to your bot! 👏

Step 2: Testing your greeting

Time to check if we configured everything correctly. You can test your bot by using our built-in emulator.
Testing your bot as you are building it is a great way to have a first critical look at how the conversation feels but also to check if everything runs as expected. Test your bot as much as possible, as directly as possible!
  • To open the Emulator to test your bot, click on the Test your bot button in the lower right corner of the screen:
Click on the Test your bot button to open the Emulator.
If you have configured everything correctly, Choo Choo will now start the conversation with the introduction you just created.
You can ignore the Debugger and NLP result tabs for now. They will become useful later when you will need to solve bot issues.
Congrats, you just created your first bot dialog! 🥳

Lesson recap

You now have the done the following:
  • Created your own tutorial bot
  • Changed the introduction message
  • Added a new message and a random message
You should now know:
  • How to change a bot message
  • What the emulator is, and how to check your bot message in the emulator
Check our next tutorial to learn how to make your bot smarter with AI 👉🏻