Tutorial: Hello, World!

Familiarize yourself with the Meya online platform by building a simple bot.

This tutorial will familiarize you with the online Meya platform interface.

Let's build a simple bot that says "Hello, World!" to your users.

Create a new bot

After creating an account and signing in, you'll see your Account Dashboard. From the Account Dashboard, click Create A Bot!.

189

From here you can choose to create a bot from a template, but for this tutorial select the Blank template.

1870

The bot template page.

Give your bot a name, and click Create Bot!.

594

Name your bot.

You should now see your new bot's dashboard. There's a lot you can do from the Bot Dashboard, but for now we're going to go straight into Bot Studio to create our code!

Add flow code

Click Add First Flow.

278

Add your bot's first flow.

Click the Hello World Template button to automatically populate the flow with the necessary code. It looks like this:

states:
    first:
        component: meya.text
        properties:
            text: Hello, World!

Some things you should notice are:

  1. states: is also required. It tells the bot that everything that follows is a state, or action, that it should perform.
  2. The name of the first state is first, but you could name it anything.
  3. component: meya.text tells the bot to use the built-in meya.text component to display text to the user.
  4. The next two lines specify the properties of the meya.text component. In this case, there is only one you need to set: text.
  5. Pay careful attention to the colons (:) as well as the indentation. Missing colons and improperly intended flow code are two common mistakes new bot builders make.

Set the trigger

Now you have a flow with a single state (i.e. action) your bot should perform. Triggers tell your bot when it should execute the flow, often based on the user's input. Let's make your bot's flow execute when the user types hi.

Click the Add A Trigger button. From the Trigger Type drop-down, select Keyword. Enter hi as the keyword in the Settings section. Leave the other settings as is, and click OK. Click Save in the right side of the top toolbar.

796

Intent pop-up

Test it out!

Now your bot has an action to perform and knows when to perform it. Let's test it out!

In the test chat window on the right side of Bot Studio, enter hi. Did your bot respond with Hello, world!? Awesome!

356
  1. Test the flow

What’s Next

In the next section you'll take a closer look at the core concepts used on the Meya platform: flows, components, and intents.