question

CompAces avatar image
CompAces asked

sending responseReady ends skill, instead of going to purchase.

When I create the "response" and pass it using this.emit(":responseReady"), my skill ends instead of starting again with 'Connections.Response'


The Response JSON seems ok, it has the correct productId, and there is nothing in the log. It just ends. How can I see if it is really being sent? (I have tested on my Echo Dot and the test section of "Alexa Developer Console")



Here is my code bulding the response...

this.response = {

"version": "1.0",

"response": {

"directives": [

{

"type": "Connections.SendRequest",

"name": "Buy",

"payload": {

"InSkillProduct": {

"productId": "***Not Shown***"

}

},

"token": "correlationToken"

}

],

"shouldEndSession": false

}

}


isp
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

CompAces avatar image
CompAces answered

I manage to figure out the problem.

In the example for https://developer.amazon.com/docs/in-skill-purchase/add-isps-to-a-skill.html#buy-requests


you need to add ...

"sessionAttributes": {

"STATE": 3

}

After the "version" and "response" sections


10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.