Reputation: 1728
I'm trying to create a chatbot using AWS Lex that can look up detailed information on an EC2 instance based on the name of the instance. In my environment, some instances have the same name. Their only differentiator is the instance Id.
I want the interaction to flow such that when the user provides the name of the instance and the bot sees more than one instance with the same name, it will prompt the user to confirm which one based on instance id.
What type of dialogAction should I use to achieve this?
Upvotes: 2
Views: 958
Reputation: 2026
To achieve your use-case, you can have another slot which takes the instance ID from the user. This slot would be marked as not "Required" since you don't want this info when the instance name is unique.
If the instance name is not unique, use the ElicitSlot
dialogAction
type, to return the response from the Lambda function. Here, you would pass in the above created slot as the slotToElicit
parameter value.
For ease of showing the possible options, you can also use Response Cards.
Upvotes: 2