Uh oh! We couldn’t find any match.

Please try other search keywords.

Bixby Developer Center

Guides

Implementing Delight Nuggets

When a user asks a question, it's important to give them the information they requested. However, having a dialog system enables us to sprinkle in a few "delight nuggets," namely additional content that will surprise and delight the user. These delight nuggets may take the form of a humorous or interesting dialog response, a well-placed suggestion, or a preference inserted that demonstrates the system is starting to know you better. This section explores a number of related confirmation prompts, some of which can be used for delight dialogs and some to provide the user comfort that the system cares about efficiency (e.g. asking to remember information for next time) and security (checking with the user before executing an action with potentially unintended consequences).

Commentary Dialogs

Currently, the first offered approach to delight nuggets is a dialog hook called ResultCommentary. Using this, when certain content is being shown to the user, a developer can add additional commentary related to the presented result. In this example, depending on what the weather is for a requested location, the system will present a related comment.

template (ResultCommentary) {

match: Weather (this)
if (this.condition == 'chanceFlurries')
expression ("The aging process has you firmly in its grasp if you never get the urge to throw a snowball.")
}

Dialog Conditions

In the example from the previous section, note the use of the if parameter. Conditionals can do boolean tests on properties in the currently selected pattern concept using Expression Language. Conditionals may also be used inside layouts.

Confirmation Prompts

The system offers three types of confirmation prompts to get the user's feedback related to different types of suggestions or actions:

  1. Persistence Confirmation Prompts: Asks the user whether the system should remember the value and use this value in the future.

  2. Action Confirmation Prompts: ("yes," continue; "no," fail with message). Example: "This is an overnight flight! Are you sure you want to book it?"

  3. Input Adjustment Prompts: Allows inspection and refinement of an incoming input value. Example: "Find restaurants" → "Would you like steak restaurants as usual?", "Do you want fries with that (in an order)" ).

Persistence Confirmation Prompts

As we saw in the chapter on Concept Features, by adding the ProfiledStored or ProfileStoredUnique to a concept, when the concept is created, it will be stored in a user-specific store and then available to context the next time an action needs an item of this type. There is also a prompt that checks with the user whether they want to store the information or not; it will say something like Do you want to me to remember this %TYPE% where %FIELD1% is %ABC% and %FIELD2% is %DEF% for next time? If you would like to override this default persistence confirmation prompt, you can use the Storage and edit the message displayed.

There is currently no way to turn off confirmation prompts for persistence. If you have a use case for this, please contact the development team and we will consider extending the platform to accommodate this.

Action Confirmation Prompts

If you add the confirmed-by feature to an action, Bixby will ask the user Are you sure you want to call? (Y/N) before executing the action.

action (Call) {
type (Commit)
confirmed-by (core.Confirmation)
collect {
input (phoneNumber) {
type (PhoneNumber)
min (Required)
}
}
output (PhoneCallReceipt)
}

core.Confirmation is a built-in concept that defines the return type of the confirmation, and supports natural language options (e.g. yes, no) for the return types.

boolean (core.Confirmation) {
}

To adapt the default prompt, you can override the Confirmation and extend the dialog as you like.