Prerequisite steps

This tutorial assumes you have a user account for the Conversational Cloud and Conversation Builder platforms. If you don't, your team should have an administrator who can create one for you.

Step 1: Create a new bot

  1. Navigate to https://authentication.liveperson.net/login.html, and log into Conversational Cloud using your credentials.
  2. Open the menu on the left side of the page, and select Automate > Conversation Builder.

    The Automate menu with the Conversation Builder menu option highlighted

  3. Click New Bot in the upper-right corner.
  4. In the Choose a Bot Template window, click the orange arrow that appears when you move the mouse over the Custom Bot template in the Custom category.

    Choose a Bot Template window, with the mouse over the Custom Bot template so that the orange arrow appears

  5. Give the bot a unique name (e.g., Getting Started Bot) and a description (e.g., My demonstration bot), and click Create Bot.

    Custom Bot window

    This takes you to the new bot in Conversation Builder. Since you selected the Custom Bot template, by default this creates a bot with a “Welcome” dialog that matches to and responds to simple forms (patterns) of “hello.” The bot also has a Fallback dialog with some fallback text.

    Default Welcome dialog

  6. Examine the Welcome dialog, which is displayed by default.

    (Learn about the different parts of the workspace in Conversation Builder.)

Step 2: Test the Welcome dialog

With the bot created, let’s see how to make it respond to user utterances.

The first interaction in the Welcome dialog is a Dialog Starter interaction that allows us to match a user’s utterance using patterns or intents. Following that is a Text Statement interaction that displays some text ("Hi there! Thanks for coming!") to the user.

Statement interactions (e.g., Text, Image) are for displaying content to the user, without listening for a user response. Once the statement is displayed, the conversation flow moves on to whatever is next in the dialog. (Learn more about interactions.)

Let’s see the interactions in action!

  1. Click Preview in the upper-right corner.

  2. In the Preview window, enter “hello” or “hello there,” and click Send. You should see the welcome response.

    Example of previewing a conversation

    So how is the Welcome dialog triggered?

  3. Examine the Dialog Starter interaction. On the interaction's face, note the different patterns used to match this particular dialog. (You can also use an intent to trigger a dialog, but in this tutorial we focus on patterns.)

    Dialog Starter interaction with patterns for hi

    Since this is a "Welcome" dialog, it uses patterns like “hi”, “hello” and “howdy” to match those phrases exactly and display a response.

    By adding wildcards (e.g., hi * or hello *) you can allow for broader matches like “hi there” or “hello my friend.” Using parentheses and pipes allows you to specify a series of alternates. For instance, (hi|hello|hey)* will match “hi”, “hello there” and “hey you.” (Learn more about specifying patterns in interactions.)

    Patterns are a great way to create hard-coded logic in the bot while you build out the design. As your bot grows, you’ll want to incorporate Natural Language Understanding to provide a more conversational experience for users. Our next tutorial on "intents" and "entities" serves as an introduction to these topics.

  4. Click the patterns (green button). On the Patterns & Intent tab in the Interaction Settings window, add some more patterns (e.g., “hiya”, “ciao”, and “hola”). Click Save.

    The Patterns and Intent tab in the Interaction Settings window

  5. In the Preview window, click Reset. This starts a new session that "picks up" your changes.

  6. Test the new patterns in the Preview window like you did before.

    Previewing more hi patterns

    Now that you’ve seen how a dialog is triggered, let’s change the welcome response by editing the Text Statement interaction.

  7. Select (click) the Text Statement interaction below the dialog starter.

  8. Change the text from "Hi there! Thanks for coming!" to "Hi there! How can I help you?", and press Enter. (There is no need to open the Interaction Settings to change simple output text.)

  9. To see your change, open the Preview window again, and click Reset Session. Then enter “hi”. You should see the “Hi there! How can I help you?” response.

Step 3: Add a Goodbye dialog

Let’s create another dialog to put these concepts into more practice. Since there is a "Welcome" dialog, let’s now create a “Goodbye” dialog.

  1. Click Add Dialog in the lower-left corner.
  2. In the Add Dialog window, on the New Dialog tab, name the dialog "Goodbye", and select "Dialog" for Dialog Type. Click Save.

    By default, the new Goodbye dialog has a Dialog Starter interaction; this allows the dialog to be triggered by patterns or an intent. But the interaction isn't configured by default, so let's do that now.

    For the dialog starter to match user input, you need to add some patterns.

  3. Select the interaction, and click + Pattern.

  4. Under Patterns, add a few patterns like goodbye, bye, see ya, etc. You can do this manually:

    The Patterns and Intent tab with some goodbye patterns added

    Alternatively, a quick and easy way to add these patterns is to click the Library link, and select the "Bye" set of patterns.

    Using the Library to quickly add patterns

  5. Click Save.

    Before you test things in the Preview window, you need to add some content to be displayed when the bot matches one of the patterns. Let's add a Text Statement interaction.

  6. In the Interactions tool palette (shown below), click the Text Statement icon Text statement icon. This inserts the interaction.

    Text statement on the Interaction tool palette

    (If you can't see the Interactions palette, close the Preview window, which might be covering it up.)

  7. In the interaction, enter a goodbye message (e.g., "Thanks for stopping by."), and press Enter.

    Text statement with a goodbye message

    Let's test the changes.

  8. Open the Preview window again, and click Reset.

  9. Enter “hi” to trigger the Welcome dialog and see the welcome message. Then enter “goodbye” to trigger the Goodbye dialog and see the goodbye message.

    Previewing the conversation by entering goodbye

Bots can also support small talk (chitchat). In your automation solution, consider adding support for this. It offers your consumers a more human-like experience.

Step 4: Test the Fallback dialog

You’ve seen how to create a new dialog and trigger it using patterns. But what happens when you enter an utterance that hasn't been accounted for? To catch and handle these when they occur, you can provide a "fallback dialog." By default, when you create a bot using the Custom Bot template, one is included. Let's examine and test it now.

There can be only one dialog of type Fallback per bot.

  1. In the Dialogs panel on the left, click 2 Fallback. This opens the Fallback dialog.

  2. Note how there isn't a Dialog Starter interaction.

    You don't need a dialog starter in the Fallback dialog because the Fallback dialog has special properties that cause it to display when there are no other matches available. However, you do need to add some type of message to tell the user that the bot didn’t understand their query. A default message is provided for you.

  3. Select the Text Statement interaction, and append, "Please try again" to the message. Press Enter.

    Changing the default message in the Fallback's statement

  4. Open the Preview window again, and click Reset Session.

  5. Enter something other than your hello and goodbye patterns. You should see your fallback message.

    Previewing the changes

What's next?

Continue on to the next tutorial in the series.