Virtual agent not allowing new conversation

Kri
Tera Guru

I created custom LIVE AGENT and configured the Chat window connecting End Customer directly to the Live Agent while opening from the below community but I face the issue when End Customer requesting Live Agent where they are OFFLINE status then it is giving 'no agents available' message but it is not allowing to open New conversation instead the End Customer needs to refresh the whole page for that

https://www.servicenow.com.mcas.ms/community/virtual-agent-nlu-forum/how-do-i-bypass-disable-virtual...

@Community Alums 

43 REPLIES 43

Kri
Tera Guru

@Community Alums @Mark Roethof 

johndoh
Mega Sage

For me I created a script variable called agent_online:

johndoh_0-1687066969361.png

 

 

 

(function execute() {
if (vaSystem.isLiveAgentAvailable()) {
return true;
} else {
return false;
}
})()

 

 

Once that was created the items below will complete the process, but it sounds like your schedule on the Queue needs to be adjusted. From my experience unless I set the schedule for 24/7 I would have that experience. I think it is misleading that this is for the live agent while instead this is for the capabilities as a whole. That was also part of the reason for the second response.

After the variable has been created Agent Online branch condition is (Screenshot below):

 

(function execute() {
return vaVars.agent_online == true;
})()

 

While on the Agent offline branch condition is (Screenshot below):

 

(function execute() {
return vaVars.agent_online == false;
})()

 

 johndoh_0-1687051841039.png
Then finally the Connect To Agent Script Action a few steps under short description, I added a deflection pattern for example, from the image above:

 

(function execute() {
if(vaSystem.isLiveAgentAvailable()) {
vaSystem.connectToAgent();
}
})()

 

@Kri See above

I tried your script but whenever no agents available and when I wants to start the new conversation I can't able to do it. It is getting greyed out. I don't have any integration for Live chat configured for my instance

Right, it's because of your schedule. Set it to something that is 24/7 and willing to bet you it works. I also made an update to above about this but betting you read it first.

 

johndoh_0-1687081736633.png