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

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.

Related

Is 3rd party Oauth2 Provider in Google DataStudio with custom connectors supported?

I have an API that a user can query for data after that user authenticates against an OAuth2 provider that I maintain (i.e. not Google). Is it possible to expose data through this API to Google's Data Studio using a Community Connector? If yes, is it possible to use the setup outlined here https://github.com/gsuitedevs/apps-script-oauth2#setup against a non-Google OAuth2 provider? Thank you for your help!
I have not found any requisite to expose data through an API. So I expect that it is possible, but take into account the specific configuration requested when implementing it.
The setup outlined there is not official so you will need to test it unless someone has done it already or has enough time for it. The post is really detailed and has work behind, so I would give it a chance!

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

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.

Loading salesforce info to my local host site

just as a heads up I am 100% new to salesforce, only hearing about it yesterday. I have been assigned the task of writing an API to pull customer emails into our new website that is currently on my local host. I know the sobject name of the emails is a string called emails. However I think I am missing some major fundamentals despite reading a bunch of salesforce documentation pages.
When I log into our site I do not see a database (like I would have expected) I just see the many objects for our cusomters. I just can't seem to understand where I am supposed to write this "api" that I was told to do, or how to use it once it is written somewhere. I apologize for having no clue what I am doing regarding this, can someone please explain the basics of pulling data from it (currently on windows running apache if this matters, using HTTPS).
Probably, you will need to implement REST API services on Salesforce side and work with them from your app. If you are totally new with Salesforce just try to read Learn Salesforce Basics or use Trailhead interactive courses.
When you will understand a bit SF, you will need to learn how implement Salesforce REST API, here is the related documentation.

Which is the better way to store my logincredentials(remember me option) and maintain session throughout the application in angular js

Iam developing angular js web application .I want to store the login credentials when the user checks on remember me option.can any one please suggest me which is the better way to store the details of user (local storage or cookies or etc).And I want to maintain the session throughout the application ..please give your suggestions.
Thanks in advance
There are already plenty of solutions for that kind of stuff. As this is a serious security issue, I would recommend to use one of those instead of "reinventing the wheel".
Whether the system is using cookies or localstorage doesn't really matter at the end of the day. It is however a bad idea in general to store the actual credentials. Instead, use a token-based system that will do a server-client handshake on request.
Personally, I am working with Firebase and Express at the moment.
Firebase
Firebase is "backend as a service". They offer a free plan for production usage, have a look at it. If you like it, things are pretty easy here. You pay money and get a full-featured REST-like "backend" with built-in user management (See Firebase doc's for SimpleLogin). All you have to do is calling service methods.
Express
This is the DIY way. If you want to have full-control and a free way of doing things, this is the way to go. I am no Express master, so you better have a look at some Tutorials (http://expressjs-book.com/forums/topic/express-js-sessions-a-detailed-tutorial/)
If you don't like neither Firebase nor Express, have a look at other Backend-as-a-service offers. You could even use PHP. I would assume that one could say that this is the oldschool way of implementing user sessions :)

Track application usage - security

Similar questions have been asked before, but this a one is a little different. I created a REST API to send an XML document with `POST. I send data from my (Windows) application to the servers, which includes: open time, operating system, version, etc.
I have one problem though. How can I make sure people can't use the REST API? How do I know that the information sent to the server is from an application and not from someone who knows the URL? How do analytic software companies solve this problem?
Thank you.
Update
I would like users to use my application without having to log in. I am pretty sure that companies that create apps that do not force you to log in are able to see whatever you are doing.
Well there are several way to secure your service.
You can always setup authentication & authorization for the service - this way the service will be available only to registered/known users.
Here are links few links for more details:
Best Practices for securing a REST API / web service
http://www.stormpath.com/blog/secure-your-rest-api-right-way
Also there are less sophisticated ways such as setting firewall rules to allow connections only from certain places -- I don't think it is a recommended approach.

Resources