shubham salokhe
shubham salokhe

Reputation: 9

Want to create alexa skill such that alexa will ask 4-5 questions to user and user will responds after every answer and that will be stored in db?

Alexa will ask 4-5 questions one after another user will respond after every answer and answer will be stored in db that all want in one intent of alexa skill and python code...

I tried one intent but after user respond sometimes new intent get triggered that i dont want... I create QuestionIntent in which question will fetch from API and then alexa will ask first question after triggering Question intent .. Also create custom slot for question intent with for answers

Upvotes: -1

Views: 114

Answers (1)

CodeDog
CodeDog

Reputation: 131

I understand you are looking to create a skill which collects user feedback for multiple questions, and that user answers sometimes trigger an undesired intent. I see you also mentioned that user answers will differ, and therefore you don't want to set any specific values for a custom slot.

I would recommend you use the built-in slot type, AMAZON.SearchQuery. This slot type can be used to collect less-predictable user input. One important thing to keep in mind, however, is that sample utterances for an intent which uses AMAZON.SearchQuery must include carrier phrases, such as "my answer is {feedback}". A sample utterance of simply "{feedback}" will not work. Therefore, your skill would benefit from instructing your users to use this carrier phrase in their feedback responses.

Within your intent handler for collecting feedback, you can have Alexa respond with the next question. You can use session attributes to keep track of the question number, and reply accordingly after the final question is answered.

Upvotes: 3

Related Questions