I am using Aws Lex for constructing chatbots. I had a scenario where I need to have welcome message initially without user input so that I can give a direction to the user in my chatbot.
You need to work that scenario using API call to start a context with your user.
You can follow these steps:
- You need to create an Intent called
AutoWelcomeMessage
. - Create a
Slot type
with only one value i.e:HelloMe
. - Create an Utterances
HelloMessage
. - Create a
Slot
as follow: Required, name:answer
, Slot Type:HelloMe
, Prompt: 'AutoWelcomePrompt'. - Pick Amazon Lambda for your
Fulfillment
that will send a response to your user. I.e:
Hello user, may I help? (Here the user will enter another Intent
and your Bot will respond).
Now, start a conversation with your User, just call via API your Lex Bot and send an intention with Intent AutoWelcomeMessage
, that call starts a context with your Lex Bot and the fulfillment
will execute your Lambda.
If you are using your own website or an app for integrating the chatbot, then you can send some unique welcome text from that website/app when it loads for the first time i.e on load method
to the amazon lex. And in amazon lex you can create a welcome intent and put exact same text as utterance.
This way, when the website/app loads, it will send text to amazon lex and lex can fire the welcome intent and reply to it.
© 2022 - 2024 — McMap. All rights reserved.