Create your first chat bot

From Genesys Documentation
Jump to: navigation, search
This topic is part of the manual Genesys Dialog Engine User Guide for version Current of Genesys Dialog Engine.
Read this topic for other versions:

This article will walk you through the process of creating and running your first chat bot.

Ensure that you are logged in to Dialog Engine. Contact your administrator if you do not have your user credentials.

Create a bot

1

Create a new bot and call it TravelBot and click Save.

We’ve created a bot that will interact with users. It is preferable to have a bot per scenario. For example, you might require a bot that can handle travel-related activities and hotel room booking.

Next, we’ll teach our bot to identify what the user wants by creating an intent.

Create an intent

1

Let’s add an intent by clicking Add Intent and call it BookFlight.

Next, we’ll create a few phrases called utterances that a customer might use to describe what they want to do.

Create an utterance

1

Let us add a few sample phrases that someone talking to our flight-booking bot might use and save them. For example:

  • I want to book a flight from Madrid to New York.
  • Book me a flight to San Fransisco.
  • I want to fly to Frankfurt.

Since we’re creating a travel bot, let’s include an utterance that has airport codes.

  • I would like a flight to LHR from SAN.

Create a custom slot type

1

We’ve added some sample utterances that use city names and airport codes, so we have to teach our bot that certain words or phrases are actionable items. These items are called slots and in this case, they will stand in for actual city names. Let’s add a City Name slot.

  1. Click Slot Types in the left panel and click Add Slot Type.
  2. Enter City Name and click Save.

Now, we’ll add some names of cities as slots. For each entity you can add synonyms for different ways a user might provide information. In this case, we’ll add NYC and NY (abbreviations) as synonyms for New York area. We could also add JFK and LGA (airport codes) as synonyms for New York. You can add as many synonyms as you like.

  1. Select the Allow synonyms option, add synonyms to each entity, and click Save.
Let's save our bot and then proceed to teach the bot how to identify slots in an utterance.

Map slots in an utterance

1

  1. Go to the Utterances tab of the BookFlight intent from the Intents option in the left panel.
  2. Double-click the word Madrid in the utterance, I want to book a flight from Madrid to New York.
  3. As we do not have any slots defined, let’s add a new slot by clicking Add new slot.
  4. In the Add Slot dialog, name it as Origin as we’re trying to capture where the user is flying from.
  5. Select City Name in the Slot Type option to tell the bot that this entity will use values from the City Name custom slot type we created earlier.
  6. As the origin location is required for our bot to book tickets, select the Slot required option.
  7. To let the users know that they have to enter something, let us add a message in the Prompts field asking to enter some information: Where are you flying from? Press Enter to save the prompt.
  8. You can add more prompts which the bot will display to the user.
  9. Save the new slot and select it from the Select Slot option.
  10. Similarly, tag the starting locations in the other utterances also. You can also create a new slot for the destination city and tag the destinations with the same City Name custom slot type.
Now that we have some basic rules set up for our bot to identify travel information, let’s see how well our bot understands the user input and identifies the slots.

Test the bot

1

Now that we have some basic rules set up for our bot to identify travel information. Let’s see how well our bot understands the user input and identifies the slots.

  1. Click Test Bot in the top-right corner.
  2. Start a conversation with your bot by typing an utterance that mimics the sample utterances that you provided.
That's it!!! You have created your first bot. Go ahead and add more information and improve your bot.

Integration with other products

Dialog Engine can integrate with call flow design tools like Genesys Intelligent Automation, Genesys Architect, and Genesys Designer.