question

kenreiss avatar image
kenreiss asked

ISP doesn't seem to pass-through SessionAttributes

I just wrote my first ISP skill and noticed that even though my response to Connections.SendRequest (Buy) includes my sessionAttributes, they don't get passed back in, when it initiates the next request to type "Connections.Response" (name "Buy").

As a work-around, I copied them to persistentAttributes and stored them in a DynamoDB table before I send the Connections.SendRequest (Buy) response, then read them from the DynamoDB persistentAttributes and copied them back into my sessionAttributes.

While this works, I'm curious if there is some other approach I need to use to send them to the Connections.SendRequest (Buy), or if this is indeed an issue, when Amazon will allow the sessionAttributes to pass through the buy process?

Kind regards,
Ken.

alexa skills kitisp
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

Albebach avatar image
Albebach answered

"Your skill session ends when the purchase flow starts."
https://developer.amazon.com/docs/in-skill-purchase/add-isps-to-a-skill.html

Using persistentAttributes seems to be the way to go, since the session ends when the purchase flow starts.

2 comments
10 |5000

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

Thank you.. Any chance I could store all my sessionAttributes in the token?

Has any one tried/had luck with that?

Will Amazon be passing the sessionAttributes back in the future?

0 Likes 0 ·

Update: I tried passing them through the token (as an object) and that failed. So looks like writing to persistence is only option for now.

It will be nice when they pass back through the ISP process. Hopefully Amazon will add this someday?

0 Likes 0 ·