Bixby Developer Center

References

dialog

optionalvalue required

Begin a dialog template.

In Bixby, a dialog is a dynamically-generated message that gives status information, presents results, asks questions, or otherwise communicates with the user. Bixby has default dialog for many prompts and actions; you can create dialog templates to customize and improve these messages, tailoring them to your capsule. For more information about dialogs, see Refining Dialog

Dialog is separate from, but complementary to, Bixby Views. Bixby's dialog appears on a device's screen at the top, in the conversation zone.

You must place each unique dialog in its own *.dialog.bxb file. This file must be in the appropriate locale-specific resources folder.

Example

In its simplest form, a dialog file looks like this:

// resources/en-US/dialog/NumDice.dialog.bxb
dialog (Concept) {
match: NumDice
template ("Number of dice")
}

The template begins by specifying a Dialog Mode. Then it specifies a match pattern and a template, the actual dialog text.

EBNF Grammar

This is the EBNF grammar for Bixby dialog templates.

template                 = { literal | eval | optional | agreement eval | agreement source } ;
eval                     = "#{" , expression , "}" ;
optional                 = "[" , { template } , "]" ;
agreement source         = "%{" , agreement id , ":" , template , "}" ;
agreement eval           = "@{" , agreement id , agreement class symbol , ":" , agreement class variants, "}" ;
agreement class symbol   = alpha character ;
agreement class variants = literal , { "," , literal } ;
literal                  = { anything - ( "#{" | "[" | "%[" | "@{" ) } ;

Child Keys

description
required
Description of the dialog
form
optional
Allows you to more explicitly determine how articles and demonstratives appear in dialog
macro
optional
Defines a layout, a portion of a layout, or a dialog with a macro
match
optional
The match pattern will be evaluated to decide which dialog to use based on the evaluation context
template
optional
Text to be passed
template-macro
optional
Encapsulates dialog logic that normally would lead to duplication