In using conversation of the IBM Watson Connector Suite, the context gets lost

0
Hi, I have built a dialog using IBM's Bluemix. That dialog can be loaded into the example project. However, any context that is created during the chat gets lost. Once I checked it, the same happened with the context that is created in the Car Sample Project of IBM. This consequently means that I'm unable to extract any useful information from the user during the chat as the context cannot by read by the Mendix application. Has anyone found a way to accomplish this? In connecting Mendix with Watson conversation, the application (Mendix) is responsible for maintaining state of the conversation, but this seems impossible so far... I like to hear your thoughts.
asked
4 answers
2

Hi Mark,

 

I found some time and managed to implement the changes to the module.

Here is my pull request:

https://github.com/mendix/IBM-Watson-Connector-Suite/pull/17

Someone from the RND team will review my changes soon and they'll update the AppStore content.

In the meantime you can use my pull request.

 

Regards

Simon

 

answered
0

Hi Mark, 

I encountered this issue when building a conversation so i extended the module to allow for sending and receiving context variables.

The context objects allow you to send data to watson and then receive updated values from watson.

When i get the time i will update the Github repository with my new changes.

Might have to be next week if that is ok?

 

Regards

Simon

answered
0

Hi Simon, there is another issue that I've been trying to solve, but so far unsuccessfully. Maybe you have some thoughts about it..  In my application I want Mendix to respond to the user's input (its context values). I'd like to do this by triggering microflows based on the context, and consequently, manipulate some of the conversation's context so that Watson can respond based on the queries that are done in the Mendix database.... 

For example: The user asks in a chat about room vacancy: "Is room 2 still available?" This is recognized by Watson, and the context is set by Watson to: $askavailability=1, $inforoom=room 2.  These two context values are then used to trigger a microflow that checks the availability of room 2, and gives as return value if the room is indeed available: $AvailabilityOfRoom=true. Now, ideally, Watson bases the answer to the user based on the context value of $AvailabilityOfRoom==true. Since the room is available, Watson responds with: Yes, room 2 is available. Otherwise, Watson would respond by saying: Sorry, room 2 is not available.

However, this is not possible in the current setting. Context from Watson cannot be read by Mendix, analysed and consequently manipulated and sent that manipulated context back to Watson. In other words, the conversation's context is received and sent at the same time by the activity 'Conversation - Send message' in microflow IVK_SendChatMessage, which means that received context cannot be read and manipulated. Do you perhaps know a way to tackle this?

I'd love to hear your thoughts on this!

answered
0

Hi Mark,

In your send message flow you should include some logic which will work out what step you are currently on. You can get this information from the dialog node object. To make it easier you could put a confirmation step into your watson dialog which could say "Do you wish me to check whether room 2 is available", when you enter yes you can look up if the room is available and then send this to watson. Otherwise in your send message you could look up for key words in your send message using your microflow and based on your dialog step and do a lookup for room availability. You can then create or update a context variable to tell you the room is available or not. See the exclusive split near the end of the microflow. It checks whether the context exists or not. This is important because if you want to check another room you want to override the current availability variable and not create a new one.

 

I hope this makes sense?

answered