Virtual Agent script not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2023 02:57 AM
I wrote the below script for Live Agent customization but I'm not getting the right output
(function execute() {
if(vaSystem.isLiveAgentAvailable()) {
vaSystem.connectToAgent(); }
else {
return 'Live agent is not currently available. Please check back later.';
}
})()
Output
@Community Alums @Mark Roethof @Ankur Bawiskar @Community Alums

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2023 09:19 AM
No just an xml file of a sys_cs_topic record.
Agent Chat configuration script I'm testing with:
(function($sp) {
var isVAActive = GlidePluginManager.isActive('com.glide.cs.chatbot');
var configObj = {
live_agent_queue: $sp.getDisplayValue('sp_chat_queue'),
branding_key: 'ec_branding',
portal: $sp.getValue('url_suffix'),
live_agent_only: !isVAActive
};
return configObj;
})($sp);
Kind regards,
Mark
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2023 11:09 PM - edited 06-17-2023 11:10 PM
This seems like a duplicate of - Virtual agent not allowing new conversation - ServiceNow Community