srikanth
srikanth

Reputation: 308

dialogflow default fallback intent is not triggered

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

Upvotes: 1

Views: 4631

Answers (2)

Prisoner
Prisoner

Reputation: 50731

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

Upvotes: 5

mattcarrollcode
mattcarrollcode

Reputation: 3479

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

Upvotes: 3

Related Questions