Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Dialoglow CX Generator to fill parameter (NER for address)

Hi ,

I’m trying to set up a flow in Dialogflow CX where the user can search for locations (e.g., “X near me”), but I’m running into issues with handling cases where the user doesn’t provide an address or asks an unrelated question. Here’s what I’ve implemented and where I need help:

Context:

  • Datastore: The integration is with a website.
  • Desired Flow:
    1. From the Default Start Flow, if the user intent is “X near me,” route them to the X Near Me Flow.
    2. Once the intent is triggered, the user input is processed by a generator to extract a target address.
      • Example Input:
        • “Where can I find X near <address>” → Address is extracted.
        • “Where can I find X in my area?” → No address in the input.

Behavior Examples:
Case 1:
User: Where can I find the nearest mall?
Agent: (Intent route triggered)

  • Generator processes input → $session.params.address = null.
  • Agent: What is the address you want to use for your search?
  • If the user provides an address in the next input, the flow works perfectly: the generator extracts the address, and the flow routes to a webhook.

Case 2 (Problematic):
If the user provides unrelated input instead of an address, I want the Datastore to respond if it has a relevant answer. If the Datastore has no relevant answer, I want to route the user back to the start page. Currently, I can’t achieve this functionality.

Technical Setup:
Here’s how I’ve structured the flow so far:

  1. Intent Trigger:

    • If the intent matches, the user is routed to the X Near Me Flow.
  2. X Near Me Flow:

    • Process Address (Page):

      • Routes:
        • Route 1: $session.params.address != null → Route to Webhook (works as expected).
        • Route 2: $session.params.address = null → Route to Ask User For Address (Page).
    • Ask User For Address (Page):

      • Captures user input and routes to Get Address (Page).
    • Get Address (Page):

      • Entry Fulfillment: Generator processes input to extract an address and set $session.params.address.
      • Route: $session.params.address != null → Route to Webhook (works perfectly).
      • Event Handler: Includes a Datastore fallback.

What I Need Help With:
I want the following functionality when the address parameter remains null:

  • If the user’s input triggers a relevant Datastore response, display it.
  • If there’s no relevant Datastore response, redirect the user back to the start page.

I’ve tried using the Datastore fallback in the Get Address (Page), but I can’t get the desired behavior to work seamlessly.

Question:
How can I achieve this functionality while still supporting the address form-filling process and ensuring the Datastore fallback works correctly?

Any insights or suggestions would be greatly appreciated. Thanks in advance!

Flow: 

jordanshans_0-1731674540111.png

 

0 1 137