Web Chat API Reference
Functions you can run on a running Web Chat.
Function | Description |
IrisWebChat.setOpen() | Sets the state of the Webchat, params: true false |
IrisWebChat.toggleOpen() | Toggles the state of the Webchat and returns the current (post-set) value. |
IrisWebChat.getOpen() | Returns the state of the Webchat. For Inline mode, "open" state is when the Get Started button has been pressed by an End User. For Floating mode, "open" state is when the Webchat Window is visible. |
Function | Description |
IrisWebChat.setActionButtonHidden() | Sets the Action Button state, params: true false |
IrisWebChat.toggleActionButtonHidden() | Toggles the state of the Action Button and returns the current (post-set) value. |
IrisWebChat.getActionButtonHidden() | Returns the state of the Action Button. |
Function | Description |
IrisWebChat.setProfileData() | |
IrisWebChat.getProfile() | |
<a id="contact_us">Contact Us</a>
<script>
IrisWebChat.init({
token: '<YOUR_TOKEN>',
actionButtonHidden: true,
closedAcrossPages: true,
}).then(instance => {
document.getElementById('contact_us').addEventListener('click', () => {
instance.setOpen(true);
});
});
</script>
Last modified 8mo ago