Trigger intent without input context - dialogflow-es

I have a intent in dialogflow. I assigned input context to it. So now the intent is only getting trigger when context is there. But i need it to get triggered when context is there and when there is no context, intent should get triggered by just by matching utterance.

As of right now there is no way to do this with a single intent. Due to the context it will only trigger that intent with an utterance when the context is available. The only way can trigger an intent with context and one without is by creating another intent which does the same thing and has the same utterances, but has no context.

Related

How can I receive media from users in DialogFlow?

I want to receive an image from the user and handle it with a webhook but there is no MEDIA event. Is there any way I can do it?
A possible solution would be to skip DialogFlow interaction depending on some context, but I have not been able to do this either. If I add an input context to an intent without any training phrase and with high priority, the intent is never executed. Is there a way to do this?

Is there any possibility in triggering the intent without the help of Training phrases?

I have created 5 intents in a Dialog flow. After completion of first intent, it should automatically go to the second intent without the use of the training phase. Is there any possibility to do that?
This probably isn't what you want to do. Remember that Intents capture what the user says or does and not how Dialogflow should respond.
If you want to do a series of things when the user says one thing, then you can do all those things in your fulfillment webhook. Your webhook is where you actually do something based on what the user has said, and this can be handled in one function call or several calls that you make from your Intent Handler.
There are two possibilities either you can use contexts or if you want to handle sequence from webhook service you can use events.
For webhook solution,
Give each Intent a specific event and action.
In your webhook request you will get action of your intent and you can trigger next event based on current action. => Dialogflow
For context solution
You can add Follow up intents for your each intents, Follow-up-intents

How to access previous conversation details in Dialogflow fallback intent

What would be the best way of accessing the previous conversation details when Dialogflow maps the input to a fallback intent?
We'd like to steer the user back into the right direction by re-prompting the last suggestion chips that were given.
The way we do it now is by manually saving the last suggestions and manually resetting them if the conversation is progressing to new intent. Not optimal and error prone.
It would be good if all fallback intents contained the "last intent/response" information.
I also can't find the isFallback properety on the DialogflowConversation object in the AoG SDK. So we're not able to reliably implement logic in the middleware handler. The isFallback property would be very useful to have access to on the conversation object in intent handler functions.
Any best practices for reliably setting and resetting a memory of last conversation for usage in case of fallback?
You can save all your current intent response details in a new output context. Fetch that previous intent response from the previous intent output context and the use that data to create a new response for the fallback intent.
how about if you use conv.action or conv.intent to check for your fallback intent? You can create a middleware function that stores all the information you need from each conversation in user.data if it is not a fallback intent and use that in your fallback intent handler.

Welcome intent creating error in dialogflow

when I created a welcome intent in dialogflow in which "welcome" event is made.
I get error saying:"Intent with empty contexts and events '[WELCOME]' already exists".
I checked through all my intents for the error.
Previously I deleted a welcome intent is this the reason behind that error?
what can be done now?
The WELCOME event is a way to trigger an intent at the beginning of the interaction with the Dialogflow Agent. Although you can have multiple Welcome Intents (one for each of the supported one-click integrations), you can only have one Default Welcome Intent, which is triggered if no messaging-platform-specific Welcome Intent is set.
Therefore, as per the answer in your comments, you already have an intent with the WELCOME event (the Default Welcome Intent), so the error message you are getting is correct, given that you can only have one WELCOME intent per input context.
If you are interested in having different responses for the Welcome Intent, try adding other Training Phrases and Responses, but you will not be able to create another Intent with the same WELCOME event. Alternatively, you may use a different Input Context, and in that case you can have multiple Welcome Intents, although you should take into account that the new ones will only be triggered if the given context is met.

Permission response not handled correctly

Following this command in node.js using the ApiAiApp module:
app.askForPermission('To know what day it is where you are',
app.SupportedPermissions.DEVICE_PRECISE_LOCATION);
I get the following in the Actions on Google Simulator.
It correctly prompts for my response, but then is confused and doesn't recognize my answer! Is there something missing or broken in my API.AI agent? After the askForPermission, there are no other fulfillment calls.
The problem is likely that you need to set an Intent that will be triggered when the permission is granted. You do this by setting the Event to actions_intent_PERMISSION.
This will look something like this:
You can set the Action to whatever makes sense for your webhook, and be sure to enable webhook fulfillment for the Intent as well.
If you need to keep track of where the permission request was initiated from, and handle it through a different Action, you can set a Context and have different handling Intents based on different Context settings.
The Fallback Intent method works because there is no better match at that point since you hadn't specified a regular Intent with actions_intent_PERMISSION. It isn't the best choice, however, since it could match other situations from your user.
The concept that I was missing is mentioned here.
All you have to do is create a child fallback intent for the intent
you are requesting permissions from.
So if you have a few intents that ask for permissions, each of them need their own fallback intent.

Resources