User scope variables in Oracle Digital Assistant keep their values beyond conversation sessions. So if, in the context of a conversation, the bot needs to memorize information, then this information should be saved in a user scope variable.
User scope variables are defined at runtime, and not at design time. The variables are saved in the instance specific Oracle Digital Assistant internal database. User scope variables cannot be shared between users and also are messenger specific. This means that a user who runs the same bot on two different messaging channels will save information twice. As far as the content goes that can be saved in a user scope variable, the same types apply as can be used with variables defined in a dialog flow.
To create user scope variables and to store values, you can use the System.SetVariable component or a custom components. To read from user scope variables, you use an expression the dialog flow or a custom component. This article explains how to work with user scope variables in a dialog flow.
Sample for this article
The sample skill for this article is quite simple. It creates an object and an array to then save it in a user scope variable. At runtime, the user scope variable are then accessed from expressions to print the response shown in the image below. Read the complete article here.
For regular information become a member in the Developer Partner Community please register here.
Blog
Twitter
LinkedIn
Facebook
Meetups
Technorati Tags: PaaS,Cloud,Middleware Update,WebLogic, WebLogic