Skip to Content
0
Jul 16, 2020 at 07:44 AM

Load conversation from memory

86 Views

We are currently working on a project that would load a conversation from memory. Now we are wondering how this can be achieved.

The scenario is a follows:

The user (employee) starts a mobile SAPUI5 App. This app contains a calendar with appointments for this very employee. By clicking on the a calendar entry (e.g. lets say object "Office 3, 2. Floor"), the bot window opens, allowing the employee to start take time for "office 3, 2. Floor" (now besides "taking time", there are also other options the user can chose from, but thats just used as an example to simplify the process description).

Now if the user is already taking time for an object, and clicks another calendar entry (lets say the user restarted the app), the bot has to recognize that the time of object "Office 3, 2. Floor" hasnt been stopped yet and load that state, so the user can continue working (stopping time) etc for "Office 3, 2. Floor". When the user stops the time, the bot window should close and new objects from the SAPUI5 calendar can be chosen.

Architecture:

- CAI: On one side we have CAI, where the dialog stracture and memory variables are set
- App: The App that contains the bot has a SAPUI5 module, a DB and a SRV module. The SRV module has to be used to connect to the CAI API. The HANA DB is used to store conversation states. The idea is that if the app crashes or a user loses internet connection a bot conversation can be restored ("office 3, 2. floor"-example). So basically we want to write conversation information or memory to the HANA DB. The App is also communication with a ByD System to receive data for the calendar.

Our idea was:
- When clicking a calendar entry some endpoint in the SRV module should be triggered, comparing the SAPUI5 user (email) with the CAI User and finding a conversation for that user. Now we noticed in CAI participants API there isnt a user email to be found. Yet if there was a possibility to find a conversation, we had to open the bot and load that conversation, so the employee can continue his/her work on objects ("office 3, 2. floor") or start a new object if no time is being taken at the moment.


Yet we are wondering if this is the right approach.
We are also wondering how to do this technically, like what API to us, what kind of CAI tools (Webclient, webbridge). Is it necessary to store conversation in the HANA DB? Or how could user identification (SAPUI5 User, CAI User) be handled?


I'd be grateful if someone can give us some hints/procedure on a smoothly designed process that solves the usecase.