Handle actions.intent.cancel (Conversation exits) with Jovo

google-assistant

#1

I have developed a news app for both Amazon Alexa and Google Assistant and both have a “Stop Intent” and a “Cancel Intent”. This intents work fine in Alexa but i can’t seem to make them work for Assistant because of the json request that the event “actions_intent_cancel” sends to the backend.

At first Jovo couldn’t parse the request that this event sent because the JSON didn’t had the dialogflow field. After fixing this, Jovo was able to parse the request but wouldn’t send the response that I programmed in the Intent because it simply didn’t went to there (I found that later via debug) and that resulted in a error that made application close.

Is there any recomendation to handle this type of events (cancel, no input, …) with Jovo? Currently, I have a Stop and Cancel Intent for Alexa and in the Assistant I let Google use the earcons to exit the application but I would like for the application to have the same behaviour in both the assistants.

I followed the rules imposed where for this event : https://developers.google.com/actions/assistant/conversation-exits and i also followed this tutorial provided by Jovo : https://www.jovo.tech/tutorials/stopintent-dialogflow


Google stop application
#2

Hey @RitaC!
Can you post your request JSON? Can’t reproduce it with my setup :confused:


#3

Hi! Thanks for taking the time to help me!

Request JSON sent to my voice app: https://pastebin.com/WwbPyErn
Response JSON sent from my voice app: https://pastebin.com/TTS5hvkD

What is missing from the response JSON is the the “goodbye” message that I defined on StopIntent.


#4

Oh, I think I see the problem.

What’s in your handler?

Any incoming request with this event will then be mapped to the 'END' intent in your Jovo app.

Do you “listen” to StopIntent or END ?

You should use:

END() {
    this.tell('Bye')
}

#5

I am listening for the StopIntent and not END and I think now I know where I misinterpreted the Jovo tutorial : I can call it StopIntent in the language model but I should be mapping these requests to an END() handler and not to a StopIntent() handler.

My handler in app.js:
StopIntent(){
this.tell(“Thank you for using the informed. Until a next time”);
}

Thanks for the help and the time you took to answer my replies!