1. New bot, new block
Now that we have planned the Leadzy bot, we know what we want to build. Itβs time to open Chatlayer and get our hands dirty!
Last updated
Now that we have planned the Leadzy bot, we know what we want to build. Itβs time to open Chatlayer and get our hands dirty!
Last updated
To get started, you need a Chatlayer account. Don't have an account yet? Create a trial account here. You're having a problem with your account? Contact our support team at support@chatlayer.ai.
In this chapter we will build the very start of the conversation.
To create a new bot:
Go to app.chatlayer.ai and log in using your credentials.
On the upper right corner of the screen, click on the New bot button.
Enter Leadzy as a name, so that you can easily find it again.
Select English as your primary language.
The primary language is the language that your bot will use. If youβd like your bot to be multilingual, youβll be able to change that later.
Click on Create.
Your bot opens up, showing:
Your bot canvas in the middle of the screen, which is a visual representation of your chatbot architecture. A bunch of default blocks of conversation appear on this canvas, but letβs not worry about that now.
The Flows of conversation on the left.
The general menu of your chatbot on the very left.
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 blocks tree.
Flows are a way to group blocks that are about the same topic or use case. Learn more about them here.
Your chatbot has been successfully created!
Now, itβs time to make your chatbot say something.
A Message block is a type of message where your bot will prompt something to the user. Learn more about blocks here.
To begin, letβs modify your introduction block.
The Introduction block is a default block that serves as the first message that your users will see. It is where your bot introduces itself and explains its functionalities. Introductions are crucial for setting appropriate expectations for the bot.
To edit the Introduction block:
From your canvas, click on the Introduction block.
The block opens up on the right-hand side of the screen. Under Text message, delete the default message and replace it with:
Hi there! Lucky you, today we have 15% off the whole selection! Are you interested to receive a discount code by email?
Click Save.
Your Introduction block is now modified and you can see it from your canvas.
To make the conversation natural, we would like to have different ways of conveying the same introduction message.
An alternative message is a text message that will be randomly alternated with another one so that the conversation feels more human-like.
To add alternative messages to a bot message:
Open your Introduction block by clicking on it.
Under Text message, click on + Add alternative message, and paste the following message:
Hey there! Good news! We're currently offering a 15% discount on our entire selection! Would you like to receive a code via email?
Do the same for another alternative message:
Exciting news! We currently have a special offer of 15% off on our entire selection! Would you be interested in receiving a discount code via email?
Click Save.
Letβs now see how we can test that the bot behaves as expected.
Chatlayer offers a simple way to test your bot every time you make a modification.
To test your bot:
Click on the play button at the top right corner of your bot canvas.
A Test your bot window pops up on the right-hand side. It automatically starts the conversation, which means that the bot will prompt its Introduction block. From there, type something as a response, for instance βYes Iβd love to have a discount codeβ.
Press Enter on your keyboard to send your message.
The bot didnβt understand you β and thatβs absolutely normal! For now, all we taught our bot is to say a greeting.
Click on the Restart conversation button at the top-right corner of the test window.
Notice that the Introduction message displayed is now different. This is because added alternative messages to it, and those are displayed in a random way.
You just ran a successful test: your bot has the expected behavior!
Given the high demand for WhatsApp among our customers, Chatlayer provides an easy method to test your conversations directly on the platform.
Why running tests in a WhatsApp sandbox? Each channel has its limitations, therefore you want to make sure that your tests run smoothly in the channels that youβre choosing.
To run tests within the WhatsApp sandbox:
Open your Test your bot window.
At the top-left corner of the Test window, select WhatsApp sandbox.
A QR code is displayed on the screen, with a link underneath. Either:
Scan the QR code with your phone, so that your WhatsApp phone app opens.
Click on the link below the QR code, so that you can open the WhatsApp web app.
Whatever you choose, click on Continue to chat.
Send the message starting with βjoinβ that is pre-filled in the text field.
Youβll get a confirmation that youβre all set in the sandbox. Say something to the bot to start the conversation as you designed it.
Our bot is also working on WhatsApp, hurray!
Congratulations, you just made your first steps! In this lesson, youβve learned how to:
Next, we will teach your bot how to understand user responses.
2. Understand your usersYour feedback on the tutorial means the world to us! Please, let us know what you think through this short form.