Bixby Developer Center


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: Asks if the user wants to continue with an action. For example, if the user is booking a flight, Bixby could ask This is an overnight flight! Are you sure you want to book it?. You need to create a confirmation view for this type of confirmation prompt.

  3. Input Adjustment in Confirmation Prompts: Asks the user to inspect and refine any incoming input value. For example, if the user asks "Find restaurants", Bixby might ask Would you like steak restaurants as usual?. You need to create a confirmation view for this type of confirmation prompt.

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 confirm key to an action, Bixby will ask the user Are you sure you want to call? (Y/N) before executing the action.

For example, consider this Call action:

action (Call) {
type (Commit)
confirm {
by (MyConfirmation)
collect {
input (phoneNumber) {
type (PhoneNumber)
min (Required)
output (PhoneCallReceipt)

MyConfirmation is a model of type core.Confirmation, which is a built-in concept that defines the return type of the confirmation, and supports natural language options (for example, "yes" or "no") for the return types. In general, you should create your own confirmation models, such as MyConfirmation, to distinguish between other core.Confirmation model types. If you don't create your own confirmation model type and have several possible confirmations in your capsule, Bixby might call the wrong confirmation that needs to be prompted for.

boolean (core.Confirmation) {

Your confirmation view might look something like this:

confirmation-view {
match {
MyConfirmation {
confirming {
Call (action)

message {
template ("Are you sure you want to call #{value(action.phoneNumber)}?")

mode (PositiveEmphasis)

confirm-options {
label ("Call")
on-confirm {
if (false) {
halt {
dialog ("")

render {

Input Adjustment in Confirmation Prompts

If there are actions that you want users to confirm the inputs to before continuing, specifically if you are implementing a transactional action, you need to expand your confirmation view to render a layout, which displays the users' choices and lets them edit inputs if possible. For a full example, you can read the Confirmation View section in Creating the Bixby Views topic.