Chat window re-opens on new pageload with agent initiated chats

Chat window re-opens on new pageload with agent initiated chats

When an agent initiates a chat with a web visitor and the visitor closes the chat window, I'd expect the window to stay closed and respect the visitor's preference not to chat.

However, on each subsequent page load the chat window re-opens for the web visitor.

Is this the expected behavior?

I am using the float not the embed chat. Here is the code we implemented on our website.:

var $zoho= $zoho || {livedesk:{values:{},ready:function(){}}};var d=document;s=d.createElement("script");s.type="text/javascript";s.defer=true;s.src=" https://livedesk.zoho.com/apliiq/float.ls?embedname=apliiq";t=d.getElementsByTagName("script")[0];t.parentNode.insertBefore(s,t);

$zoho.livedesk.ready=function(){
$zoho.livedesk.floatbutton.visible("hide");
function checkWidth2() {
var winSize = $(window).width();
if (winSize <= 1024) {
$zoho.livedesk.floatbutton.visible("hide");
$zoho.livedesk.floatwindow.visible("hide");
$('.chatWrap').hide();
}
else if (winSize > 1024){
$('.chatWrap').show();
$zoho.livedesk.floatwindow.visible("hide");
$zoho.livedesk.floatbutton.visible("hide");
$zoho.livedesk.floatwindow.close(function(){
$zoho.livedesk.floatbutton.visible("hide");
});
$zoho.livedesk.floatwindow.minimize(function(){
$zoho.livedesk.floatbutton.visible("hide");
});
function toggleZoho() {
if ($zoho.livedesk.floatwindow.visible("hide")) {
$zoho.livedesk.floatwindow.visible("show");
}
else {
$zoho.livedesk.floatwindow.visible("hide");
}
}
$('.chatWrap').click(function () {
toggleZoho();
});

$('.modalpopup').on('click', '.chatWrap', function () {
    toggleZoho();
});
}
}
checkWidth2();
$(window).resize(checkWidth2);

}



Thanks in advance for any help.

    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方