When you create a Virtual Agent topic, you can include images and YouTube videos on Static Choice and Dynamic Choice user input controls.

Before you begin

Role required: virtual_agent_admin or admin

Procedure

  1. Navigate to All > Conversational Interfaces > Virtual Agent > Designer and open a topic or create a new one.
  2. On the Flow tab, drag a Static Choice or a Dynamic Choice user input control onto the canvas.
  3. On the Properties sheet, go to Advanced (optional), and then expand the Header card section.
  4. Slide the Insert toggle switch to enable it.
    Figure 1. Insert a header card
    Header card section of Dynamic Choice user input control, with Insert toggle and Would you like help radio button enabled.
  5. Under Would you like help?, select either Yes or No, I will use a script.
    • If you selected Yes, select Add card and complete the following form fields.
    • If you selected No, I will use Script, select Add script to input a script to display your desired media, following the example in the script dialog box.
      Figure 2. Header Card script example
      function() {
          /*
              var cardName = "Large image with text";
              var cardData = {
                  title: 'Choose color',
                  description: 'choose the right color of the flowers in the image',
                  image: 'https://homepages.cae.wisc.edu/~ece533/images/tulips.png',
                  imageAlt: 'Choose color'
              }
              var template = "";
              if (vaSystem.isAMBClient(vaContext.deviceType))
                  template = vaSystem.fillTemplateFromData(cardName, JSON.stringify(cardData));
            return {
                cardTemplate: template,
                cardName: cardName,
                cardData: JSON.stringify(cardData),
                renderStyle: "card"
            };
          */
          }
  6. Select Save.