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

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.

Related

Firebase Realtime array populate div

Okay so I’m need guidance on where to start.
What I want to do is upon clicking a button in my web app which will be labelled “search” the web app will connect to my realism database and search the data base for the “search criteria” and the once found all matching cases it will create div blocks with the information inside it, in a list view and assign the ID of the div to the UID it gets back from the database.
database:
Users
--> Country
---->State
----->City
------>Post/ZipCode
------->UID
--------> Users informantion
Welcome to StackOverflow!
A great place to get started is the Firebase Realtime Database doocumentation or searching for Firecasts on YouTube (linked below).
As requested, here are some questions to ask yourself to get started and help scope out and define your new Firebase project.
What language are you going to use?
Are you planning on using any frameworks/libraries? e.g. For Javascript, these would include things like jQuery, Polymer, and React
What information are you storing in your database? e.g. user profiles, private user data/settings, public indexes, username lists, etc.
How is your database structured?
What data is being searched? The entire database? Values in a certain location?
What data needs to be displayed in your view?
Is the data accessible for just the current user or is it a public database that anyone can use?
What search criteria will be used? Is it just one filter at a time or many?
The answers to these questions aren't set in stone, but are to help you start thinking about the future of your project. They can be changed at any time as this isn't SQL where everything has to have its own schema.
If you intend on using "advanced searches" where you'll filter by multiple parameters at the same time, consider using Cloud Firestore instead.
I recommend looking at some Firecasts to help guide you through these questions. Here are some links to them:
Firebase YouTube Channel
Video: Getting Started with the Firebase Realtime Database on the Web
Playlist: Firebase on the Web

how to pull data from salesforce marketing cloud objects using API

I am trying to pull data from salesforce marketing cloud object using API calls.
data: all available instances for the passed object.
I did this for salesforce objects using bulk api call.
I am very new to sfmc.
Glad if someone can share the example link.
Not sure if this is what you want, there are several trailheads to get started with MC.
Log in to your MC account
Hover on Audience Builder
Click Contact Builder
Click on tab Data Sources
Click sub tab Synchronised
(if you have already connected your CRM to MC) A box with your connected user should appear. Click on it.
Here you can see all your sObjects that are connected and synced. If you dont have any or want to connect some or more then:
click Set up Object button on the top right
Now all the sObjects that are available will appear and you can sync them. This will make them available in the MC environment.
Some will be unavailable at the moment, this is because they require others to be synced first. Once you start syncing the most basic ones, others will become available.
Hope this is what you were looking for.

Retrieve a Chat Log watson assistant

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.

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.

Integrate SurveyMonkey in an existing community

I have a cakePHP community. User are able to signup and login. I like to create a survey using SurveyMonkey.
Therefor I create the survey and make it available to my members using the direct URL. In my member database I have to save the information "did completed the survey = yes/no".
Is there any way to identify the user filling in the survey and write this information into the database?
SurveyMonkey has an API https://developer.surveymonkey.com/ , that let you collect info from your survey (completedf or not).
This is the only way i think, (if it s not include in your website).
I know that you can simply do this with Examinare Survey Tool. What you do first is that you use the API inside Examinare to add a recipient for all the users in the survey base.
Use the PHP Wrapper library in their developer site.
Loop it through and use the https://developer.examinare.com/php-wrapper-library/ and use the example code.
If you let people register with same email more than 1 time then save the ContactID into your database on the recipient.
Then to not create an email invite you use this : markrecipientstosurvey
The surveyID is available inside the Examinare account.
When you done this script part then make it as a cronjob for instance inside the crontab -e
I would run it every 30 minutes or 1 per hour.
Next part you create a page for the survey redirect where you use the function: listsurveysbyuser
to get the survey version and url
(there is a special link for the mobile user that even works for the normal mobile phone NOT only smartphones)
Now you just redirect them to the survey. If you want them to return to your site after then you use the redirect_url parameter that is added to the url or use the redirect inside your account. Ask support about that if you need :) They are fast... Never had to wait more than a couple of minutes.
When the person return then just check if they are marked as complete with the same api call: listsurveysbyuser
Looks much but it is very easy to implement and if you have any problems then just ask the support at support#examinare.com I have asked alot and never had them to say that it can not be done. Really nice!
EDIT:
I see that they just released a tutorial much better than my example:
https://developer.examinare.com/how-to-use-surveys-in-cakephp-with-very-little-development/
One option:
Use unique Custom Variables in the URL that is visited by each member of the community
For example, https://www.surveymonkey.com/s/your_survey?userid=$my_user_id
Note that you can create weblink or email collectors with the API (endpoints: create_flow or create_collector).
Then track the responses using the get_respondent_list or get_responses endpoints of the API.
Note: Please confirm with the Survey Monkey API team that the custom variables can be read via the API.
Another option:
Use the email collector (create_flow) API endpoint and send it to your members' email addresses.

Resources