How to Display Message on the Virtual Agent Widget on hover

Prasad Tlns1
Tera Contributor

Currently, Users are unable to identify the Virtual Agent Icon that is available on the footer of the Portal Page. So we want to add some interactive messages or hover on messages like this.

 

 

 

3 REPLIES 3

Ratnakar7
Mega Sage
Mega Sage

Hi @Prasad Tlns1 ,

 

To display a message when hovering over the Virtual Agent widget icon, you can add a custom tooltip to the icon using some HTML and CSS. Here's how to do it:

  1. Open the Service Portal designer and navigate to the page where the Virtual Agent widget is located.

  2. Select the widget container that contains the Virtual Agent widget.

  3. In the widget container properties, add a CSS class to the "CSS Classes" field. For example, you can add the class "va-widget-container".

  4. Save the changes to the widget container properties.

  5. Open the "Theme" record that is applied to the portal page.

  6. Click on the "CSS" tab to edit the CSS for the theme.

  7. Add the following CSS code to the end of the CSS file:

 

 

.va-widget-container .sn-aside__icon:before { content: "Hover Text Here"; position: absolute; left: -50px; top: -50px; background-color: #000; color: #fff; padding: 5px; border-radius: 5px; opacity: 0; transition: opacity 0.2s ease-in-out; }

.va-widget-container .sn-aside__icon:hover:before { opacity: 1; }

 

 

    8. Replace "Hover Text Here" with the message you want to display when hovering over the Virtual Agent widget icon.

   9. Save the changes to the CSS file.

 10. Preview the portal page to see the message displayed when hovering over the Virtual Agent widget icon.

If my response helps you to resolve the issue close the question by Accepting solution and hit 👍thumb icon. From Correct answers others will get benefited in future.

 

Thanks,

Ratnakar

Cau Thoong1
Tera Contributor

As a side note, they are releasing a feature called proactive pop-up message in the Utah release.

 

https://www.servicenow.com/community/virtual-agent-nlu-articles/what-s-new-for-virtual-agent-and-nlu...

see proactive triggers docs.

I few good community articles on the topic already