hi,
i created a conversational agent by using 3 playbooks, 1 master and 2 sons and i use the Slack integration so that customers can get information by tagging the agent directly in Slack (e.g., @Agent _name tell me how many orders were placed yesterday).
It works, but i need to set session data for 10 sec (and not 30 mins by default).
How can i do? I read the manual (Sessions | Dialogflow CX | Google Cloud) but i didn’t understand where and how i put the parameter QueryParameters.session_ttl.
Thank you,
Alessandro P.
Hi Ale_Pascali,
Welcome to the Google Cloud Community!
If you’re using the built-in Slack integration in Dialogflow CX, the default 30-minute session timeout cannot be changed. To achieve a 10-second session TTL, you must build a custom Slack integration layer that sits between Slack and Dialogflow CX, allowing you to control the DetectIntent API parameters.
This involves creating an intermediary service that processes Slack messages and then sends them to Dialogflow CX.
Here are some workarounds to set it up:
- To avoid duplicate responses, disable the built-in Slack integration by navigating to the Integrations section in the Dialogflow CX console and turning off the Slack integration.
- Set up a custom Slack app with the necessary permissions (e.g., messages:read, chat:write).
- Create a service using Google Cloud Functions that acts as an endpoint for your Slack app.
- Configure your Slack app to send user messages to your backend service.
- In your backend service, when you receive a message from Slack, you’ll make a programmatic call to the Dialogflow CX DetectIntent API. This is the point where you can include the QueryParameters.session_ttl.
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.