0

We are trying to build chat bot using AWS Lex.

The idea is as follows 1) After the introduction text ,we ask the user his preferences in order A->B->C.

All the above preferences are slots in the Intent we created. Now once the user fills A,B and C we are supposed to show recommendations based on the preferences (The response will be Array of image,title and link and fetched from API dynamically) and the user needs to choose from them. How should we proceed as I can create lamda but not sure which type to use while providing a response to lex. If we provide Delegate it will just instruct Lex to move forward. It is not fulfillment as we want to user to choose from the recommendations.

Please help

Regards Raghav

rici
  • 234,347
  • 28
  • 237
  • 341
Raghav Thakur
  • 311
  • 1
  • 3
  • 13

1 Answers1

0

You are going the right way, first set the slots as preferences A,B,C. Once these slots are filled you can complete the intent and display response cards to the user in form of Close message.
Then make one more intent which will be responsible to catch the user response i.e his selection from the options you previously sent.

Example: you gave user 3 options Bronze, Silver and Gold. You have to set the text of the button as Gold and value as "I want to select Gold plan". The new intent you created will catch these type of phrases.

Let me know if it's confusing. Check this question to see details of response cards and buttons.

sid8491
  • 6,622
  • 6
  • 38
  • 64
  • Ok I understand most of it. Thanks. But isnt it possible to create 4th slot for result and from elicitslot we populate the result using response cards by having business logic which uses options entered in first 3 slots A,B and C. I mean in our case once the option C is over , he immediately needs to see the result based on top 3 preferences. Also the result itself has options from which the user needs to select – Raghav Thakur Feb 16 '18 at 09:30
  • you can definitely do that, but might end up in problem as Lex is not very good in slot identification (as per my experience) and we should depend less on slots. And what i wrote was general way of doing. There are multiple ways of doing things, you should explore and select best way possible. :) – sid8491 Feb 16 '18 at 10:04
  • also, this way you will avoid timeout error as well which you might encounter if user did not make a selection within 30 seconds. – sid8491 Feb 16 '18 at 10:14