
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
05-08-2022 10:11 PM - edited 08-03-2024 07:08 AM
Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
Hi there,
When working with the Virtual Agent web client, there are several parameters that you can add to Service Portal Agent Chat Configuration and a (legacy) Service Portal widget. Parameters like loading a specific topic, disabling sound notifications, activating Live Agent only, etcetera. In a few short articles I'll share a bit of background information on some of these parameters. This time: connect to Live Agent directly.
Live Agent only
When Glide Virtual Agent is active, the first handshake is made to the Virtual Agent assistant. What if you have a requirement to connect to Live Agent directly? You could change the Greeting Setup Topic for this, or... you could just add the "live_agent_only" parameter! Depending on how you implemented the Virtual Agent web client on your instance, you would need to add a parameter to the applicable Service Portal Agent Chat Configuration record, or add it to the URL parameters of the (legacy) Service Portal widget. Both methods do work slightly differently.
Service Portal Agent Chat Configuration
If you are using Service Portal Agent Chat Configuration, open the applicable Service Portal Agent Chat Configuration record. Within the Server Script you would need to add "live_agent_only: true" to connect to Live Agent directly.
For example:
(function($sp) {
return = {
live_agent_only: true
};
})($sp);
(legacy) Service Portal widget
If you are using a (legacy) Service Portal widget, verify if it concerns an embedded widget (for example to the header or footer of the portal) or that it concerns a widget instance that has been added to a specific page.
Widget instance
When having a Widget instance in place, ctrl + right click on the Virtual Agent icon, and select "Instance Options".
Within the modal, add to the "Virtual Agent Client URL Parameters" field:
sysparm_live_agent_only=true
Embedded widget
A common seen method when working with the Virtual Agent web client, is embedding the Service Portal widget to the header or footer of the portal. Adding URL parameters is also possible in this case, I've explained such in a previous article (Adding instance options to directly embedded Service Portal Widgets [https://community.servicenow.com/community?id=community_article&sys_id=ef3c3fe7dba6d01066f1d9d968961...]).
For example, your code for embedding the Service Portal widget might look like:
<widget id="sn-va-sp-widget"></widget>
To connect to Live Agent directly you would need to expand this to:
<widget id="sn-va-sp-widget" options='{"va_url_params":"&sysparm_live_agent_only=true"}'></widget>
---
And that's it! A short explanation on how you can connect to Live Agent directly in the Virtual Agent web client, for both Service Portal Agent Chat Configuration and a Service Portal widget. If any questions, let me know!
C |
If this content helped you, I would appreciate it if you hit bookmark or mark it as helpful.
Interested in more Articles, Blogs, Videos, Podcasts, Share projects I shared/participated in? |
Kind regards,
Mark Roethof
ServiceNow Technical Platform Architect @ Eraneous
3x ServiceNow Developer MVP
3x ServiceNow Community MVP
---
- 4,669 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks for the awesome article. I searched everywhere for how to connect directly to a live agent and this did the trick!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
What about on Now Mobile, how do we enforce this?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I have been having problems getting the ServiceNow Instance, I need help so badly.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Has anyone been able to get the Teams VA Chat integration to only provide a SD Chat option?