In this topic, we will create a custom chatbot to get stock market quotes, using Amazon Lex. The bot will listen to our utterances for a valid intent: GetQuote. This signals to the bot that we had, for example to get a stock market quote for a given stock ticker symbol, will reside in a Slot named ticker. The bot will then look up the quote for that ticker symbol from a freely available financial API named IEX, and will return the information to the user via a conversational response:
Note
A stock ticker symbol is the standard way in which stocks that are traded on an exchange, such as the New York Stock Exchange or NASDAQ are represented. A sequence of alphabetical letters represents the company's stock which is being traded.
We can create a flowchart for this process, as shown in the following diagram. Let's go over it in some more detail:
Recognizing the Intent and Filling the Slot...