question

Apoena Oliveira Machado avatar image
Apoena Oliveira Machado asked

Alexa say and redirect to another intent

Im trying to redirect to another intent but before i want alexa say something and redirect to another

The iteration is like whit

User Say: "I won"

then some logic behind build a answer if its possible he won? if its true, alexa say "Congratulatons" and redirect to another intent. if its not true say "Are you joking? Its impossible." and not redirect or redirect to another intent

alexa skills kitalexaintentsalexa skillsask-sdk
10 |5000

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

Andy Whitworth avatar image
Andy Whitworth answered
1 comment
10 |5000

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

Apoena Oliveira Machado avatar image Apoena Oliveira Machado commented ·
But with intent chaining looks like its mandatory have a slot in intent
0 Likes 0 ·
Gaetano@Amazon avatar image
Gaetano@Amazon answered

Hello and thanks for posting.

You cannot make Alexa say something and then move to another intent, at least not without intent chaining.

This is because sending the response back to Alexa will basically exit the handler.

However, you could create a function for each intent handler you want to redirect the skill to.

When the code logic stabilises that the Alexa needs to say "congratulations", instead of returning the response directly, you can call that function and send the response from there.

Please note that in order to use the responseBuilder from the function you call, you also need to pass the entire handlerInput).

Regards,
Gaetano

10 |5000

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