1
votes

I am trying to build the dialog flow app with v1 API support and in my case, my test app gets crashed or stopped when non-utterance words spoken by the user even though I have a fall back function in my agent, it doesn't get triggered.

intentMap.set('Default Fallback Intent', fallback);
agent.handleRequest(intentMap);
function fallback(agent) {
        var conv = agent.conv();
        // conv.ask(`I didn't understand`);
        conv.ask(`I'm sorry, can you try again?`);
        agent.add(conv);
    }

I didnot configured/added any intent on dialog flow intents for Fallback intent except my Welcome Intent.

[Update] Fallback intent configuration on dialogflow on intents intent configuration

2
Can you update your question with an image of the "Default Fallback Intent" configuration that you have in Dialogflow?Prisoner
@Prisoner Thank you for your reply, I've added the screenshots of the Default Fallback Intent.srikanth
Hi @Prisoner, For a note there Contexts, Events Phrases are left empty, and I have enabled webhook opt. Though No luck, the project I am using was one of the default template provided by dialog flow initially there was no "Default Fallback Intent" within the template. So I've created one with the value "input.unknown" in "Action and parameters".srikanth

2 Answers

5
votes

Based on your screen shots, the issue is that you didn't actually create a Fallback Intent. You created an Intent with the "Highest" priority to handle phrases, but with no phrases to match. So it doesn't match anything.

Fallback Intents are a special Intent that match when nothing else matches for the contexts that are active. To create a Fallback intent, from the Intents listing, select the three dots in the upper right corner

enter image description here

Select "Create Fallback Intent"

enter image description here

You will notice the page is slightly, but just slightly, different. Set the name for this Fallback Intent (to whatever you want, but it will need to match what you use in your code exactly), turn on webhook fulfillment, and save.

enter image description here

3
votes

You need to enabled fulfillment for the default fallback intent:

  1. go to Dialogflow's console (https://console.dialogflow.com)
  2. Go to the default fallback intent
  3. select the fulfillment section
  4. Click the switch indicating that the intent should be fulfilled enter image description here