Retrieve a Chat Log watson assistant - ibm-watson

I'm using Watson Assistant and Cloud Function in a basic chatbot. How can i retrieve via Cloud Function (node.js) the chatlog of a specific conversation? I'd like to implement this user functionality. So for example, if the user types "Chat Log", Watson Assistant send him back (via Cloud Function) his chatlog. Thanks.

In case you are using v1 version of the Watson Assistant(WA), you will get the logs via the API: https://cloud.ibm.com/apidocs/assistant/assistant-v1#listlogs
In case you are using v2 version of the Watson Assistant(WA), you will get the logs via the API: https://cloud.ibm.com/apidocs/assistant/assistant-v2#listlogs
In both of these versions, you will find a filter parameter which can be set to the current chat conversation ID or session ID and could be used to get the chat log.

Now there is a REST API that allows to get the user conversations - however this gets all users conversations so you would need to implement some kind of a proxy that would filter these logs anyway.
For this particular use case, I believe, it would be the best to log the conversations into a separate database where the data would be organized by user id. First of all - separate results for particular user can be achieved easilly in this case, second of all - in IBM Cloud in Watson Assistant the chat logs are kept for 30 days - that might not be enough for this kind of functionality.

Related

How to use the Watson Assistant "listLogs" API function for a versioned workspace?

How can I use the Watson Assistant "listLogs" API Function to list the user conversations from a specific assistant ? We have one skill linked to three assistants for our environments (DEV/TEST/PROD), and I want to retrieve the conversations from PROD assistant only. What filters do I have to use ?
What I already tried:
When using the listLogs function with just the "workspace_id" as parameter, it is returning just an empty list.
When using the listAllLogs function with a filter parameter (language::de,workspace_id::my-workspace-id), the resulting list is empty as well
When using the listAllLogs function with another filter parameter (language::de,meta.conversation.assistant_and_skill_reference::"my-assistant-id:main+skill"), again an empty list is returned
As the skill is used in live chatbot, there are thousands of logged conversations, all visible in the Analytics tab of the Watson Assistant console, so the data is definitely there.
UPDATE: This is the out from the Watson Conversation Tool, it's empty
I finally got the information from IBM Support that this is currently not possible.

Create a dialog node that allows for document upload in Watson Assistant

I have created a chat-bot using IBM Watson Assistant and I am trying to find a way to allow the end user to upload documents through the Watson API. Has anyone else tried to achieve this before?
The Watson service only takes text and then tries to classify and respond to it. Your application layer will have to either process this document into some form of a json string, or just collect it and do whatever else you want with it, and then send some kind of indicator to Watson to move on with the conversation.

Change RingCentral behavior in Salesforce App

We've recently integrated the RingCentral app with our Salesforce org, and we'd like to change the behavior of how calls are logged. The calls in question are related to phone numbers attached to Opportunities.
From what we can tell, the app only permits you to log a call made with this method as a new task under the associated Account, if an Account exists.
We want calls from the logged as a "Log a Call" record under the Opportunity, not as a Task under the Account.
We'd also like to be able to call from and log against an existing Task in certain cases. For example, there may be a Task to follow up on a stalled opportunity, and an outgoing call can log against that task.
I don't think this functionality is possible natively, and I'm pretty new to the RingCentral API. Is it possible to achieve this functionality through the API and Salesforce somehow? Thanks!
You can customize the behavior of RingCentral in Salesforce by using the Embeddable Voice Widget:
Embeddable Voice Widget
https://github.com/ringcentral/ringcentral-embeddable-voice
There are a series of demos here:
https://github.com/ringcentral-tutorials/ringcentral-web-widget-demos
Specific Salesforce demos include:
salesforce_lightning/tutorial - basic embedding in Salesforce
salesforce_lightning_more/tutorial - shows how to customize the experience
See discussion on getting objectId for object that triggered widget:
https://github.com/ringcentral/ringcentral-embeddable-voice/issues/112

Run code in GAE according to changes in Firebase

Since Parse is shutting down, we are currently using Firebase to support basic data storage and real-time messaging. However, in order to implement a key feature in our app, we need to run some code on a server. The following is what we are trying to accomplish:
We allow users to upload key words to Firebase, then we want to send notifications to them if any new posts that contain these key words were uploaded by other users. For example, userA wants to know if anyone posted information related to chemistry, so userA enters key words "chemistry" and "science" in our app which get stored in Firebase, userB posted an article called "chemistry rocks!" which contains the key word "chemistry", userA will then receive a notification immediately about this post.
We have a couple of solutions in mind, but we are not sure which way to go and how to properly implement these solutions.
1 - Build a server that listens to Firebase changes and also supports sending notifications to individual users. However, to host and maintain a server just to run a search algorithm is just too much work for this simple task.
2 - Store the key words in another database that somehow can send notifications according to the search result. This would be faster because we wouldn't have to connect Firebase server to our own server, but again we would still have to host and maintain a separate server.
I have looked into Google App Engine, their push/pull queue feature sounds like something we want, but does GAE support notifications? And also how can we hook it up with Firebase? We also came across Firebase+Batch to send notifications, but I don't think Batch supports cloud computation.
Has anyone run into this problem? Any solutions?

Salesforce - HubSpot API calls

in my current company we are using Salesforce and HubSpot, and we have synchronized Contacts and Leads.
HubSpot does around 7000-8000 daily api calls, but I do not know what is the frequency HubSpot connects to Salesforce, or if there are some ways to reduce this number.
Thanks.
Salesforce limits its API calls with the edition and licenses you have see this link
(https://help.salesforce.com/HTViewHelpDoc?id=integrate_api_rate_limiting.htm)
and for reducing the api calls from Hubspot end follow this link
(http://knowledge.hubspot.com/salesforce-integration-user-guide/how-to-adjust-your- salesforce-api-call-limit)
If you go over you're API call quota, Salesforce will send you an automated email letting you know of the overage.
The usage limit for the lowest edition of Salesforce is 15,000. If you're currently at 8k/day, I wouldn't worry yet.

Resources