I want to redirect the chat from Google dialogflow to a human. For this, I want to get the history of the conversation made by the user. Is there any platform where the history is being stored? If yes, how to access it. If not, how to achieve this functionality..
Here, you can review statistics relevant to the specific agent. Dialogflow does not provide any API to retrieve conversation history directly. You will have to log conversations to Google Cloud and retrieve from there.
Now your Dialogflow logs are in Google Stackdriver. You can either store these logs in cloud itself or export the logs to a third party server. To enable this you will have to configure a Log Router. According to Google cloud documentation,
romungi-MSFT answered • Jan 27 2021 at 11:19 PM | LauraHuico-1534 commented • Jan 28 2021 at 12:20 PMACCEPTED ANSWER @LauraHuico-1534 For a bot created using bot framework you need to enable storage of the conversations to a database like cosmos DB or blob storage to get the chat conversation history.
This will write Dialogflow logs to Google Stackdriver. Under Google Project, click the id of the project you wish to work on. The Google Cloud console will open. To view logs from the cloud console, go to Logs View. The dialog flow logs will be displayed, and you can filter them based on your queries.
There's no current API to retrieve session history. The only alternative is to save the history yourself.
You can use any database you're familiar with, MySQL, MongoDB, or even a cloud hosted database such as Firebase Realtime Database
The code won't be too hard, everytime the user sends a new message and every time the bot answers, you will have to save that message to the database, with the right timestamp and chat ID.
When the user is redirected, you will get all the messages from that session using the chat ID, sort them by timestamp, and you will have your complete chat history available.
Some answers/tutorials that might help you:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With