We have developed a watson assistant chatbot and integrated with client application. Now we want know how many times each user calling watson service from client application and its billing details per person.
I have enabled the user metrics option using below approach and Active users graph is updated with user count. But I want to know the per user api calls details, I have checked in viewLogs(IMPROVE TAB) and Usage tab in billing section and its not showing the per user api calls and billing details. Please let me know where i can get the details of each user api calls details.
https://console.bluemix.net/docs/services/conversation/logs.html#user_id
"context" : {
"metadata" : {
"user_id": "{UserID}"
}
}
There is no UI to show chats from a specific user. Instead, as described here you must use the REST API via curl to retrieve logs.
However when using user_id you cannot filter for a specific user. I have tried actually doing this but I am not able to retrieve logs for a specific user_id.
You can retrieve logs filtered for a customer_id and therefore I recommend you set both user_id and customer_id to the same value, and filter using customer_id.
To set customer_id do as the SDK docs say and add a 'headers' object to the payload sent to Assistant with X-Watson-Metadata with value customer_id. For example in NodeJS:
Then you can retrieve logs for a specific customer from Assistant by filtering by customer_id: