I'm trying to upload a previously downloaded follow-up intent (in .json) to another parent intent with no success in the Dialogflow page. Error can be seen in image attached
I've changed "parentId" and "rootParentId" to match the new parent intent without luck...
This is the answer from support team, hope it helps others:
Currently, Dialogflow doesn't provide a default feature or shortcut in the developer console to put the follow-up intent to a parent intent by uploading JSON files. But you can always achieve this by exporting your agent as a zip file and manually add the "parentId" ("id" of parent intent), "rootParentId" ("id" of root parent intent) fields in the JSON file of the follow-up intent and restore your agent in the developer console with the modified agent zip file.
Unfortunately, I don't believe there is a way for a user to move a follow-up intent to another parent intent. It's also not possible to transition a top-level intent into a follow-up intent.
You can export the total dialogflow agent data, and modify the json files in the "intents" folder.
And there, you will find these values and modify the parentId and rootParentId according to the parent intent's "id". Then recompile the zip, Delete all intents, restore using the modified zip file.
{
"id": "c6f2883a-aa05-46e0-af0e-58dc96ebe7a0",
"parentId": "21e013a7-091d-40e4-89be-1d6a842d7fd6",
"rootParentId": "21e013a7-091d-40e4-89be-1d6a842d7fd6",
.....
}
Related
Hi I’m look in for simple solutions for passing values between intents and contexts.
I’ve tried to set output context (c1) for intent A, and use c1 as input context for intent B. However, I’m not able to access the parameters value within intent B. Do I have to use fullfillment to implement this ?
Besides, I also want to use the previous parameters’ value of intent A when intent A is triggered next time. Again, can we do this without using fullfillment?
If fullfillment is essential, can you give some guidance please?
Accessing parameter values from one intent to another where contexts are used can be done from the Console itself. Fulfillment Webhook response can also be used but for your use case this can be done from the Console itself.
You can refer to the below replication steps:
In the text response of Default Welcome Intent add Hi what is your name? and add an output context awaiting_name.
Create another Intent Get Name and in that pass “awaiting_name” as input context . Pass some training phrases like "john,sandeep,jacob" and map it with them to the #sys.given.name entity.
In the Get Name Intent the text response is Ok $name, what is your email address?. Add awaiting_email in the output context field of this intent.
Create another intent “Get Email” and add awaiting_email in the Input context. Add training phrases like "sandeep#abc.com","john#xyz.com" and map them with #sys.email entity.
When you want to fetch the parameter value from another intent to the present intent where context is used you need to call it by #context-name.parameter-name as per this doc.
My final output response is Thanks #awaiting_name.name we will contact you soon on $email
Coding in NodeJS - Google Cloud Functions and actions-on-google library. All intents are fulfilled from the back-end.
I have an "Add to List" intent that matches to a "product" entity. When the user says something that does not match one of the entries in the entity list, it defaults to an "Add to List Fallback" fallback intent which asks the user "Do you want us to follow up with you about this unlisted product?", which has a fallback intent of "Add to List Fallback - Yes" for a "yes" answer.
My question - how in that final intent can I access what the user said in the first place? It never matched as the "product" parameter. I'm thinking it's something to do with the context, but not sure how to set that up in DialogFlow or access it in JS.
Thanks.
Since you are using fulfillment for everything, including that Fallback Intent, the easiest solution would be to store the value of what they said in the Fallback Intent in either a context or in the Assistant's session storage and access it from the Intent Handler for the "yes" Followup Intent.
Got it! This is how I was able to store the value in the conversation session data:
conv.data.reqProduct = conv.request.inputs[0].arguments[0].rawText;
I have a certain Intent set-up on Google Dialogflow which matches employee leave-status by a very specific single-word keyword. For example, if the user types "Submitted", it shows that the description stating leave has been in submitted status.
However, when the exact same keyword is selected from a List View of Google Assistant, dialogflow is not able to match the intent.
How is it possible that the same keyword does not match Intent when clicked from a List View, but the same query works in Plain Text?
When a list item(or carousel card) is tapped, it generates an event which will hit your webhook, unlike the simple text message.
1st way (if your webhook handling the response)
So you need to handle it in your code.
Generally, it should have intent as actions_intent_OPTION. from there you need to segregate it.
2nd way (if your code is not handling the response)
In this way, your intent must be able to handle actions_intent_OPTION event generated by the list(or carousel).
for that, your intent need to add the event as shown in below image (Basically it tells the dialogflow that whenever the actions_intent_OPTION events triggered, this intent it capable to handle it, but currently in your case no intent matches the description and it's going to Default Fallback Intent)
So whenever the list item tapped it can handle the flow.
For more refer this documentation.
I'm new to dialogflow. In my default Hello Intent, I have something like this:
Good day! My name is xyz and I'm here to help you. May I know your name please?
This response is for when users say something like "hi"
After that, I will pass the context to another Intent to wait for the name input
I would like to avoid asking these information if I already have the user's contact information. Is there away to check for the context and trigger a different response?
If you just need to check if the context contains a property called "name" or similar, simply add a parameter in the second intent, set its value to #awaiting_contact.name and enable the mandatory option. That will let you define prompts if the property has no value, so you can re-ask the user.
However, I'm not sure what the Welcome Intent context has. You are just giving a welcome message. Then, when the user inputs his name, this will trigger a different intent.
I am developing a google assistant app on Dialogflow.
And I have a intent that receives two entities: #name and #age
Using the fulfillment throught the inline editor I verify if the #age is below 18.
In that case I need to ask for additional info, I need to ask the name of the person responsible for the child.
I looked around the internet, including the fulfillment samples at https://dialogflow.com/docs/samples
I believe it would look something like this:
let conv = agent.conv();
conv.ask('As your age is under 18 I need the name of the person responsible for you:');
//Some code to retrieve user input into a variable
agent.add(conv);
But I was unable to find how to do it.
Can someone help me to achieve this?
Thanks in advance.
While you are handling an Intent, there is no way to "wait for" the user to respond to your question. Instead, you need to handle user input this way:
You send a response back from your Intent.
The user replies with something they say.
You handle this new user statement through an Intent.
Intents always represent the user taking some action - usually saying something.
So one approach would be to create a new Intent that accepts the user's response. But somehow you need to distinguish this response from the initial Intent that captured the person's name.
One way to do this would be, in the case you ask the question about who the responsible adult is, is to also set a Context. Then you can have a different Intent be triggered only when that Context is set and handle this new Intent to get the name of the adult.