How to restrict Virtual Agent to only a specific group/groups?

MitaliJain
Tera Contributor

Can we make virtual agent icon visible based on user group? I am currently using Out-of-the-box virtual agent chat config. I am checking condition using gs.getUser().isMemberOf(), it is not working as needed. It is making visible to all.

12 REPLIES 12

Community Alums
Not applicable

Hi Mitali,

 

Can you please refer to below short video. Let me know if you have further questions. 

 

Please mark this comment as Correct Answer/Helpful if it helped you.

 

Cheers,

Hardit Singh

 

Your video is nice, though its not on Agent Chat configuration what is asked in this question. Your video is on the legacy method of using a Service Portal Virtual Agent widget.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Can you share your agent chat configuration server script? Or I assume you added the condition there?

 

Would using the roles field also be alternative?

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hi Mark,

 

Please find attached screenshot for the script I am trying.
As per the requirement, I want to enable it with respect to group of users.