Problem cancelling intent while filling intent parameter with word "disregard" - dialogflow-es

I have a google Action with intents that require slot/parameter filling. My Action was recently rejected by Google for leaving the mic open without prompting the user and I cannot resolve the issue.
As an example I have an intent named "trunk" which has a parameter "vehiclename".
I invoke the “trunk” intent without filling the vehiclename parameter. The assistant attempts to fill the first parameter by asking me “what is the vehicle name?” (verbiage I've defined to help with the slot filling). I respond with “disregard”. Then the assistant replies with “Sure, cancelling.” (or another similar phrase). I want to know where this response is coming from. The detailed response json is:
{
"conversationToken": "[]",
"expectUserResponse": true,
"expectedInputs": [
{
"inputPrompt": {
"richInitialPrompt": {
"items": [
{
"simpleResponse": {
"textToSpeech": "Sure, cancelling.",
"displayText": "Sure, cancelling."
}
}
]
}
},
"possibleIntents": [
{
"intent": "assistant.intent.action.TEXT"
}
],
"speechBiasingHints": [
"$vehiclename"
]
}
],
"responseMetadata": {
"status": {
"message": "Success (200)"
},
"queryMatchInfo": {
"queryMatched": true,
"intent": "686ab942-5132-451b-9a16-16dbe8648ad0"
}
}
}
This response body has “expectUserResponse”: true which explains why the mic is being left open. And since the phrase "sure, cancelling" doesn't prompt the user, it violates google's design guidelines.
What’s important about this is that I have not created this response! It is nowhere in our intents, and it is not being returned by our API webhook. Our webhook is not even being called in any of this example.
Syntactically it makes sense that google assistant would treat “disregard” as any of the other stop words (e.g. “stop”, “cancel”, “never mind”, etc.) but it doesn’t treat it the same. Any of those other words exits the app as one would expect.
Furthermore, none of these stop words are invoking a “quit” intent which has the actions_intent_CANCEL event attached to it. According to google’s documentation here: https://developers.google.com/assistant/df-asdk/conversation-exits when uttering any of these exit words, the conversation should be routed through to our “quit” intent, but it doesn’t.
I’ve also tried attaching the actions_intent_NO_INPUT action to our quit intent, but that also isn’t triggered in this situation. After the assistant has responded with “sure, cancelling”, the conversation is basically stuck there and I can’t invoke another intent or provide any more dialog to prompt the user.
Main takeaway:
Where is this “sure, cancelling” response coming from?
How do we route the conversation to another intent from that response so that we can prompt the user again OR
How do we route the word “disregard” in such a way to avoid this errant response? Can we disable it?
reminder: this is only an issue when trying to fill an intent parameter, and it is only an issue with the word “disregard”

Related

How to call one intent from another intent in lambda (nodejs)

I have a lex bot which triggers lambda where slot conditions are checked(eg:phone number should be 10 digit) and it returns a closing response of text.
function closeresponse(intent_request, session_attributes, fulfillment_state, message) {
return {
"sessionState": {
"sessionAttributes": session_attributes,
"dialogAction": {
"type": "Close"
},
"intent": {
'name': intent_request[ENTITY.sessionState][ENTITY.intent][ENTITY.name],
'state': fulfillment_state
}
},
"messages": [message],
"sessionId": intent_request["sessionId"],
"requestAttributes": intent_request[ENTITY.requestAttributes] ? intent_request[ENTITY.requestAttributes] : {}
}
}
after closing response i am not able trigger any function
i need to trigger another intent which has yes or no response card in same lambda function
If you want to confirm this intent dialogAction have to be confirmIntent.
If you want to call another intent from this intent the dialogAction have to be elicitIntent.
The dialogAction Close indicates that there will not be a response from the user. In other words, this type doesn't take any further input and will end the entire intent. Therefore, Lex doesn't expect further input from the user.
For your case, you need to accept further input from the user so Close isn't the right dialogAction here. As Jinen said, try changing the dialogAction type to ConfirmIntent or ElicitSlot.
If you need the intent to end after the user responds with yes/no, I think ConfirmIntent is right in line with what you're looking to do. For this one, Lex asks the user a yes or no question on if the intent is complete and ready to be fulfilled.
This piece of documentation explains the different types of dialogAction. It's a useful reference for if you get stuck :)

Incomplete API response for getUsers

I'm implementing an API integration for DocuSign, and I'm currently hitting the following endpoint: /v2/organizations/{organizationId}/users
The documentaton for this: https://developers.docusign.com/docs/admin-api/reference/users/users/getusers/#response200_docusign.api.organizations.web.models.restapi.v2.response.organizationuserresponse
The documentation is showing a response field, user_status. However, when I call the API, I get a response as follows:
{
"users":[
{
"id":"xxx-xxx-xxx-xxx-xxx",
"user_name":"Xxxx",
"first_name":"",
"last_name":"Xxxx",
"membership_status":"active",
"email":"xxxx#gmail.com",
"membership_created_on":"2021-07-30T02:24:20.243",
"membership_id":"xxxx-xxxx-xxxx-xxxx-xxxx"
},
{
"id":"yyy-yyy-yyy-yyy-yyy",
"user_name":"Yyyyy",
"first_name":"Yyyyy",
"last_name":"2",
"membership_status":"active",
"email":"yyyyyyy#yyy.yyy",
"membership_created_on":"2021-07-30T02:26:59.313",
"membership_id":"yyy-yyy-yyy-yyy-yyy"
},
{
"id":"zzz-zzz-zzz-zzz-zzz",
"user_name":"Zzzzz",
"first_name":"Zzzz",
"last_name":"Zzzz",
"membership_status":"active",
"email":"zzz#zzz-zzz.net",
"membership_created_on":"2021-07-15T04:05:18.803",
"membership_id":"zzz-zzz-zzz-zzz-zzz"
}
],
"paging":{
"result_set_size":3,
"result_set_start_position":0,
"result_set_end_position":2,
"total_set_size":3
}
}
As you can see, we have no user_status. Do we need to send any request parameters, to expand the response, or has this field been removed from the API response without being updated on the API documentation?
Or, could I assume that the user is active, if it appears in the API response, with a membership_status of active?
Thank you very much!
membership_status is probably what you're looking for.
there's no such thing as user_status because a user can be a member of multiple accounts and each membership can have a different status.
Here is a useful diagram:

followupEventInput does not trigger the corresponding intent

The followupEventInput does always trigger the 'default fallback intent'. I have no idea why it doesn't trigger the corresponding intent.
Any help would be appreciated!
my code:
return {
"followup_event_input": {
"name": "example"
}
}
Can you share some details on the two input context , also as you are trying to invoke the intent via custom event , you can remove the input context. If you want to keep the input context make sure that the context are alive before hitting the intent.
Also , were are you referencing this from :return { "followup_event_input": { "name": "example" } }
You can follow this link to get more idea around custom events :Custom Events

Send back rich responses to Actions on Google through Dialogflow webhook fulfillment

To get Google Assistant to display rich responses to the user, one must provide it with a response like the example on the Actions on Google docs. However, since I'm using Dialogflow as the intermediary party between my server and Google's, I need to provide some kind of response to Dialogflow in my webhooks to indicate that there should be a rich response. As you can see from that link, the docs mention how to send rich responses to FB Messenger, Kik, LINE, etc. but not Google Assistant.
What am I missing here? I see an option for rich responses in the Dialogflow web console, but there I can only seem to input hardcoded responses with no dynamic data from the server. What's the right way to do this?
Using the Dialogflow integration, the response JSON your webhook should return for a rich response will look like:
{
"data":{
"google":{
"expectUserResponse":true,
"noInputPrompts":[
],
"richResponse":{
"items":[
{
"simpleResponse":{
"textToSpeech":"Welcome to this Basic Card",
"displayText":"Welcome to this Basic Card"
}
},
{
"basicCard":{
"buttons":[
{
"title":"Button Title",
"openUrlAction":{
"url":"https://some.url"
}
}
],
"formattedText":"Some text",
"image":{
"url":"http://some_image.jpg",
"accessibilityText":"Accessibility text describing the image"
},
"title":"Card Title"
}
}
],
"suggestions":[
{
"title":"Aléatoire"
},
{
"title":"Top"
}
]
}
}
}
}
If you are using the Node.js library You can also use the provided methods for Dialogflow integration to build your rich response.
If you're using Node.js you should call the method buildRichResponse() and then add items as child of that object, like this:
app.ask(app.buildRichResponse()
.addSimpleResponse('A text to be spoken')
.addBasicCard(app.buildBasicCard('Some text to be displayed')
.setTitle('A title')
.addButton('Read more', 'https://example.google.com/something')
.setImage('https://example.google.com/image.png', 'Image alternate text')
.setImageDisplay('CROPPED')
)
);
That was an example for adding a BasicCard, you can see how to add Carousels, Lists and Suggestions Chips at https://developers.google.com/actions/assistant/responses#rich-responses

Web push messaging.setBackgroundMessageHandler not working

I implemented web-push notifications on my site with Google Firebase service.
firebase.google.com/docs/cloud-messaging/js/client
I tested it and everything works fine, but when my website window isn't in focus (it's in background) or closed and if I get push-notification it will disappear after 20 seconds.
In my https://hdlava.me/j/firebase_subscribe.js file I added
requireInteraction: true
flag in messaging.onMessage so if I get push mesage when my website is open the message won't disappear until I click on it.
I tried to add this
requireInteraction: true
in messaging.setBackgroundMessageHandler in my https://hdlava.me/firebase-messaging-sw.js, but it's not working. Even:
console.log('[firebase-messaging-sw.js] Received background message ', payload)
doesn't work. It looks like whole messaging.setBackgroundMessageHandler does not work.
Can someone please help me figure out what is the problem ? Also if I use in firebase-messaging-sw.js
self.addEventListener("push",function(event)
instead messaging.setBackgroundMessageHandler so I have two messges at once. First message disappears and second one doesn't, but second one is not clickable. Is it possible to prevent first message and make second one to be clickable ?
Referring to the FCM docs:
https://firebase.google.com/docs/cloud-messaging/js/receive
"Note: If you set notification fields in your HTTP or XMPP send request, those values take precedence over any values specified in the service worker."
So, if you have
{
"notification": {
"title": "Your title",
"body": "Your message"
},
"to": "topic",
}
It never triggers the BackgroundMessageHandler. Because sending data this way, simply overrides your variables. If you want to trigger it you need to send your notification like this:
{
"data": {
"notification": {
"title": "Your title",
"body": "Your message"
}
},
"to": "topic",
}

Resources