skip to content
Your session has expired.

Your authenticated session has expired due to inactivity. You can close this message and continue as a guest or sign in again before proceeding.

Via Privata Cascia, 11 - 20128 Milano - Italy

+39/02.36514205
+39/02.3651.4312
", { id: "new-message" }); $(".embeddedServiceSidebar").append($div); $("#new-message").text(configResp.Display_Text__c); } $("#new-message").show(); $('.messageContent').hide(); swapeAnimationClass(true); }); /* this event fired when customer minimize the chat window*/ embedded_svc.addEventHandler("afterMinimize", function (data) { swapeAnimationClass(isConnected); $('.messageContent').show(); }); /* this event fired when agent message some thing to customer*/ embedded_svc.addEventHandler("onChatEstablished", function (data) { $("#new-message").hide(); swapeAnimationClass(true); $('.messageContent').show(); isConnected = true; }); embedded_svc.addEventHandler("onChatEndedByAgent", function (data) { swapeAnimationClass(false); $("#new-message").hide(); isConnected = false; }); embedded_svc.addEventHandler("onChatEndedByChasitor", function (data) { swapeAnimationClass(false); $("#new-message").hide(); isConnected = false; }); /* this event fired when customer maximize the chat window*/ embedded_svc.addEventHandler("afterMaximize", function (data) { swapeAnimationClass(isConnected); $("#new-message").hide(); /* added placeholders texts*/ $("#FirstName").attr("placeholder", configResp.First_Name_Place_Holder__c); $("#LastName").attr("placeholder", configResp.Last_Name_Place_Holder__c); $("#Email").attr("placeholder", configResp.Email_Place_Holder__c); /* added privacy statement text, language banner*/ if ($('#policy-div').length === 0) { var $div = $("", { id: "policy-div" }); // banner code start if (configResp.Is_Banner_Needed__c && $('#banner-div').length === 0) { var $div1 = $("", { id: "banner-div" }); $(".fieldList").append($div1); var bannerString = '
' + configResp.Supported_Language_Banner__c + '
'; $("#banner-div").html(bannerString); $(".fieldList").append($div); var policyUrl = '' + configResp.Privacy_Statement__c + '

'; $("#policy-div").html(policyUrl); } else { $(".buttonWrapper").prepend($div); var policyUrl = '' + configResp.Privacy_Statement__c + '

'; $("#policy-div").html(policyUrl); } //banner code end } }); embedded_svc.init( configResp.First_Url__c, configResp.Second_Url_Channel__c, gslbBaseURL, configResp.Org_Id__c, configResp.Embedded_Service_Deployment_Name__c, { baseLiveAgentContentURL: configResp.baseLiveAgentContentURL__c, deploymentId: configResp.Deployment_Id__c, buttonId: configResp.Button_Id__c, baseLiveAgentURL: configResp.baseLiveAgentURL__c, eswLiveAgentDevName: configResp.eswLiveAgentDevName__c, isOfflineSupportEnabled: configResp.isOfflineSupportEnabled__c } ); }; if (!window.embedded_svc) { var s = document.createElement('script'); s.setAttribute('src', configResp.setAttribute_src__c); s.onload = function () { initESW(null); }; document.body.appendChild(s); } else { initESW('https://service.force.com'); /*once dom is modified from offline to online this method will invoke*/ $(document).on('DOMSubtreeModified', '.helpButtonEnabled', function () { isOnline = true; setTimeout(function () { if ($("button").hasClass("helpButtonEnabled") && !($("div").hasClass("messageContent"))) { if (loaded == 0) { openBannerAfterTimeout(); } } else { document.getElementById('sfchatbanner').classList.remove('active'); } }, 1000) }) /*once dom is modified from online to offline this method will invoke*/ $(document).on('DOMSubtreeModified', '.helpButtonDisabled', function () { isOnline = false; $(".embeddedServiceHelpButton .helpButton .helpButtonDisabled ").removeClass("messageAnimation"); setTimeout(function () { if ($("button").hasClass("helpButtonDisabled") && !($("div").hasClass("messageContent"))) { document.getElementById('sfchatbanner').classList.remove('active'); } else { if (loaded == 0) { openBannerAfterTimeout(); } } }, 1000) }) /*added animation if dom contains new message*/ $(document).on('DOMSubtreeModified', '.message', function () { var msgLength = $('.message:contains("' + configResp.Check_Text__c + '")').length; if (msgLength == 0) { swapeAnimationClass(false); $("#new-message").hide(); $('.messageContent').show(); } if ($('.chasitorText')[0]) { swapeAnimationClass(true); } if ($("iframe").hasClass("snapins_postChat")) { swapeAnimationClass(false); } }); $(document).on("click", ".helpButtonEnabled", function (e) { var impressioned = "no"; if (loaded == 1) impressioned = "yes" if(!Boolean(isHeaderClick)){ window.document.dispatchEvent ( new CustomEvent('msiAEMDataTransfer', { detail: { "action": "click", "data-uet": { "link-category": "chat", "link-type": "button", "link-label": "chat floater", "link-url": "@open chat window", "link-place": "1", "restriction": "public", "add-detail": "proactive chat popup impressioned: " + impressioned, "cname": "chat widget", "page-area": "9" } } }) ); } isHeaderClick = false; loaded = 1; /* get and prepopulate the authenticated site use details to pre chat form*/ if ($("#header-user-menu .header-user-menu-heading").text() && $("#header-user-menu .header-user-menu-label").text()) { var name = $("#header-user-menu .header-user-menu-heading").text().trim().split(" "); embedded_svc.settings.prepopulatedPrechatFields = { FirstName: name[0], LastName: name[1], Email: $("#header-user-menu .header-user-menu-label").text(), Subject: "Hello" }; } document.getElementById('sfchatbanner').classList.remove('active'); }); $(document).on("click", ".helpButtonDisabled", function (e) { if (typeof contactUsUrl !== 'undefined') { var contactUsFormUrl = contactUsUrl; } else { var contactUsFormUrl = $(".navbar .ms-button-chat").attr("data-contact-form-url"); } window.document.dispatchEvent( new CustomEvent('msiAEMDataTransfer', { detail: { "action": "click", "data-uet": { "link-type": "button", "link-label": "offline support floater", "link-url": contactUsFormUrl, "link-place": "1", "restriction": "public", "cname": "chat widget", "page-area": "9" } } }) ); window.open(contactUsFormUrl, "_self"); }); } }, error: function (request, status, errorThrown) { console.log(status); console.log(errorThrown); console.log(request); } }); });
MOTOROLA, MOTO, MOTOROLA SOLUTIONS and the Stylized M Logo are trademarks or registered trademarks of Motorola Trademark Holdings, LLC and are used under license. All other trademarks are the property of their respective owners.