Can’t Override Default Cancel Intent - actions-on-google

Is there anyway that I can add a custom message when user says ‘Cancel’ or ‘Exit’ to end the conversation?
I have added intent for these utterances and connected it with my webhook but the message I send back in app.ask() is not displayed or read.

This is currently a known issue and you cannot override these words currently. You can handle handle other words like "quit", "finish", "exit", etc.

Done using API.AI. (see the picture)
http://i.imgur.com/WDQWmwb.png

As per this specification
Conversation Exit google assistant
probably you will only able to do an app.tell() in your webhoook because this must be a final Intent (you can tell something to user but not ask and waiting for a response), see point five of suggested configuration:
Enable Set this intent as end of conversation
In every case if you use a weebhhok take care: The maximum execution time allowed for conversation exit requests is 2 seconds

Related

How to prevent google action from closing the conversation?

I'm developing a Google Action through DialogFlow and a webhook (that will run on a Nest Hub) that I want to act like this:
the user invokes the action "Hey Google, talk to ACTIONAME"
through the Default Welcome Intent ("hooked" to my web service) the Action replies to the user and open a website
app.intent('Default Welcome Intent', conv => {
conv.ask('Hi! I'm opening your site')
conv.ask(new HtmlResponse({
url: 'https://MY_IOT_SITE'
}))
})
now, the user could be "silent" for mins or hours, but I'd like to prevent Google Actions to close the ACTIONNAME and return to the clock, while until now the action closes after a couple of minutes
Is it somehow possible?
Thank you.
This is not possible. The platform intentionally places an upper bound on how long an action can run without any user input. This is done so that an action cannot occupy the device longer than expected and prevent future inputs from unintentionally getting routed to your action rather than the Google Assistant.
You can take a look at additional guidelines when developing your web app.
Since your question refers to an IoT-related website, you may want to take a look at the Smart Home reference, which provides an alternative way to let users control smart home devices with their voice or built-in graphical widgets.

Provide different responses to options in an Assistant List using only Dialogflow?

I have an intent with an Assistant List containing two options, Apples and Cheese. I want to provide a different response to each option chosen.
My first attempt was to use follow-up intents for each item, but when I do this I get a “not understood” message when tapping/choosing the item. On reading more, I understand this is because the actions_intent_OPTION event has been fired and there is no intent to handle it.
My second attempt was to add the actions_intent_OPTION event handler to each of my follow-up intents. When I did this, only the Cheese intent was invoked each time. I understand this is because actions_intent_OPTION can only be handled by a single intent.
So my conclusion is that the only way I can provide different responses for different items in an Assistant List is to handle this event with a webhook, and that it’s not possible using Dialogflow alone. Can anyone confirm or point me in the right direction if not?
The answer is, as suspected, that you can’t use an Assistant List purely in Dialogflow, you have to add a handler function in the fulfilment, that fires on the event actions_intent_OPTION. For example:
const option = conv.arguments.get('OPTION');
if (!option) {
conv.ask('No choice made');
} else if (option === 'optionA') {
// Do something
} else if (option === 'optionB') {
// Do something else
}
Follow this ideal approach:
remove follow-up intents
add a new intent with event set as actions_intent_OPTION
enable webhook for the new intent
in the webhook extract the selected option
based on the selected option, pass the required response
If you want to use only Dialogflow, then it won't work! This is because, when you select an option, the output context and the generated event both will be the same as the 2 intents - cheese and apple. There will be no way for the AI engine to decide which Intent should be triggered. Whichever intent is first, it will be called every time.
I tried to recreate what you did all be Dialogflow and even put cheese and apple as training phrases for the 2 intents just to provide some differentiation to the AI engine, but it still selected only one intent.

MS Bot framework i want to put a form builder in an open conversation

I want to start Form conversation chat in Microsoft Bot framework.
if(user says hello)
{
reply = what u want to listen hi or hello
if(user says order)
{
reply= start a formbuilder.form with order form workflow
}
if(user says hello)
{
reply= hello
}
}
My problem is the first thing i do always works
example: if i say first chat line as order it starts order form but it never goes to the normal conversation mode even if the form ends.
if i start hi then it always goes in hi mode never goes or create order form on typing order.
Need it to be dynamic
you can use below code to end your conversation when you are in a dialog or a conversation flow ends.
context.Done<object>(new object());
or
context.Done(true);
do let me know if you need any help further
Per my understanding, you want start specific dialogs while triggering different words like "hollo" for greeting dialog, "order" for form dialog.
I think there are two methods to achieve this in C#:
You can leverage Recognize intents to implement LUIS, which can identify your users' intent from their spken or textual input, or utterances. Trigger specific dialogs for each LUIS intent.
For this solution you can refer to the official document Recognize intents and entities with LUIS using a prebuilt domain for details, and refer to https://github.com/Microsoft/BotBuilder-Samples/tree/master/CSharp/intelligence-LUIS for a sample for your reference.
You also can build Global message handlers using scorables in your bot application for yourself. With which, you can route users to certain fuctionality by using words like "help," "cancel," or "start over" in the middle of a conversation when the bot is expecting a different response.
Please refer to https://github.com/Microsoft/BotBuilder-Samples/tree/master/CSharp/core-GlobalMessageHandlers for the sample for this solution.
Hope it helps.

Is there a way to define input context for a Google Action with the Actions SDK?

In the DialogFlow console, you can set an input and output context for an intent.
I would like to have the same functionality using the Actions SDK.
Since I can set the context in my fullfilment webhook in the code, the output SDK is covered.
However, how do I set the input context for an intent to only trigger if that context was fetched?
I could not find this in the documentation examples.
I don't believe you can in the same way, which is part of why they added Dialogflow.
Although as part of your response you can indicate the ExpectedInput for the next Intent, the documentation for the ExpectedIntent makes it clear that your Intents are only used for speech biasing - you'll always get the built-in TEXT Intent.
In fact, this documentation says that you'll only get custom Intents for the initial call - later Intents are always triggered with a built-in one.
Update: One thing you can do is to include information in the response that will be sent back to you in the next request.
If you're using the JavaScript SDK, this is done with the second parameter to ask() and is available via the getDialogState() function.
If you're sending back JSON, this is done using the conversationToken attribute and is available in conversation.conversationToken in the request object you're sent the next round.

Google analytics email open tracking with measurement protocol

we tried to track email opens with google analytics and measurement protocol. We exactly followed instructions given in http://www.lunametrics.com/blog/2013/06/17/email-tracking-google-analytics/ and http://dyn.com/blog/tracking-email-opens-via-google-analytics/
The problem is that every email open is counted also as a session which is not correct. Can you give me any advice how we can track opens without recording sessions? Thank you
Every hit in GA always starts a session, so this is not possible. If you don't want it to appear in your normal profile, try setting a pageview with prefix so you can filter them out into a seperate View.
e.g.
/virtual/email-open
Then set up your filters.
Session begins with any interaction. Don't be sad, it is correct.
You can extend your data with some identifier like virtualpagname or whatever and than make segment or filter.
dp=mypage.com
dh=/emailing
dt=Email Gate
You can either use datasource parameter:
ds=email
https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#dataSource