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.
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 parameters. 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();
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 routing and evaluating the rules set.
$owidget.connectToServer();
The method is used to determine whether the client side is ready for an Audio/Video session.
$owidget.getAVSupport();
The state of the operators (groups) contained in the routing is determined.
$owidget.getOperatorStatus();
Suitable for hiding the previously displayed pop-up.
$owidget.hideCTA();
It is used to initialize the script on the page. Coincidentally, this is part of the WebChat script, 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 WebChat script.
$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");
Last updated
Was this helpful?
Was this helpful?