0

I have set up a Lex bot which provides the order status to the user. User invoked the intent with a specific utterance. Then lex bot asked the information as requested in the slot specified. Then confirmation prompt is invoked "Are you sure you want information" and the user said "yes".

before replying the user with the information, when the user says yes I want that lex bot should say "Please wait, while we are fetching your information".

I have tried with different intents invoke. but intent invocation needs input from the user.

Sanjay
  • 13
  • 5

1 Answers1

1

The basic Lex console does not allow multiple responses to a single input.

So in order to have more control like this, you would have to build your own proxy between the user and Lex. This means not using the built in channel configuration, so you would have to build that into your proxy as well.

For example, if you are using Facebook Messenger as a channel. Then you can follow their Getting Started documentation on setting up a webhook to receive messages and use Send API to respond.

You would also use Lex PostText API to pass the messages to Lex yourself, and receive Lex's responses. Then you would take the Lex response, and deliver it to the user yourself.

Sounds like a lot of extra work but there are many benefits including:

  1. Able to send multiple messages for a single input.
  2. Able to receive multiple messages for a single output.
  3. Improved debugging and analytics logging to catch exactly what occurs between Lex and the channel.
  4. More precision of control over the channel's specific functionality. (For example, full use of facebook's Emoji's, Stickers, Buttons, Quick Replies, Webview, etc.)
Jay A. Little
  • 3,239
  • 2
  • 11
  • 32
  • There is no channel; which I am using. It's just a Lex bot. I simply want to play a message asking the user to wait before returning the final response and after the confirmation prompt. – Sanjay Apr 17 '19 at 07:45
  • You will eventually use some channel to make your bot accessible to people outside of the developer console. And yes, it sounds simple, but it's just not possible with Lex alone because Lex is strictly built for 1 input, 1 output. So you need to build your own ability to do it as I described, or work within the limits of Lex. – Jay A. Little Apr 17 '19 at 09:00