I am having an issue where duplicate transcripts are being created as customers click the 'Start a New Chat' button after a transcript was missed and we display a 'No agents available' message. SFDC thinks it is due to subsequent attempts to start a chat by the user. Has anyone been able to disable the option to start a new chat? I'd like to remove the button.
You cannot remove it directly. You will have to write small code for it. I had same use case and was able resolve it by writing few lines of code. The No agent available will only possible when a maximize event is fired: embedded_svc.addEventHandler('afterMaximize', function(data) { timeInterval = setInterval(function () { if(document.getElementById("dialogTextTitle") !== undefined && document.getElementById("dialogTextTitle") !== null ){ if("No agents available." == document.getElementById("dialogTextTitle").innerHTML ){ const embServiceButton = document.getElementsByClassName('embeddedServiceSidebarButton'); for(i=0; i<embServiceButton.length; i++){ if(embServiceButton[i].innerHTML.indexOf("Start a New Chat") !== -1 ){ embServiceButton[i].style.display = 'none'; } } } }clearInterval(timeInterval); }, 200); *************************************************
or embedded_svc.addEventHandler('afterMaximize', function(data) { timeInterval = setInterval(function () { const embServiceButton = document.getElementsByClassName('embeddedServiceSidebarButton'); for(i=0; i<embServiceButton.length; i++){ if(embServiceButton[i].innerHTML.indexOf("Start a New Chat") !== -1 ){ embServiceButton[i].style.display = 'none'; } }clearInterval(timeInterval); }, 200);