The Bot Logs window can display the log of the conversation that occurred in the Preview window or the log of any conversation that occurred in a supported channel. This makes it a useful tool in a few ways.

First, if you're encountering unexpected behavior, always check the Bot Logs window. Errors and failures are displayed in red, so you'll know at a glance if and where they occurred.

Second, because a log provides a more technical view of the underlying process flow that occurred during the conversation, it can deepen your understanding of how that processing works and support research. For example, you can use the log to identify the patterns or intents that were matched in the conversation.

Here's a visual overview of the Bot Logs window:

  • 1 = Use the User ID input box to specify the log you want to view.
  • 2 = Click (Refresh) to display or refresh the log.
  • 3 = Click the circle beside a logged event to display its timestamp.

Errors and failures are displayed in red, so you can spot them quickly.

Debugging during bot development

To display the log for the conversation that occurred in the Preview window

  • Click in the lower-right corner to open the Bot Logs window.

    For ease of use during bot development, by default, the user ID for the consumer in the conversation in the Preview window is entered in the User Id input box, and the associated logs are automatically displayed.

Debugging end-to-end interactions

To display the log for a conversation that occurred in a supported channel

  1. In the channel (Facebook Messenger, Apple iMessage, etc.), enter "display userid."

  2. Copy the ID.
  3. Return to Conversation Builder, open a bot, and click in the lower-right corner to open the Bot Logs window.
  4. Enter or paste the ID into the User ID input box.
  5. Click .

Printing the most recent user message

To aid in debugging, you can use the printDebugMessage scripting function in the code areas of an interaction to print the consumer's most recent message to the Bot Logs window. For more on this function, see here.