Supported widget methods
The following methods allow you to change and customize behaviour of the widget as you need it.
Last updated
Was this helpful?
The following methods allow you to change and customize behaviour of the widget as you need it.
Last updated
Was this helpful?
Supported methods:
If you use multiple instances of webchat on your site, you must always place an unambiguous identification of each instance before the method name: instances()[x], where X is the instance name (0 - 9)
For example, $owidgets.instances()[1].addCustomData("contract", "test123");
The method is used to pass values from the web that are stored in existing . These parameters can be made available to operators so that they can see them for each received session.
$owidget.addCustomData('smlouva', 'test123');
The method is suitable for the opposite situation (when you need to delete the currently stored value from a variable.
$owidget.clearCustomData();
It's used for chat window opening.
$owidget.openChat();
It's used for chat window closing.
$owidget.closeChat();
$owidget.connectToServer();
The method is used to determine whether the client side is ready for an Audio/Video session.
$owidget.getAVSupport();
$owidget.getOperatorStatus();
$owidget.hideCTA();
$owidget.init("CompanyGUID", "Widget Name");
It is the opposite method to addCustomData and is used to delete the value of the variable.
$owidget.removeCustomData("smlouva", "test123");
Used to load the current widget configuration. If a more current configuration is found on the server, it will replace the current one. It also initializes the widget, including discovering the state of the groups contained in the and evaluating the set.
The state of the operators (groups) contained in the is determined.
Suitable for hiding the previously displayed .
It is used to initialize the script on the page. Coincidentally, this is part of the , where it is always necessary to specify the CompanyGUID and the name of the WebChat script.
Be sure to include the CompanyGUID, which can be found in the .