Hide agent chat button on portal for specific users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2022 07:59 AM
Hi all,
I have seen the question asked a while ago but never answered. So I thought let's give it a go again.
I would like to hide the agent chat button (bottom right) on the Service Portal based on certain user aspects, like their location.
Within the chat config you only have the possibility to hide based on the user's role. However a large portion of my customer's user base does not have a role in Service Now. They are simple end-users, across the globe, without a Service-Now role.. (and we have functionality to redirect users without a role to the portal directly, so they can;t open the backend)
I'm unable to find a good way to achieve this.. It seems that the Agent Chat button is not loaded via a normal widget, where you normally would define a server side script and an ng-if for example.
Any other ideas to achieve this? Maybe somewhere along the line of overriding a css style based on a server script before the components load? Or any other bright idea's?
To be honest I find it strange that ServiceNow does not offer ootb possibilities for this like utilising user criteria. Why only on role.. Probably another discussion 🙂
Thanks
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2022 12:13 AM
mm.. I need to try that option, however I always thought dat a widget could not override a non widget css... Or more the question how to access the Agent Icon Widget.. which does not seem to be a classical widget now?
Any ideas?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2022 12:31 AM
VA chat button can be displayed using "Virtual Agent Service Portal widget" widget or Agent Chat configuration. As Virtual Agent Service Portal widget is in the verge of deprecation, it is suggested to use Agent chat configuration. Make sure you are not using both the configurations.
1) If VA is displayed using "Virtual Agent Service Portal Widget"
Enable the system property "glide.service_portal.user_criteria_enabled" and add user criteria
2) If VA is displayed using Service Portal -> "Agent Chat" configuration
we can only restrict Agent Chat button through Roles.
Hope this helps. Please mark the answer as correct/helpful based on impact.