This guide assumes familiarity with the following information:
Commandnode (Sending a Device Command)
Responsenode (Creating a Bixby Response Using Device Status)
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.
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.
airInfo, will appear under Dialogs in the metadata sidebar.
You can now use the custom dialog in your action flow.
To use custom dialog in your action flow, do the following:
Response: Successnode and one
Responsenode to the graph.
Commandnode's success port to the
Response: Successnode and the failure port to the
Responsenode that is connected to the
Commandnode's failure port. This opens the Node Configuration menu on the right.
Here's the finished action path:
You must choose a default dialog if you have not entered custom dialog for all locales.
To choose default dialog:
In the Dialog tab, click SELECT.
The Select Dialog pop-up appears. Choose one of the listed default dialogs and click SAVE.
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.
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:
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."
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 custom responses and confirmations in BHS.