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!
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 [email protected].
In this chapter we will build the very start of the conversation.
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.
Create a new bot and call it Leadzy.
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 general menu of your chatbot on the very left.
The canvas view when you open your chatbot.
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!
Step 2: Edit a Message block
Now, it’s time to make your chatbot say something.
A Messageblock is a type of message where your bot will prompt something to the user. Learn more about blocks here.
Edit the Introduction block
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.
Your Introduction block is where the conversation starts. It's filled with a default message.
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?
Edit the message inside your Introduction block.
Click Save.
Your Introduction block is now modified and you can see it from your canvas.
Your Introduction block after modification.
Add alternative messages
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?
Add alternative messages.
Click Save.
Let’s now see how we can test that the bot behaves as expected.
Step 3: Test your bot
Chatlayer offers a simple way to test your bot every time you make a modification.
Run tests in the Emulator
To test your bot:
Click on the play button at the top right corner of your bot canvas.
Test your bot.
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.
Test your bot with this sentence. This is the expected result.
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.
Restart the conversation to run a new test.
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.
By running several tests, you'll notice that messages alternate because you added alternative messages.
You just ran a successful test: your bot has the expected behavior!
Run tests in the WhatsApp sandbox
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.
Test your bot in WhatsApp using the 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.
Follow these steps to start a conversation in the WhatsApp sandbox.
Our bot is also working on WhatsApp, hurray!
Lesson 1 recap
Congratulations, you just made your first steps! In this lesson, you’ve learned how to:
Coming next
Next, we will teach your bot how to understand user responses.