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

Dialogflow CX - Data Stores (hybrid agent)

Hi everyone,

I'm building a hybrid agent that should move from a page to another while using Data Stores responses, but it seems that it's not possible to use the same user input to trigger an intent (or route) and trigger a Data Store response at the same time.

I also read in other posts to store the user input as a parameter, but I don't find a way to trigger Data Stores with said parameter.

Thanks in advance.

0 1 120
1 REPLY 1

Hi @JDomC365,

Welcome to Google Cloud Community!

You're right, it's not possible to directly trigger both a Data Store response and an intent or route simultaneously using the same user input. However, we can achieve this desired behavior by using a combination of different techniques.

1. Using Context and Parameters:

  • Capture Input: Store user input as a parameter in the current context.
  • Trigger Intent: Use the input to trigger the appropriate intent.
  • Data Store Query: During the intent fulfillment process, utilize the stored parameter to query a Data Store and obtain the response. This documentation covers Cloud Firestore, a NoSQL database ideal for integration with Dialogflow CX.
  • Route to Next Page: Use the Data Store response to route the conversation to the next page.

 

2. Using Follow Up Intents: 

  • Initial Intent: Trigger the first intent with the user input.
  • Store Data: In the intent's fulfillment, query the Data Store and store the response in the context.
  • Follow-up Intent: Use the stored data to trigger a follow-up intent, such as showing the retrieved information.

Key consideration:

  • If you already have a Conversational Agent (Dialogflow CX), you can upgrade it to a hybrid agent. This hybrid approach combines the precision of conversation controls such as flows, parameters, intents, conditions, and transitions with the generative capabilities of a data store handler.
  • Select the suitable Data Store for your needs, such as Cloud Firestore or Cloud Spanner.
  • Implement logic to handle Data Store queries and responses.

For more details, refer to the Dialogflow CX documentation.

I hope the above information is helpful.