Zoho SalesIQ's JavaScript APIs let you customise chat widget behaviour beyond what the standard dashboard settings offer, giving developers fine-grained control over the visitor experience.
How to use them
Pick the JavaScript API you need and paste its code directly after your existing SalesIQ widget code, inside script tags on your site. Every API call must sit inside the SalesIQ global ready handler, and you can include as many API calls within that single handler as you need.
Examples of what's possible
- Custom widget appearance. The custom.html API replaces the default chat bubble entirely with your own online and offline images, and defines what happens when a visitor clicks each state.
- Controlling chat window visibility. The chatwindow.visible API shows or hides the chat window, optionally after a set delay.
- Reacting to the chat window opening. The floatwindow.open API lets you run custom code the moment a visitor opens the chat window.
- Starting a chat automatically. The chat.start API initiates a chat on the visitor's behalf, useful for a "Chat with us" button elsewhere on your page, though it must be called from within a click event and needs the visitor's question, and any mandatory contact fields, set beforehand using the corresponding visitor APIs.
- Choosing which departments a visitor sees. The chat.department API controls which departments appear in the pre-chat form, and can be limited to only departments with operators currently online.
- Click-to-chat. The chat.mode API lets a click on the widget immediately start a chat with a pre-configured question, rather than requiring the visitor to type one themselves.
Note: Several of these APIs depend on matching settings in your brand configuration, for example, departments used in chat.department need to be enabled under your brand's Flow Controls first, or the API call won't have the expected effect.
Need help? 1 Cloud Consultants can help you implement custom SalesIQ JavaScript APIs to match your exact chat widget requirements.
Book a discovery call with 1 Cloud Consultants.