article by Frank Nimphius; February 2018

Skills in Oracle Digital Assistant can have custom parameters defined that you can either use to achieve consistent configuration for entities and components in the skill, or to provide controls for digital assistant bot designers to "harmonize" the behavior of different skills.

Especially skills developed by different teams may not follow the same look and feel or may not adapt the same to constraints applied by messengers.

If you are a digital assistant developer today, what are your guidelines e.g. for the orientation of card layouts and how many cards are displayed at once? Do you know that messengers vary in the number of cards they support for rendering at the same time?

But even in a skill itself, is there a way in your bot building guidelines that ensures e.g. range sizes set on entities and components are the same for a consistent look and feel? Do you allow customization of system messages on the skill and digital assistant level?

If you had more "no" than "yes" so far, then read on.

Adding Custom Parameters to a Skill

Every skill bot has a configuration panel in its settings for you to define custom parameters. To access this panel, select the settings icon in the skill left hand menu (see image below), then select Configuration on top (not shown in the image). Scroll down and you see the custom parameter section.

Parameters names with a prefix of ".da" (da = digital assistant) are parameters that will be displayed in the digital assistant when the skill is selected. Parameters that you create without this prefix are local parameters that you can only configure for the skill. The latter is good, as mentioned, for you to have a single setting available for entities and components in the skill, so that at least within the skill the UI looks consistent. 

Referencing Custom Parameters in a Skill

Custom parameters can be referenced in the skill settings panel, entities and from the dialog flow. The expression you use to reference the custom parameters is

${system.config.<name>}

The image below shows a reference to the range size custom property from a composite bag item.

Similar, you can use a similar expression in a dialog flow to e.g. show/hide card response based on the orientation the cards should have. 

Note: In the examples, both custom component names have a prefix ".da". Reason is that I needed them to be exposed to digital assistant. 

Note: You don't use '${ … } if the expression is part of an Apache FreeMarker directive

Finally, let's have a look at the skill's settings panel where a custom parameter is used to control the default system error message

Remote Control Skills from Digital Assistant

A skill that contains custom parameters with a ".da" prefix in the name display on in the digital assistant as shown in the images below. 

Changing any of the settings in the parameter panel shown above has an immediate impact to how the skill renders. With custom skill parameters digital assistant developers have it easy to fine tune the look as well as the behavior of a skill. 

 

Related Content

TechExchange: Oracle Digital Assistant Primer

 

Author