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!

In this chapter we will build the very start of the conversation.

What we will build in Leadzy Lesson 1.

Step 1: Create a new bot

To create a new bot:

  1. Go to app.chatlayer.ai and log in using your credentials.

  2. On the upper right corner of the screen, click on the New bot button.

  3. Enter Leadzy as a name, so that you can easily find it again.

  4. Select English as your primary language.

Create a new bot and call it Leadzy.
  1. 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.

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.

Your chatbot has been successfully created!

Step 2: Edit a Message block

Now, it’s time to make your chatbot say something.

Edit the Introduction block

To begin, let’s modify your introduction block.

To edit the Introduction block:

  1. From your canvas, click on the Introduction block.

Your Introduction block is where the conversation starts. It's filled with a default message.
  1. 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.
  1. 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.

To add alternative messages to a bot message:

  1. Open your Introduction block by clicking on it.

  2. 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?

  3. 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.
  1. 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:

  1. Click on the play button at the top right corner of your bot canvas.

Test your bot.
  1. 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’.

  2. Press Enter on your keyboard to send your message.

Test your bot with this sentence. This is the expected result.
  1. The bot didn’t understand you — and that’s absolutely normal! For now, all we taught our bot is to say a greeting.

  2. Click on the Restart conversation button at the top-right corner of the test window.

Restart the conversation to run a new test.
  1. 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:

  1. Open your Test your bot window.

  2. At the top-left corner of the Test window, select WhatsApp sandbox.

Test your bot in WhatsApp using the WhatsApp sandbox.
  1. 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.

  2. Whatever you choose, click on Continue to chat.

  3. Send the message starting with ‘join’ that is pre-filled in the text field.

  4. 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.

2. Understand your users

💬 Feedback

Last updated

Was this helpful?