Restrict agent chat to one company

meeeeeeshel
Tera Contributor

Hi,

 

we want to enable agent chat just to one company. I wonder if anyone can help with how I can achieve this? I can't seem to find a way to use user criteria on agent chat.

14 REPLIES 14

Tricia Cornish
ServiceNow Employee
ServiceNow Employee

@meeeeeeshel @Jessica Maurer 
To configure the icon by specific characteristics, you can set those conditions in the Agent Chat config (no need to use the legacy widget). In a PDI, as an example, I believe the CSM VA configurations might be a good comparison - I didn't create this code, I used the ootb solution. 

To see no icon at all you can create 2 branding setups - one with the Live Agent icon, one without. I would not recommend using the legacy widget, I would use the Agent chat configuration. I'm not very good at coding, but i'm sure you'll see what I'm getting at. This is in addition to my suggestion above about topic applicability: even if I hide the Live agent icon in the header, the topic is still available. You'll still need to configure the topic to be available only for those VIP users. 

In my scenario, if a consumer accesses my VA page (/csp), no Live Agent support (polaris-dark branding); if any other user type accesses this portal (/csp), LIve Agent support icon is displayed - even when agents aren't available (polaris-light branding). Your branding can be the same visual (polaris-light-vip v polaris-light,) just 2 unique records with only LIve Agent deactivated - my example is for demo purposes only. 

 consumer_v_customer_user.png

 


First, you'll want to create a variation of your branding with the icon deactivated. Do this directly from the table record: sys_cs_branding_setup. (The CI console for branding setup doesn't allow you to edit active) polaris_dark.png

 

In the Agent Chat configuration, you can code your conditions: 
user_type_branding_config.png
Hope that helps! 

Tricia 

This is interesting, thank you! But looks like you would still have the pop-up, just not the "live chat" part? This may be the only way if we can't by any other route, but I think we don't want any part of the pop up visible. I trialled by role, however it then means ess users can reach the back end view 😞 I don't understand why servicenow would put the ability to restrict by role, but not by user criteria!

@Tricia Cornish Thanks a lot for sharing your detailed answer! Unfortunately, it doesn’t solve our original problem. What we’re trying to achieve is to only show the Virtual Agent chat bubble for users who belong to a specific company. All other users shouldn’t be able to start a chat with the bot at all. In the Service Portal Agent Chat configuration, however, visibility can only be restricted via roles, not user criteria (like the Company field).

JessicaMaurer_0-1755509910160.png

 

That said, your suggestion might be useful for us in another scenario, so I’ll definitely keep it in mind. 

exactly the same thing with us! I tried adding a role but unfortunately that then allows sp users to access the back end view which is no good.... Why they add role and not user criteria or company or something, I have no idea!

@Jessica Maurer @meeeeeeshel  - Sorry for my misunderstanding 🙂
This is where my coding abilities are coming up short, so the short answer is "I can't yet get it to work" but I believe it's my scripting abilities. 
First - you still don't want to use the legacy chat widget, you're still going to write the user criteria into the server script into the Agent Chat window. In the docs, migrating legacy portal configurations to the agent chat config is outlined here (step #3)#:https://www.servicenow.com/docs/bundle/xanadu-platform-user-interface/page/build/service-portal/task...
If there was a suggestion in the community on how to do this with the legacy portal widget, my hunch is that a better scripter than I could figure out the code for the agent chat server script window. 

My hero, Mark Roethof, wrote a blog a few years about for this use case using the legacy widget: https://www.servicenow.com/community/virtual-agent-nlu-articles/displaying-virtual-agent-widget-depe...
In this same article, Mark says that it won't work in the agent chat configuration, however I'm not convinced. I can edit the history, the audio notification, the branding, and in my example above, I am validating whether my user is a customer or consumer. There should be a way to retrieve the user data to impact the chat icon.  

An alternate idea (which Mark also documented) was creating another widget to control the Agent chat icon: https://www.servicenow.com/community/virtual-agent-nlu-articles/toggling-virtual-agent-chat-client-u...

Sorry I wasn't able to help get you to a solution, but hopefully shared some new ideas!