Publish The Lex Chat Bot

Now that we have a working bot, we can publish it so it can be called by our TravelBuddy web page.

  1. In the Lex console, click Bot verion on the left menu
  2. Click Create version.

Lex

  1. Click Create

Lex

  1. Now you see a new version created
  2. Next, we will create prod alias. Click Aliases on the left menu
  3. Click Create alias.

Lex

  1. Enter prod for alias name
  2. In Associate with a version section, select the instance you just created.

Lex

  1. Scroll down to bottom and click Create
  2. Click to the English (US).

Bot In Web

  1. Select TripSearchLexBot for Source, select $LATEST version.
  2. Click Save

Bot In Web

The familiar TravelBuddy website should render in your browser. As before, you should see the Hotel Specials and Flight Specials listings rendered on the page, and the Find trips to… search option is also available. There is also the new Chat with us! option. Click the button and the chat bot window will appear:

  1. Type in your query - for example: I want to fly from Sydney to Melbourne
  2. The bot will respond When do you want to fly? Type Tomorrow
  3. The bot will respond Are you sure you want to find flights to Melbourne? Type Yes.
  4. The bot will respond I have 1 flight from Melbourne to Sydney - 1 January 2018 a similar message - perhaps there is more than one flight available, and perhaps the date is different - populating the DynamoDB table is randomised.

Bot In Web

Log into your account before making a chat.