Configuring the dialog nodes to display dynamic rich media


As an administrator, you can configure the dialog nodes in IBM Watson Assistant to display rich media, such as display images, play audio, and play video from from a public URL in the chatbot response. 

Before you begin

Make sure you have created an intent to display images and play audio and video files in the chatbot response. For more information, see Creating intents in IBM documentation.

To display images from a public URL in the chatbot response

Example

You have configured the IT chatbot and one of the services configured with the chatbot is to request for new IT peripherals. When the end user requests for a device, for example, a wired headset, you want to display an image of the pre-approved headset along with its specifications. This image is in a public URL, which should render correctly in the chatbot response. 

  1. Log in to your IBM Cloud account. 
  2. Launch Skill that is configured with BMC Helix Virtual Agent.
  3. Select the Skill in which you want to edit the Dialog node.
  4. Click Dialog
  5. Select the dialog that you want to configure to display images from a public URL. 
  6. Click Add node at the appropriate step in the dialog flow and fill out the following fields: 
    1. In Enter node name, specify a meaningful name for the node.
      Example: Show image
    2. In If assistant recognizes, select #intents and select the intent name.
      Example: #ShowImage
    3. In the Assistant responds section, select Text and click Add response type.
    4. In Enter response text, enter the complete public URL from where you want to render the image in the following format: 
      <img src="https://domainname/image path">
  7. Click Try it out to check whether the image is rendering correctly. 

The following example shows how to configure a dialog to render an image in the chatbot response: 

Example_modify dialog to render image.png

To play an audio from a public URL in the chatbot response

Example

You have configured the IT chatbot and one of the services configured with the chatbot is to test hardware components. When the end user asks about testing the audio system, you want to show the steps and play an audio file from the pre-approved audio files. This audio file is in a public URL, which should play correctly in the chatbot response. 

  1. Log in to your IBM Cloud account. 
  2. Launch Skill that is configured with BMC Helix Virtual Agent.
  3. Select the Skill in which you want to edit the Dialog node.
  4. Click Dialog
  5. Select the dialog that you want to configure to play audio from a public URL. 
  6. Click Add node at the appropriate step in the dialog flow and fill out the following fields: 
    1. In Enter node name, specify a meaningful name for the node.
      Example: Play audio
    2. In If assistant recognizes, select #intents and select the intent name.
      Example: #PlayAudio
    3. In the Assistant responds section, select Text and click Add response type.
    4. In Enter response text, enter the complete public URL from where you want to play the audio in the following format: 
      <audio src="https://domainname/audio" controls>Your browser does not support the audio element.</audio>
  7. Click Try it out to check whether the audio is playing correctly. 

The following example shows how to configure a dialog to play audio in the chatbot response: 

23_3_02_Chatbot_Audio_ResponseType.png

To play a video file from a public URL in the chatbot response

Example

You have configured the IT chatbot and one of the services configured with the chatbot is to test hardware components. When the end user asks about testing the media player, you want to show the steps and play a video file from the pre-approved video files. This video file is in a public URL, which should play correctly in the chatbot response. 

  1. Log in to your IBM Cloud account. 
  2. Launch Skill that is configured with BMC Helix Virtual Agent.
  3. Select the Skill in which you want to edit the Dialog node.
  4. Click Dialog
  5. Select the dialog that you want to configure to play video from a public URL. 
  6. Click Add node at the appropriate step in the dialog flow and fill out the following fields: 
    1. In Enter node name, specify a meaningful name for the node.
      Example: Play video
    2. In If assistant recognizes, select #intents and select the intent name.
      Example: #PlayVideo
    3. In the Assistant responds section, select Text and click Add response type.
    4. In Enter response text, enter the complete public URL from where you want to play the video in the following format: 
      <video contols> <source src="https://domainname/video" type="video/mp4"</video>
      Tip: You can control the size of the media player by specifying the width and height in the response text. 
  7. Click Try it out to check whether the audio is playing correctly. 

The following example shows how to configure a dialog to play a video in the chatbot response: 

23_3_02_Chatbot_Video_ResponseType.png

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*