Redirect user to the Default Welcome Intent when he says "cancel" or "exit" - dialogflow-es

I'm developing a Dialogflow application for Google Assitant. In that, if I say "Cancel" it directly calls the exit_conversation intent where I've specified actions_intent_CANCEL event. So it displays the output specified in that intent and bot exit the conversation.
Instead of exiting the Bot I need to open Default Welcome Intent. Is there any way to do that?
P.S. I'm using Python fulfillment as a backend for this bot.

In short - no, you can't do that.
You're essentially asking that, when the user tries to quit, you don't want to let them quit. From Google's and your users' point of view - that is a pretty unacceptable option.
The CANCEL event handler is fairly limited with what it can do - Google will terminate the conversation, even if you don't specify that the microphone should be closed, but you're given the opportunity to say a final message and offer a link to elsewhere.

Related

Dialogflow Show welcome text without user action

I am trying to show welcome text when user initiates the chat i.e. without any action from user. How to achieve this?
I tried NPM dialog flow or #google-cloud/dialogflow to detect intent to trigger the intent using node.js. It is sending the query and showing the fullfillment text in console but not on updating the UI like when user interact with bot.
Thanks.
If you're using Actions on Google, then your welcome Intent will be called when your Action is first invoked. The user wouldn't say anything besides "talk to action name".
Using the Actions on Google test emulator, this is provided as a button.
If you're using the Dialogflow tester on the right side of Dialogflow, you need to enter one of the invocation phrases for the Welcome Intent, but these phrases aren't typically used as part of the Action itself.

Is it possible to bot to prompt user for input, with user input? [duplicate]

I am creating a chatbot in dialogflow, and I want it to prompt the user for input as soon as it load. E.g
"Hi, how may I help?"
I am able to get it to response once a user says hi, but not without that input. Any ideas?
Check out Dialogflow Events
Events allow you to invoke intents based on something that has happened instead of what a user communicates.
More specifically Welcome Event, you can start typing "Welcome" in the Events section of an intent
Common events like WELCOME events may be auto-completed to help you pick the right event.

Manage Timeout with actionon Google and DialogFlow

I'm tryng to create a Chat Bot using DialogFlow with webHooks and Actions on Google.
I need to manage a timeout i.e when the end user did not use the Chat Bot for a configured amount of time, i need to exit from conversation without user interaction, same result as described here but without any input.
conversation-exits
I cannot find info about this automatic triggered action any hint?
Is this possible?
The conversation-exits you are referring is for exiting the Conversation when the user says Cancel, Exit, Stop etc.
To handle No User Interaction, you could do the following:
Create a new Intent and set event = "actions_intent_NO_INPUT"
In the webhook, if this intent is triggered, set the rePrompt count flag and ask for user input.
If the count reaches 2-3 (as desired), end the conversation by using conv.close()
Check out the following page on RePrompts and No Inputs and Best Practices.

Can I show the quick replies everytime the user opens his messenger chat?

I want to show the quick replies in messenger bot every time they open the conversation. Is it possible?
I think you can invoke an event to get your task done. event are used to invoke intents by an event name instead of a user query. you can define the event name in the intent and call to trigger that event from your back-end implementation. please check this for more information.
https://dialogflow.com/docs/events
also if you are creating a custom UI(won't work in your case) for the chat basically you can hard code whatever the reply you want as the first message. then it will appear always when the user open the conversation.

How to close mic in google assistant app

I had submitted my app for review, but Google replied with "mic" issue. Google Replied :
During our testing, we found that your app would sometimes leave the mic open for the user without any prompt. Make sure that your app always says something before leaving the mic open for the user, so that the user knows what they can say. This is particularly important when your app is first triggered.
Some Points:
1. app.ask()---leaves the mic opens.
2. app.tell()---app leaves the conversation.
I have also enabled the "toggle" of "Set this intent as end of conversation".
Any suggestions??
My app is one to one i.e. If user ask "my address" then address is shown, If "show me direction to PLACE_NAME" then directions are shown. BUT after it mic opens. How to close it?
-----UPDATED-------
fuction someName(app)
{
//---code-----
app.ask('Alright, your address is '+ user_address);
}
I don't want to use app.tell() as it closes the app.
Some other suggestion for this one to one Q/A conversation.
If you are doing fulfillment through a webhook, then the "end conversation" toggle is ignored in favor of what you are sending from your webhook.
You don't show any code, but as noted:
If you use app.ask() or one of the variants of it, the message will be sent to the user and the microphone will be left open. In this case, you should make sure it is clear what you're expecting from the user - in other words, ask a question or prompt them.
If you use app.tell(), the message will be sent to the user and the microphone will be closed. This will end this conversation.
It sounds like, in your case, you should be using app.tell().

Resources