How to get different closing message for liveagent vs chatbot

Debosree Sinha
Tera Contributor

Hi All,

i’m trying to separate closing message of VA chatbot vs liveagent window.

I have used a decision to split to branches based on vaSystem.didConnectToLiveAgent().


But, I ended up having  similar closing block ( both aftef finishing VA chatbot as well as live agent unavailable case). Also separate liveagent specific closing message when agent are available.

 

my requirement is to have closing msg for live agent( both available as well as unavailable) and a separate closing for VA chatbot.

5 REPLIES 5

johndoh
Mega Sage

Hello @Debosree Sinha ,

 

This will require you to duplicate the Out of the Box closing topic

 

johndoh_0-1687535568832.png

And will also require you to update your setup topic to point to the newly created item

johndoh_1-1687535611726.png

 

 

Within the closing message block, you should be able to do an if statement where didConnect is True return your custom message else return vaSystem.getClosingMessage();

But, when the liveAgent is unavailable , then also it is showing -VA chatbot closing message.

 

But, that will also give me Virtual agent closing( when live agent unavailable as well as end of VA chat topic closure).

Only, during the Live agent connection, message will be specific to LiveAgent closing .

 

I want whenever the transfer goes for LiveAgent (whether available or unavailable) to give a separate message relevant to LiveAgent support closing.

How about this, create a new script variable called 'transferring' or something. Then in your connect to live agent script you add

vaVars.transferring = true;

Then in your closing you should be able to use that new variable in the if/else statement and clear up the bogus closing for the items not being transferred.