Other dialogs

Botfuel Dialog offers several built-in dialogs in addition to a number of abstract dialog classes. This document covers all dialogs other than PromptDialog, for it see here.


The Dialog is the generic class subclassed by all the others dialogs. This class exposes the execute method, which is not implemented.

  * Executes the dialog.
  * @abstract
  * @async
  * @param {Object} userMessage - the user message
  * @param {Object} [data] - the dialog data
  * @returns {Promise.<Object>}
async execute(userMessage, data)

The other important method of the Dialog class is the display method. It is called by the execute method.

  * Displays messages by resolving the view associated to the dialog.
  * @async
  * @param {Object} userMessage - the user message
  * @param {Object} [data] - data used at display time
  * @returns {Promise.<void>}
async display(userMessage, data)

Predefined dialogs other than Dialog and PromptDialog


The BaseDialog is a general-purpose dialog. It is subclassed by many other dialogs.


The CancellationDialog is a PromptDialog used to cancel the current dialog. This dialog is provided with two views, one in English and one in French. To use this dialog, add an intent named cancellation to your bot in the Trainer. The intent should be trained according to your use case with phrases corresponding to cancellation.


The CatchDialog is triggered when an unexpected error occurs (eg an API calls returns an error).


The ClassificationDisambiguationDialog is triggered when the Classification service returns multiple intents or QnAs based on the user input.


The ComplexInputDialog is a dialog used to handle complex inputs. We consider an input to be complex if it has 256 characters or more.


The ConfirmationDialog is a PromptDialog used to unblock a blocked dialog. It is meant to be subclassed in order to allow the customization of the corresponding view.


The DefaultDialog is used when the bot does not understand the user input.


The QnasDialog is used for answering QnAs.


The VoidDialog does not do anything but can be used in tests.