Make Online Float Button Appear if Agent is Online instead of Disappear if Agent is Offline

Make Online Float Button Appear if Agent is Online instead of Disappear if Agent is Offline

We are working to setup Zoho SalesIQ Chat on our website. Our goal is that the chat float button only appear if an agent is online. We tested the script below which hides the chat float button when all agents are offline:

$zoho.salesiq.ready=function()
{
      $zoho.salesiq.chat.offline(function(){$zoho.salesiq.floatbutton.visible("hide");});
}

The problem with this script is the offline float button appears for a second and then disappears. When a user goes to different pages, the offline float button appears and then disappears quickly confusing our website visitors. 

We would like to enable the opposite of this script: make the float button hidden by default and only appear if an agent is online. This would solve our problem of the offline float button appearing and then disappearing which the above script does.

Can you help us figure out how to write a script or adjust the default float button script to make this happen and resolve our problem?
    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 コンテンツ




                              ご検討中の方