I heard about this interesting “trick” on a forum a while back, but unfortunately I cannot even find the forum post anymore. 🙁
So here is how you do it.
Use Google Chrome
This will probably work in all browsers, but I know for sure that it works in Google Chrome.
Go to the History tab inside Dialogflow
Open Google Chrome developer tools
In Google Chrome, you can go to Developer tools by going to View > Developer > Developer Tools.
Remember: you should do this in the same tab in which you opened the Dialogflow History. The image below is a screenshot from Google’s website, which is why the tab is empty.
Click on the Network tab
Select the All requests tab
Select an appropriate date range to view the History
Clear any existing information
Click on the “Clear” icon to clear any existing information (if you have any). Otherwise you might confuse yourself with multiple requests in the next few steps.
Below, I show a before and after using the Clear button.
The reason I asked you to clear the information is because you want to identify a very specific response.
Click on the Refresh button
Choose the line item which starts with search
In the All responses list view, you will see a few list items. Choose the one which starts with the word “search”
When you click on the line item, on the right side you will see a JSON response.
Right click and copy the JSON response
Right click on the search line item and select Copy Response.
This JSON response has all the information you need to construct your own conversation logs.
Here is what the response looks like when I paste it into the Webstorm IDE. The outer “sessionConversations” array has individual JSON objects, and each JSON object represents a single session (the way a session is defined in Dialogflow ES) and it is a collection of “interactions” (i.e. array of interactions).
Inside the “interactions” array, you will find the individual queries and responses for the given session. You can drill down into each of these response objects and get all the relevant information such as the user’s query, the bot’s response, the input and output contexts at that step in the conversation etc.
While this JSON format has all the information you need, it will be much easier to use this information if you could convert it into a CSV format.
Convert History JSON into CSV format using BotFlo
Inside my BotFlo app, I allow you to convert this History JSON into a CSV file.
Go to the History tool. You must be logged in to use the tool.
Paste the JSON you copied in the previous step into the text box.
Once you click on the “Update CSV Preview” button, you will see that the JSON is converted into a tabular format like below.
You can then click on the “Download CSV” button to download this information as a CSV file.
Of course, once you have it in a CSV format, you can then use it to calculate your bot accuracy and deflection rate etc.
This website contains affiliate links. See the disclosure page for more details.
"The magic key I needed as a non-programmer" The custom payload generator was the magic key I needed (as a non-programmer) to build a good demo with rich responses in DialogFlow Messenger. I've only used it for 30 minutes and am thrilled. I've spent hours trying to figure out some of the intricacies of DialogFlow on my own. Over and over, I kept coming back to Aravind's tutorials available on-line. I trust the other functionalities I learn to use in the app will save me additional time and heartburn. - Kathleen R Cofounder, gathrHealth