0

In Details: Example: user:- asks About Cricket News. Alexa:- Reads about the new. If users says come again or replay user: Come again. Alexa: Must read it again what it spoke earlier.

How to handle this situation using webhooks.

Thanks in advance.

b PRASANTH
  • 37
  • 6

2 Answers2

0

You can make use of sessionAttributes to keep track of the last response that Alexa spoke. Whenever you return a response just store the speech and re-prompt in sessionAttributes and whenever a ComeAgainIntent is triggered, take the value from the sessionAttributes and respond accordingly.

Ex:

...
"sessionAttributes": {
    "lastResponse": {
       "speech": "This was my last speech",
       "reprompt": "This was my lst reprompt"
    }
 }
...
johndoe
  • 4,387
  • 2
  • 25
  • 40
0

Every time before building the response store the response as lastSpeech in session attributes and write a comeAgainIntent or use amazon.REPEAT intent to repeat the response by getting lastSpeech from session attributes.

Ussama Zubair
  • 1,039
  • 1
  • 13
  • 19