How to hide/remove the "Live agent Support" option in Virtual Agent when there is no agents available or during a weekend to take chats?

rajat1121
Tera Expert

1) Even when there are no live agents available to take live chat, we have "Live agent Support." option available/ clickable as shown:

find_real_file.png

2) We also need to remove this option on weekends.

Is there any way we can disable this when there are no live agents available to take chats?

Thanks,
Rajat

2 REPLIES 2

Muralidharan BS
Mega Sage
Mega Sage

HI, 

It is possible, you can toss in your custom script in the script section of the topic properties.

 

find_real_file.png

 

This script is for Schedule and weekend. 

 

(function execute() {

    var now = new GlideDateTime();
	if(now.getDayOfWeekLocalTime()<6){
		return true;
	}
    var sched = new GlideSchedule("08fcd0830a0a0b2600079f56b1adb9ae"); //sysid of the schedule
    sched.setTimeZone('Europe/London'); //timezome
    if (sched.isInSchedule(now)) {
        return true;
    }
    return false;
})()

DorianK
Tera Expert

Hi,

 

The way you hide it from the list is by going to Virtual Agent Designer > Click on the "Live Agent Support" (read only) topic > Click on Active (top right) > Uncheck the "Included in list of topics". 

 

Cheers,

Dorian

 

DorianK_0-1681128076057.png

 

Unfortunately, SN doesn't provide an example of how to hide it from the list dynamically based on agent availability OOTB. Someone also answered on how you can clone + modify (then disable the original one) in order to hide it based on a schedule or script.