Hiding Virtual Agent based on condition (not using user criteria plugin)

srininaidu
Tera Contributor

 

I am looking to hide OOB Virtual agent on portal based on condition for logged in user.

I am looking assign below value 

data-flag= false   (this value set from script include based on some user values and conditions through properties)

Note not using user criteria plugin. We adding another custom chat bot on servicenow portal by hiding virtual agent.

 

Would like to use data-flag parameter in HTML code inside <div> tags.

 

Thanks

Srini

 

3 REPLIES 3

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

First essential question when working on such...

Are you using the legacy Service Portal Virtual Agent widget? Or are you using the recommended Agent Chat configuration?

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Thanks Mark your response had gone through many of your virtual agent posts.   I think it is newer chat as

under agent chat service portal agent chat config is active and  even i tried adding options parameter(server script)

options.visible_flag = true;    ( true/false  this flag will return from script include after many conditions based on data)

 

html code  line 1 of widget: sn_va_sp_widget

<div class="conversation-button-container" ng-if=$ctrl.options.visibe_flag>

 

Note this VA chat hide/show on portal based on user who logged in.

 

Regards

Srini

I am  placing another custom widget on servicenow portal and would like to hide OOB servicenow chat widget ,  Can we place custom widget exactly on top of servicenow widget  that way  custom widget can be visible if we can't turn of OOB servicenow chat based on  flag that can be set in server script.

 

Regards

Srini