Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

**Conversational Agents Flow - Route on form page only matches if second parameter is repeated?**

Hi,

For a career advice chatbot use-case I have a standard flow in the Conversational Agents (Dialogflow CX) preview. It has two required parameters on the first page:

- goal - a custom entity type
- Coach_or_Browse_Preference - another custom entity type.

Each parameter also has a custom payload with some suggestion chips, giving three types of goals the chatbot can assist with currently (e.g. finding jobs to apply for), and then for the second parameter a choice of whether the user wants to start a coaching session or not.

The first route is an intent route that matches words related to coaching, with a transition to a playbook. It has no conditions.

Then there are three very similar routes that combine an intent with a condition.

  1. The intent matches words related to the use declining a coaching session. 
  2. The conditions look at $session.params.goal and sends the user to a different flow depending on its value. 

    For all of the routes, they are only matched if the user repeats their answer to the second prompt about a coaching session. 

    e.g. user says their goal 'find a job', then agrees to a coaching session by saying 'coaching'. They need to repeat coaching (or anything else that matches the coaching route intent) before it is triggered.  The same is true on the other routes - the user needs to repeat their second answer for the route to be triggered.

Looking at the original response, it looks as if the agent is not seeing the first answer to the Coach_or_Browse_Preference parameter prompt for some reason. 

"PageState": {
"ActiveParameter": "Coach_or_Browse_Preference",
"Name": "Session Goals",
"Status": "PROCESSING_FORM",
"PageId": "fb35ea26-66b8-4dd4-b9cd-19bd0c98072e",
"FormFilled": false
}

Any ideas where I'm going wrong or how to troubleshoot this further?

Thanks
Joe


 

 

0 1 198
1 REPLY 1

Hi @Joe_McFadden,

Welcome to Google Cloud Community!

It seems that your Dialogflow CX chatbot is requiring your users to repeat their response to the second parameter prompt (`Coach_or_Browse_Preference`) before it acknowledges and processes it correctly. This indicates that the initial response isn't being captured properly, causing a delay in your chatbot's flow and only registering the answer on the second attempt.

Here are the potential ways that might help with your use case:

  • Confirm Form Fulfillment: In your page's settings, ensure you select the "Mark Form as Completed" checkbox. This instructs the agent to finalize your page's parameters.
  • Implicit Intent Matching and Form Fulfillment: You may want to add a no-match route at the form level. It may be that you do not have a no-match route on the form level of this page. If not, then the form might be looping. You may also want to add a no-match route at the page level.
  • Modify your Route conditions: You might want to double-check your route after you fill out your form. One way to handle your form fill priority is by adding a condition to each of your form routes: page.form.isFilled = true.
  • Verify Session Parameters: Make sure that your session parameters are being correctly captured and retained across your various routes and pages.
  • Troubleshooting tools: Utilize Dialog Flow CX's built-in debugging tools to track your user's input and your chatbot's responses in real time. This will enable you to pinpoint the issue in the process and understand why the second input is not being acknowledged on the first try.

You can refer to the following documentation, which provides information on Google Cloud's Dialogflow CX. These resources offer detailed insights into specific aspects of Dialogflow CX, such as how fulfillment works, handling form filling and re-prompts, and defining conditions for route transitions:

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.