Creating a new bot

This tutorial will show you how to set up a new project and create a chatbot from scratch.

Are you working on an existing project? Then you don't need to set up a new one. Feel free to skip ahead to the next tutorial.

Getting started with chatbots

Never built a chatbot before? This short tutorial video explains you the key steps to creating a chatbot and the terminology used on the Chatlayer.ai platform.

Creating a new bot

For this tutorial, we’ll create a bot called Choo-choo: a digital assistant that can help people book train tickets.

To get started, you need valid log-in credentials to access the Chatlayer platform. Don't have them yet? Please request them here.

  • Enter Choo Choo + your first name as the name of the bot

  • Select your primary language. This is the language your bot will use. If you'd like to create a multilingual bot, you can add extra languages.

  • Now click Create to create your new bot

  • In the menu on the left, click on Bot dialogs.

  • Then go to the Generalflow by clicking the blue flow icon.

Flows are a way to group your bot dialogs. You will learn more about them later.

  • In the general flow, you will see an overview of all the dialogs that are part of this flow. When creating a new bot, you'll start with the standard predefined dialog states, which should look something like this:

To navigate the screen, you can zoom in or out by using the scrolling wheel, or by zooming with your laptop's trackpad. You can also click and drag to move through the dialog tree.

Step 1: Adding an introduction

The first thing you'll need to do is create an introduction. This 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 an important way to set the proper expectations of a bot.

  • You can edit the introduction by clicking the introduction bot dialog.

What is a bot dialog? A bot dialog is a something that the bot will say or do when triggered by a user intent or user message. This can be anything: from a message to a user to connecting to an external system, giving a message back and jumping to a different dialog in the flow. We will come back to the four different types of bot dialogs.

Chatlayer.ai supports multiple media types. Depending on the channel your bot will use (Facebook, Slack, Skype, Google Home, ...) these will be rendered slightly differently. For now that is not a problem, but check out this page when you start building on your 'real' bot.

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:

Hello. Please configure the introduction dialog state with a meaningful message.

  • Replace it with the following text:

Hello there! My name is Choo Choo, a digital assistant that will keep you on track.

  • Click on Text in the section 'Add bot message' to add a second message and enter the following text:

How can I help you today?

The result will be:

Just like in normal conversations, your users will find it weird if your bot always replies with the exact same message. That's why we support random messages. A random message means that the different messages will be alternated, so sometimes the first message will show, sometimes the second one.

In the Text Message block, you can add multiple versions of the same message. The bot will randomly pick one of these messages to show to the user, making your dialogue more natural and human-like.

  • To add a random message, click on + Add random message and enter the following text: "What can I do for you?"

Tip: you can add as many random messages as you like.

  • Click on Save to save your introduction bot dialog.

Step 2: Testing your greeting

Time to check if we configured everything correctly. You can test your bot by using our built-in emulator.

  • Click on the Emulator icon in the lower right corner to test your bot:

If you have configured everything correctly, Choo Choo will now start the conversation with the introduction you just created. PS: You can ignore the debug button on the left for now, though this will be useful a little later, when you want to debug more complicated flows.

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

In the next tutorial, you will learn to set up questions which the user may ask the bot, and how to create a bot response.