How to separate closing message from Live Chat Agent and VA closing

Debosree Sinha
Tera Contributor

Hi All,

I'm having an issue to separate out VA closing chat vs LiveAgent chat closing.

 

Currently, i tried to create a closing setuptopic which Split the decision using an if statement with vaSystem.didConnectToLiveAgent(). If the user connected with an Live agent then it will say something different(eg:LiveAgent closing) from normal closing VA (eg: Closing VA chat).

DebosreeSinha_0-1687486524311.png

-------yes-live agent branch-------------
(function execute() {
if (vaSystem.didConnectToLiveAgent()==true)
return true;
else
return false;
})()

------No branch-------

(function execute() {
/* Return true or false to indicate the branch condition's applicability.
For example:

var applies = vaInputs.first_name == 'Bill' ? true : false;
return applies;
*/
if (vaSystem.didConnectToLiveAgent()==true)
return false;
else
return true;
})()
 
Issue : I'm getting same (Closing VA chat) when my topic finishes in VAas well as when no LiveAgent available
and LiveAgent closing(only I get response/connected with LiveAgent).
 
Is there a way to get LiveAgent closing both when Live Agent gets connected as well as Live Agent unavailable and only (Closing VA chat) at the end of topic in virtual agent?
 
Thanks D
1 REPLY 1

johndoh
Mega Sage

Please see my post in your other post about this subject - How to get different closing message for liveagent... - ServiceNow Community