Quick-Tip: Working with user scope variables in Oracle Digital Assistant by Frank Nimphius

image

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.

Developer Partner Community

For regular information become a member in the Developer Partner Community please register here.

clip_image003 Blog clip_image005 Twitter clip_image004 LinkedIn image[7][2][2][2] Facebook image Meetups

Technorati Tags: PaaS,Cloud,Middleware Update,WebLogic, WebLogic

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.