Insert a header card in a Static Choice or Dynamic Choice control
- UpdatedJan 30, 2025
- 2 minutes to read
- Yokohama
- Virtual Agent
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
- Navigate to All > Conversational Interfaces > Virtual Agent > Designer and open a topic or create a new one.
- On the Flow tab, drag a Static Choice or a Dynamic Choice user input control onto the canvas.
- On the Properties sheet, go to Advanced (optional), and then expand the Header card section.
-
Slide the Insert toggle switch to enable it.
Figure 1. Insert a header card -
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.
Table 1. Add card dialog box Field Description Card type Type of header card: - Large image with text
- Small image with text
- Youtube Video Card
The fields in the dialog box change according to your choice.
Title Image or video title. You can enter it directly in the text field or use a data pill or script to provide the value. Title Link The URL to use for the video title hyperlink. You can enter it directly in the text field or use a data pill or script to provide the value. If this field is empty, the title displays as plain text. This field is only available for the YouTube video card option.
Description Brief description of the image or video. Image URL Link URL link for the image. You can enter it directly in the text field or use a data pill or script to provide the value. You can also select Upload Image to upload the image. This field is only available for the large and small image card options.
Image alt text Alternative, screen-readable text that describes the image. It’s used for accessibility programs. This field is only available for the large and small image card options.
Youtube Video ID The alphanumeric string at the end of the YouTube URL. For example, in the URL https://www.youtube.com/watch?v=AacDp2mUQ1I the YouTube video ID is AacDp2mUQ1I. This field is only available for the YouTube video card option.
- 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" }; */ }
- If you selected Yes, select Add card and complete the following form fields.
- Select Save.