Getting started with your first chatbot on Mercury.ai in 5 minutes

Stefan Trockel
Mercury.ai
Published in
6 min readJun 12, 2019

The mercury.ai platform provides you with all the tools you need to build top-notch AI conversational agents through an easily accessible interface. From dialogue flows to Natural language processing and much more… To get you started we put together this tutorial that leads you through the first steps and helps you create a running bot in five minutes.

In this tutorial we’ll cover the following steps:

  1. Create New Project
  2. Create New Bot
  3. Create and edit a Generic Game
  4. Deploy a bot
  5. Test your bot via quick chat

Create New Project

After you’ve logged in to your account, you can directly go over to the option of creating your project. This is necessary because all your bots will be embedded in a certain project. This particular organization of bot building has the advantage that you can have different bots clearly separated by their project affiliation.

Now let’s start with creating a project. First, navigate to Projects in the menu. Next, choose this option:

After you’ve clicked on the button, a pop up opens up and asks you to provide a Name (mandatory) and a Description for your project. Clicking on Save creates the project.

Create New Bot

After you’ve created a project, you land in the settings of your project. For working on a bot, you have to go to the bot Creator.

Here you can Create a New Bot by clicking on this button:

You will be asked to fill a Name (mandatory) and a Description (mandatory) for your bot.

Confirm your changes by clicking on Save — now your bot is ready to being set up.

Create and edit a Generic Game

First, you need to create a conversational template, a so-called game. Therefore you have to click on Add another game in order to build conversations. We start with a Generic Game.

After you’ve chosen a Name and Description, you can create the game through a click on Select and configure. You will be directly redirected into the game where you have to do three things for creating a communication: add a user message, add a bot message and connect them.

In order to work on user messages, you have to click on Add user intent

A configurator for the user intent will be opened. First, we need to fill information in the upper part. It looks like that:

The field intent label is mandatory. You may call it “HelloBot” and save your selection through enter or tab. Next, enter some example utterances that users may write when this message should be triggered. Since we are in a greeting intent, you could write something like “hello bot” or just plainly “hello”.

INFO: If you want to add more example utterances, you can either click on add a variation or you can press enter after you finished writing an example utterance.

Next, we will add a bot intent. We start with clicking on Add bot intent

What is now being opened is the Message Builder — the part where you can set up the messages your bot sends out to your users. Just like user messages, you also have to set a bot intent label. You may call it “HelloWorld” in this example. Accept the changes by pressing enter or tab.

Next, we have to configure the message which will be sent as bot message. For the purpose of building a first interaction between user and bot it is sufficient to work with a Text template. Click on it on the left hand side in the Add message section. It should look like this now:

Set your bot message by clicking in the text field on the right and entering a message there. This will be the message that will be the output of your bot. Here, you could enter “Hello World!”

Now you’ve created both a user message and a bot message. In order to finish your configuration, you have to connect both messages. This can be done in the user intent:

In the Bot reaction section of your user intent you determine which bot intent will be triggered when a user writes a message that the NLP recognizes as this intent.

All you have to do is selecting the right bot intent in the drop down menu. In our example, you can see that we’ve chosen “HelloWorld” as the bot intent that should be triggered.

As last step, you need to Save your changes and the first conversation of your bot is configured!

Deploy a Bot

We’ve already managed to go through the most challenging part. That was fast and easy, right? Now we can go on with testing the bot. Therefore you need to deploy your bot first so your newly made changes are saved to your bot.

To see how fast the deployment goes, we open the Sidebar. All you have to do is clicking this icon in the upper right.

Now you can instantly see the progress whenever you are deploying a bot. Deploying itself is really easy. You have to select a stage (in the screenshot below you see that we selected “Dev > A”) to which you are deploying your bot and then you have to click on Deploy bot — that’s it.

Test your bot via quick chat

After about half a minute, your status bar should look like this:

Now your bot is ready for testing. For that, you need to open the Quick Chat in the sidebar. You can find it behind the bubble icon:

Click on it and the Quick Chat opens up. For testing the functionality of your bot, there are only two things left. First you need to select the stage that your bot runs on. In the example from above, this would be Dev > A.

Now you can go ahead and test it! After you enter a text, you will get the opt-in message first. Accept the opt-in and then you can type an utterance we entered in the User Intent (if you forgot: Hello Bot) and the bot replies. Just like our bot replied to us (fyi, we added a second message):

We would love to hear your feedback! If you know anything we should improve please let us know at support [at] mercury.ai

We hope you enjoy mercury.ai

--

--