Search code examples
node.jschatdialogflow-esactions-on-googlegoogle-home

Maintaining a chat between user and agent using Google Actions


I am creating an app using Dialogflow and Actions on Google Node.js library. The logic I am trying to implement is as follows:

  1. User says: Initiate chat.
  2. That user request triggers my webhook which then supplies the agent response.
  3. User replies back to the agent - this is the tricky part because the user reply can be anything, thus the wrong Intent or the Fallback Intent can be triggered.

Is there a way to allow for the unpredictability of a user's response and to keep conversation going between user and agent? In another words, always trigger the same Intent (Chat Intent) regardless of what the user says?


Solution

  • In Dialogflow, you can configure the Default Fallback Intent to connect to web fulfillment. In your fulfillment, you can then route the user's query to your webhook and process a response however you'd want.