question

Aashrith avatar image
Aashrith asked ·

Not able to reset state handler Dynamo DB

Hello ,

I was using global variables for my skill but when multiple users started using the skill at the same time , they were being shared . So i am moving to Dynamo DB . In my code , I have been using state handlers in different intents for a prolonged conversation . After migrating to dynamo DB , I had a state handler "X" in which there were three intents "YES","NO" and "unhandled" , After saying yes , the yes intent inside the handler got executed , But when i said AMAZON.stop / pause or any other intent not inside the handler , "unhandled" intent is being triggerd . What should i do to fix this .Any help is appreciated . Thanks in advance ! When i say any other handler not inside this state handler i want those handlers to be executed.

alexa skills kitalexanodejsalexa for businessalexa command line interface
10 |2000 characters needed characters left characters exceeded

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

Jenn@amazon avatar image
Jenn@amazon answered ·

Did you define a handler to handle the other Intents within that state handler?

Basically it's looking at the Handlers defined for State X and if it doesn't find a matching one, then it default to Unhandled.

Can you share a the code where it's handling for for the State X?

10 |2000 characters needed characters left characters exceeded

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

Aashrith avatar image
Aashrith answered ·

Like after the control goes to the state handler x , what if i want to invoke some intent that is not a part of the state handler . For example , the state handler has YES , NO and Unhandled . After the user says something corresponding to yes / no , that code will be executed . But after that if i say some intent that is not part of this handler . It goes to unhandled . I want to be able to call any of the other handlers that are not part of this state handler X as well because i do not want to copy paste all the handlers again into this .

You get an idea ?

2 comments
10 |2000 characters needed characters left characters exceeded

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

Can you share the code for that State? It's easier to show through code than to explain the method.

0 Likes 0 ·