Bixby Developer Center

Guides
References

Enriching the Conversation

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 additional content that will surprise and delight the user. These delightful inserts can 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 also 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 (like asking to remember information for next time) and security (checking with the user before executing an action with potentially unintended consequences).

Make sure any text you write for Bixby follows the dialog best practices as well as the Writing Dialog Design Guide.

Commentary Dialogs

Currently, the first offered approach to enriching the conversation is a dialog hook using a dialog event called ResultCommentary. Using this dialog event, when certain content is being shown to the user, you 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 can 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 described in the Concept Features topic, by adding the profile-stored feature 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 dialog event 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 MakeReservation action:

action (MakeReservation) {
description (Commit order)
type (Commit)

confirm {
by (Confirmation)
}

collect {
input (order) {
type (Order)
min (Required)
}
}
output (Receipt)
}

View master on GitHub

Confirmation 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 Confirmation, 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 {
Confirmation {
confirming {
MakeReservation (action)
}
}
}

message {
macro (COMMIT_ORDER_CONFIRMATION)
}

mode (PositiveEmphasis)

render {
layout {
macro (order-image-card) {
param (order) {
expression (action.order)
}
}
macro (order-details) {
param (order) {
expression (action.order)
}
}
if (exists(action.order.buyer)) {
macro (order-contact-information) {
param (order) {
expression (action.order)
}
}
}
}
}
}

View master on GitHub

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 Bixby Views.