Auto popup of a Service Portal widget (for example Virtual Agent)

Mark Roethof
Tera Patron
Tera Patron

Hi all,

Just out of curiosity, I was wondering, would it be possible to have a widget on the Service Portal appearing / making visible / etc. on a certain condition like:
- After 1 minute visiting a page
- After 3 times typing a search

It's just out of curiosity. Though I was thinking maybe it would be nice to have something like a custom Virtual Agent widget automatically popping up to assist an employee.

Curious if anyone has an idea on this.

Kind regards,
Mark

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

1 ACCEPTED SOLUTION

Alikutty A
Tera Sage

Hello Mark,

Yes this should be possible.

So lets say you want to auto populate a virtual agent after 1 minute of visiting a page. This is possible using the $timeout. You could trigger the virtual agent dynamically after the timeout specified in your page's widget. What this does is a late loading of widgets. The same logic can be applied on search, you may need to have additional data which say this is my third search in last 15 minutes or so. You could find sample scripts to load virtual agent in the CSM portal header menu widget.

Thanks!

View solution in original post

4 REPLIES 4

Omkar Mone
Mega Sage

Hi Mark,

 

That would be possible with ng-if condition on that particular <div> that we need to show. Like for the first on, we need to set the start time and set the flag to +1. once the time is elapsed we can refresh the server once more which will set the flag value to false and the $scope.apply() method of AngularJS will internally check that flag and toggle the div automatically. 

Hope this is what you were looking for. That something like a "Good to have" kind of functionality. Would surely give this a try.

 

Regards

Omkar Mone

Alikutty A
Tera Sage

Hello Mark,

Yes this should be possible.

So lets say you want to auto populate a virtual agent after 1 minute of visiting a page. This is possible using the $timeout. You could trigger the virtual agent dynamically after the timeout specified in your page's widget. What this does is a late loading of widgets. The same logic can be applied on search, you may need to have additional data which say this is my third search in last 15 minutes or so. You could find sample scripts to load virtual agent in the CSM portal header menu widget.

Thanks!

Eventually I created a widget with the timeout in the link field. After x seconds, a div that has ng-if will evaluate to true and will be shown. Did added some more logic, though the timeout idea was the first step.

Tnx!

find_real_file.png

Kind regards,
Mark

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Hi Mark,

Could you please share how this is done?

Thank you!