Hiding Virtual Agent based on condition (not using user criteria plugin)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2024 07:47 PM - edited 04-10-2024 07:47 PM
I am looking to hide OOB Virtual agent on portal based on condition for logged in user.
I am looking assign below value
data-flag= false (this value set from script include based on some user values and conditions through properties)
Note not using user criteria plugin. We adding another custom chat bot on servicenow portal by hiding virtual agent.
Would like to use data-flag parameter in HTML code inside <div> tags.
Thanks
Srini

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2024 08:31 PM
Hi there,
First essential question when working on such...
Are you using the legacy Service Portal Virtual Agent widget? Or are you using the recommended Agent Chat configuration?
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 05:01 AM - edited 04-11-2024 05:06 AM
Thanks Mark your response had gone through many of your virtual agent posts. I think it is newer chat as
under agent chat service portal agent chat config is active and even i tried adding options parameter(server script)
options.visible_flag = true; ( true/false this flag will return from script include after many conditions based on data)
html code line 1 of widget: sn_va_sp_widget
<div class="conversation-button-container" ng-if=$ctrl.options.visibe_flag>
Note this VA chat hide/show on portal based on user who logged in.
Regards
Srini
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2024 08:29 AM
I am placing another custom widget on servicenow portal and would like to hide OOB servicenow chat widget , Can we place custom widget exactly on top of servicenow widget that way custom widget can be visible if we can't turn of OOB servicenow chat based on flag that can be set in server script.
Regards
Srini