Can I store data captured with a Watson conversation to an external file? - ibm-watson

I am looking to capture various answers from a Watson conversation to an external file for analytics. Also looking to capture the length of time a user spends on a session on the bot. First, I need to know whether this is possible and secondaly, the method to do so.

This is really possible. You need to create one application to call the Watson Conversation Service, you can use one function inside the SDK to analyze the conversation.
You need to know: Watson Conversation service is one REST API endpoint, so you can build your app with Python, Java, PHP, Node, etc, and integrating with Watson Conversation.
You will need to use the SDK Watson Developer Cloud for call Watson Services, and, for getting the conversation, you will need to use the getLogs function, and with this, you will access all conversation flows. And with your custom code, you'll store the data.
See one example (Web application using Watson Conversation: Conversation-simple with Nodejs
API Reference for calling the Conversation service and methods.
See how to verify logs inside the UI Conversation.

Related

Sending User Input from IBM Watson Assistant to Database or via E-Mail

I want to implement an evaluation feature to my chatbot. User would be able to rate service on a scale of 1 to 5 and make suggestions.
I guess I would use slots for that and store the provided data in a variable.
What would be the easiest way for me to save and access that data later?
Somehow I need to write it to a database and make that database easily accessible. Or ideally having Watson sending an email with the feedback to myself.
Is there an IBM Cloud Database service available for that?
What would be my first steps in order to achieve this? Maybe you have some tips or documentation links, or even code snippets if it's not to much work for you.
I used IBM Cloud functions to get a joke from an API to Watson via webhook. I used code from the internet. So I am somewhat familiar with the concept, but I need more guidance and couldn’t find anything helpful. Basically I know nothing about NODE.
I would recommend the tutorial and its code on how to build a database-driven Slackbot with Watson Assistant. It uses a webhook and Cloud Functions to interact with a database for various actions. You could use that as blueprint for setting up the webhook and see how the database is invoked.
Make sure to secure the webhook. This can only be done using the command line (CLI), see the Cloud Functions doc on securing web actions.

Sending an email from contact us form using only Angularjs and Send grid without back end API in place

I have taken a look around the internet and all the solutions emphasize using Express and Node Js API in place to able to send an email. I would love to see any suggestions on how to best go about it because I don't have a backend in place. Thank you.
You're going to need some sort of backend otherwise the API-Key will be exposed.
From the SendGrid documentation:
When you have a browser-only application that reaches out to APIs, the API key has to be embedded in the application. Anyone with access to a browser-only application can access all of the Javascript source code, including your API keys.
Making your API key publicly accessible could result in anyone authenticating API calls with your API key — this is a significant security concern both for you and SendGrid.
You could use a serverless AWS lambda function or google function which would be a "backend" but without having to support the infrastructure / use a big framework.

Possible to upload documents to Watson discovery via Watson Assistant?

I have been trying to find an answer to this question, but can't seem to have any luck.
Is it possible to upload a document to Watson Discovery via Watson Assistant?
If so, could anyone point me in the right direction?
There is nothing out of the box that could do as you ask. Discovery does now come with a number of mechanisms to populate collections, i.e. Box, Web and sharepoint crawlers along with a manual upload. Non of these are integrated with Watson assistant.
That's not to say what you are looking for cannot be done, but you would need to build the mechanism yourself. As an example you could create a response payload (json packet ) within Watson Assistant that triggers some client code which performs an upload. This upload could then directly push the document into a discovery collection via discovery's API methods.

How to consume Chatbot Analytics?

We want to somehow consume a Chatbot Analytics so we can create our Own Analytics site for our Clients.
Is that any Possible?
Are there Any tools that will help?
We don't want tools, we want to consume their Data and Present them in our own site on behalf of our Clients.
Conside creating Chatbot via Chatfuel, API.ai or something.
You can use chatbotproxy.com API to fetch app and page specific metrics.
Currently, it collects 10 metrics, Note: if there is no data; then API does not return 0, it skips keys with 0 count. ChatbotProxy Metrics
We don't want tools, we want to consume their Data and Present them in our own site on behalf of our Clients.
By assuming you are referring consumer response as Data, yes that is possible.
To gather that data you should use AWS cloud services; you can use AWS Lex and AWS Lambda to build chatbot. In AWS ecosystem,you build the skeleton with Lex and provide functionality using Lambda function which will be triggered on catching an intent.
Considering you want to do some custom analysis on your consumer's responses AWS provides the best solution. AWS implementations are more flexible, transparent and their SDKs are available for a diverse set of platforms.
If your bot is created using api.ai, unfortunately, there's no way to consume analytics data via API calls, instead, they have developed & announced Analytics dashboard in api.ai console. Here, you can review statistics relevant to the specific agent. The solution to your problem can be logging everything via webhooks and write your own analytics service, but you'd probably know that already.

How connect multiple IBM watson services in one?

In IBM Watson I want to use 2 services say speech-to-text and conversation, I want to communicate between these services. If I use this service indpendently I require to call speech-to-text and then to conversation i.e. network cycle is increased. Is there way to keep this services in container and I only call the container after that call my speech-to-text and conversation communicate internally with each other rather I making an explicit call to each service.
Watson Speech to Text and Conversation are separate services, so you will have to invoke each separately.
You need to call each of the APIs for speech-to-text and then for conversation individually. But if you wish you can bundle them together in a container at your development code.It works for me. Hope this helps.

Resources