How to put value of IBM watson response in database

0
Hi, I've downloaded the IBM Watson Connector suite and I've been playing around with it and got the conversation plugin to work that if I ask if a user is working, it gives back a response: Fill in a name. When I enter a name it uses the system entity within the bluemix envioriment $sys-person to filter the given name. Giving a response back: "The name you gave is: John" for example. I've created a variable $depositValue equal to the @sys-person in the same entity. Now after this I would probably also want to give a date so I would have to create a new entity. And create a Microflow that checks if there's anything for this user on this specific date. But how should I go about this? I can't seem to figure out where this $depositValue would be stored or how to call this within the Mendix envioriment. I've looked at this blog post:  https://www.mendix.com/blog/robots-taking-integrating-chatbot-interface-mendix/ And I've read this: https://docs.mendix.com/refguide/ibm/ibm-watson-connector     Any help would be appreciated!
asked
2 answers
0

Hi David,

I just checked the github repo for this project and it seems that my changes to support context variables haven't been merged into the mainline. Here is the branch line which contains the changes i made to support context variables.

https://github.com/mendix/IBM-Watson-Connector-Suite/tree/Development

 

If you use this module/code for your project it will work with context variables.

All the context variables are stored in an entity called context values and associated to the main conversation.

I will chase the RND team responsible to get this merged to the mainline and put into the appstore.

 

[EDIT]

I checked with the RND team and they said the one on the appstore has the context variables. If you look in the domain model of the module then you should see contextvalue entity. You can retrieve these context values from the db using a microflow and retrieving using the context value key.

 

Regards

Simon

 

answered
0

Thank you Simon, I've played around with it more and seem to be able to get the value compared to the administration.account entity within Mendix and based on that
check for events, however I still seem to have some trouble sending the newly created or edited contextvalues back to Watson.

The IBM Watson responses are as follows: The user gives a name and watson gives a response:
The name you gave is @sys-person, do you want to check if @sys-person is working?
When this is activated it will immediatly check if this person exists within the Administration entity and checks if there's a event present for this person within the IVK_SendChatMessage microflow.

If the user types in yes, or check it will activate the child node under the first node.

I created this child node with the following context values: workingvalue

Parent node:

Child node:

And within my miroflow I created a contextvalue with the values:
Key set to 'workingvalue'
Value set to 'Working'
WatsonServices.ContextValue_ConvesationContext to the $ConversationContext object.

 

And so to my understanding, within the microflow I have to send these newly created contextvalues back to Watson as is stated in the chatbot blogpost.

And then IBM Watson can say: Today he is Working. Or, Today he is not working.
I seem to have trouble figuring how I can go about this, or is my logic flawed?
 

 

 

answered