Call parameters
When a customer is on the website for a long time, you may have to assume that he/she cannot decide what product to choose. For operators to have information, you can add your own variable when he is on the page longer than the specified time.
In the rules settings you will create a new rule in the application administration. You use the “time spent on the website” variable for more than 120 seconds. At that time, you run a feature named “_clientUndecided.” In the Application) section you also need to set a new variable and call it “navod_undecided” for example. This will then appear in the waiting queue even after receiving by the operator.
Add a new feature to your “load” event listener on your website as a $owidget object method in which you set the call parameter:
$owidget._clientUndecided = function() {
$owidget.addCustomData('navod_undecided', true);
}
Instructions for implementation
First, you need to define the variable in your application. Thus go to Settings -> Application -> Variables -> and then select Add.
Create a name and tag for the variable - it will be displayed to the operators, and save.
Then add the feature to the widget code
$owidget.addCustomData(NÁZEV PROMĚNNÉ , HODNOTA PROMĚNNÉ );
There are two kinds of variables in the application.Predefined, which are:
URL pages
Widget
Client name
Client’s phone number
Page title
Widget language
Emails of clients
And customized variables, which you can create.
Defining variables
Our default variables:
$owidget.addCustomData("oo1_guest_ident","Chuck" + "Norris");
$owidget.addCustomData("oo1_guest_email" ,"chuck@thebest.net" );
$owidget.addCustomData("oo1_guest_phone","777666777");
Then enter each other variable in the same manner:
($owidget.addCustomData(NázevProměnné, HodnotaProměnné)
Test snippet for deploying on the webpage
<script type="text/javascript">
(function() {
var scr = document.createElement('script');
scr.type = 'text/javascript';
scr.async = true;
scr.charset = 'UTF-8';
scr.src = '//app.mluvii.com/widget/OOWidget.js';
scr.$owidgetOnLoad = function(owidget) {
if (!owidget.isSupported) {
return;
}
owidget.init("497bdd8f-2e6f-42f5-b6fb-ddc00c5ccb60", "NASA");
owidget.addCustomData("test_promenne", "TEXT/Hodnota dané proměnné");
owidget.connectToServer();
};
var ffs = document.getElementsByTagName('script')[0];
ffs.parentNode.insertBefore(scr, ffs);
})();
</script>