Creating Custom Response Dialogs

This guide assumes familiarity with the following information:

In this guide, you'll learn how to use the Custom Dialog Feature to customize the dialog response for a voice command. This allows you to specify Bixby's responses to users instead of using default responses. The device used in this guide is a SmartThings-enabled air conditioner.

In general, you should try to follow the style and tone of Bixby when creating custom dialog. For more information, see the Dialog Design Pattern Guide.

Example Custom Dialog Response: "Failed to turn it on. Please check the filter status before turning on."

Start creating the action flow for this example by dragging a Start Node and a Command Node from the action flow nodes sidebar to the editor area. Then, connect the Start Node's main port to the Command Node's trigger port.

Adding Custom Dialog to the Metadata

In order to create and use a custom dialog with your device, you have to add the dialog to the dialogs menu in the metadata sidebar.

  1. In the metadata sidebar on the left, click the add icon Add Icon on the right of Dialogs in the Assets menu. Add a Dialog
  2. A pop-up appears. Type a dialog name and click SAVE. This example uses the dialog name "airInfo." Type Dialog Name
  3. Select a locale for the custom dialog by clicking an empty box next to one of the listed locales. This example uses the en locale. Select the en locale
  4. On the blank line, type in the custom dialog. This example uses "Failed to turn it on. Please check filter status before turning on." To add more custom dialogs, click ADD. Enter Custom Dialog on the Blank Line The new custom dialog option, airInfo, will appear under Dialogs in the metadata sidebar. airInfo Custom Dialog Options is Visible in Metadata Sidebar Under Dialogs

You can now use the custom dialog in your action flow.

Using Custom Dialog

To use custom dialog in your action flow, do the following:

  1. Add one Response: Success Node and one Response Node to the graph. For more information about the Response Node, see the reference documentation.
  2. Connect the Command Node's success port to the Response: Success Node and the failure port to the Response Node.
  3. Click the Response Node that is connected to the Command Node's failure port. This opens the Node Configuration menu on the right.
  4. Click the SELECT DIALOG button. Click Select Dialog in Node Configuration Menu
  5. The Select Dialog pop-up appears. At the top left corner, select Metadata in the menu. Select Metadata Option
  6. Select the airInfo dialog and click SAVE. Select airInfo Custom Dialog

Here's the finished action path:

Final Action Flow

Choosing Default Dialog

You must choose a default dialog if you have not entered custom dialog for all locales.

To choose default dialog:

  1. In the Dialog tab, click SELECT.

  2. The Select Dialog pop-up appears. Choose one of the listed default dialogs and click SAVE.

Select Default Dialog

The default dialog appears to the right of Default Dialog in the Dialog description box. The default dialog also appears in various locales in the Templates section of the Dialog description box.

Selected Default Dialog Appears in Various Locales

Testing Your Action Flow

To test the action flow, click the Try It button at the top right of the editor window. The flow editor should look like this:

Testing Action Flow

In this test run, the command fails. Bixby then lets the user know of the failure with the custom dialog "Failed to turn it on. Please check filter status before turning on."

Additional Resources

The Node Recommendation feature enables you to get recommendations for next possible nodes, and can make it easier to create a graph.

The following video tutorial gives another example of how to use customer responses and confirmations in BHS.

Video Tutorial: Custom Responses and Prompts