Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Virtual Agent script not working

Kri
Kilo Sage

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

Krishna124_0-1686995700793.png


@Community Alums @Mark Roethof @Ankur Bawiskar @Community Alums 

6 REPLIES 6

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

LinkedIn

johndoh
Mega Sage