Hide agent chat button on portal for specific users

PatrickL
Giga Guru

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

11 REPLIES 11

Saurav11
Kilo Patron
Kilo Patron

Hello,

Go to 

1.Service Portal>Widgets

2.Search for "sn-va-sp-widget" 

3.Add roles according to the requirement.

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

This widget does not seem to be used to display the button on the portal. I even removed all html code and the button was still there.(it also has no instances etc)

Maybe it was like this in the past?

 

 

Can you send a screenshot of the button you are referring to?

Thanks

Hi Saurav,

The button looks entirely the same. (Balloon bottom right)

I did some investigation and what I came up with:

In older versions, Agent chat (or virtual agent) was added to the portal by adding the Virtual Agent Service Portal widget to portal pages.

Since version (I think) Orlando the display of the Agent Chat button is controlled via 'Agent Chat in Service Portal configuration' (sp_agent_chat_config)

However this last method does not give me access to the widget, where I would/could normally use some some server code to control visibility if roles aren't sufficient.

The configuration only allows roles to be configured.

 

 

See docs:
https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/build/service-portal/task/configure-va-in-sp.html

section: 'Migrate from the Virtual Agent Service Portal widget'