0
votes

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.

We tried using watson settings(passing user id and customer id as parameter ) but we are not getting the per user details , we only got total user count details.

Please let me know how we can achieve this from application side or any other alternative approaches.

Code:

version_date: '2018-02-16',
version: 'v1',
context : {
    metadata : {
       "user_id": "{1234}"
       }
     },
 headers: {'X-Watson-Metadata':'customer_id=user777;customer_id=xyz'}
 });
1
Hi All, How can we achieve above issue, Any Suggestions? - user2319726
@data_henrik, we are using standard plan - user2319726
@data_henrik, below is the code, we are able to see the user count increased by this but we are not getting per user api call details . var conversation = new ConversationV1({ url: 'gateway.watsonplatform.net/conversation/api', username: process.env.CONVERSATION_USERNAME, password: process.env.CONVERSATION_PASSWORD, version_date: '2018-02-16', version: 'v1', context : { metadata : { "user_id": "{1234}" } }, headers: {'X-Watson-Metadata':'customer_id=user777;customer_id=xyz'} }); - user2319726
please edit your question and add the code - data_henrik

1 Answers

0
votes

You need to send the user_id and other information with each call to the message API. See the V2 API and its message method for the structure of the context object.

The message method is supported by the various SDKs (Node.js, Python, ...). Before making the call, you would need to make sure that the user_id information is added to the context object. The code that you shared seems to indicate that you only passed the information on the initialization.

Once the user_id is sent, the graphs described in this overview are generated. For other analytics you would need to use the log files. Obtain the logs (download them) and run your custom-analytics on them. AFAIK the Watson Assistant analytics only have averages across users.