article by Frank Nimphius, August 2019
In particular, when working with custom components or webviews (also known as Instant Apps), you may need to add external system configurations, such as server URLs, tokens, Oracle Identity Cloud service, Oracle Digital Assistant instance URL, and more.
Of course, you can directly set these dependencies in the dialog flow (BotML) when defining the dialog flow state that references a custom component or webview. However, this has an impact to reuse of skills, and certainly would not follow best practices. As an example, when cloning a skill or when loading a skill from the skill store (a Fusion App feature only at current), you would need to be aware of and know how to find the code lines to change in the BotML code.
Instead, Oracle Digital Assistant Best Practices is to use custom skill parameters that help you keep external dependencies out of the dialog flow code, and also clarify where the configuration needs to be set and what values to enter.
Some time ago, I recorded a 2-minute TechTip video about custom skill parameters. In the video I focused on global parameters that also display in Oracle Digital Assistant, giving digital assistant developers the option to enforce a consistent user experience and consistent skill behavior. Watch the video here if you are interested:
In this article, I now focus on skill scoped parameters that you can use to configure external dependencies like e.g. remote REST servers URLs. I consider the use of skill parameters for all configurations that reference external resources as best practices. In addition, skill parameters make it easy to define specific runtime settings for development and Q&A testing. The sample screen shot below, for example, contains a "debug" parameter that, when set, enables logging for a custom component.
Imagine if, as a design guidelines, every component developer would expose a property "debugging" on his or her custom component that, when set, produces low level debug messages? Or, when developing a skill you would point a custom component to a REST service that reads and writes data to a development database instead of a production system.
The screenshot below is from an article recently published here on Oracle TechExchange. The solution in the article required access to Oracle identity Cloud Service, for which it needed the Oracle Identity Cloud Service Host and the OAuth client credentials. So instead of coding the Identity Cloud Service access into BotML, it uses custom skill parameters.
The screen shot below is taken from the Configuration tab of the skill settings panel (accessible through the cone icon in the left side menu) . Not shown in the screenshot is the description field that allows the original skill developer to explain what each custom skill parameter is for. This makes sure that developers re-using the skill fully understand it.
To access parameters in BotML, you use the following expression: ${system.config.<name of the parameter>} . The example below shows how to use custom parameters to configure a custom component. Note that it is not required that the names of he custom skill parameters match the names of the custom component input properties.
Related Content
A list of Oracle Digital Assistant 2 Minute Tech Tip Videos