Reputation: 11
I've built a custom integration for Dialogflow CX which allows the user to send multiple messages to the Agent. However, the Agent doesn't understand what the user is trying to say when it receives more than one message.
How can I configure my Agent to wait a predetermined amount of time (allowing the user to send as many messages as possible) before trying to reply so that the Agent can make sense of all the text that was sent?
Upvotes: 1
Views: 657
Reputation: 21
Currently, there isn't a built-in configuration in Dialogflow CX that allows the agent to wait for multiple messages before responding to the user. However, you can achieve this functionality using one of the following two methods:
You can utilize the Dialogflow CX API to create a custom solution. With the API, you can programmatically detect intents and parameters and manage responses according to your requirements. This approach gives you more control over the conversation flow. You can find detailed information on how to use the Dialogflow CX API in the Dialogflow CX API documentation.
Another approach is to create a standard webhook within your Dialogflow CX Agent. By setting up a webhook, you can wait for multiple messages from the user before sending a response. To implement this, you will need to manage the conversation programmatically. To ensure the webhook doesn't time out prematurely, set the webhook timeout to around 10 seconds. This way, it will continue to wait for additional user input until you're ready to respond. Keep in mind that using this method will require you to handle conversation state and responses in your webhook code.
Upvotes: 0
Reputation: 670
Unfortunately, that's not how Dialogflow-CX agents work. You can't wait a predetermined amount of time before answering: to each prompt from the user the agent will provide a fulfilment if it's specified.
The only way to achieve what you're asking is to develop an integration starting from the API they provide. You could develop an integration which waits a determined interval, joins all text received and sends it to the API via detectIntent request. This way you could have the user input multiple texts and only return a response when needed, but you'd need to handle the logic yourself (meaning a basic to intermediate knowledge of a programming language probably).
Upvotes: 1