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-12-2022 03:03 AM
Hi,
Depend how have you added the Chat icon on your portal? Has it been added to the footer widget or something else?
Please elaborate and let us know to assist you further.
Also there are lot of really good articles from
https://community.servicenow.com/community?id=community_blog&sys_id=14e51965db2200d013b5fb24399619fb#va
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 04:44 AM
Hi,
As mentioned (somewhat) in my reply to Saurav. It's added using theAgent Chat in Service Portal configuration, and thus NOT by adding a widget to a page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 03:12 AM
Hi there,
You might consider posting this question in de Virtual Agent community. You will attract a better audience for your question there.
Anyway, to confirm:
Your question is about Agent Chat configuration, correct? Not about the legacy Service Portal widget method?
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
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
01-12-2022 04:42 AM
Hi Marc,
Yes indeed the Agent Chat Configuration. Did not know that there was a difference when I started the question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 04:50 AM
Agent Chat configuration is the way to go now a days. A few releases back, Service Portal widget was the way to go.
With Agent Chat though, like you already mentioned, there's only a role field available. You could mis-use this, creating a role for a specific location of users. Though feels like an incorrect workaround, just because Agent Chat is too limited on this.
Another option might be creating a small additional Service Portal widget, which queries the users location, and hides the Virtual Agent icon.
There's just not a simple nice solution for this unfortunately.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field