Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| lab5 [2024/12/22 16:31] – created gerardorourke | lab5 [2024/12/24 10:59] (current) – [cce 12.6] gerardorourke | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| *[[https:// | *[[https:// | ||
| - | ===== UCCE 12 ===== | + | ===== cce 12.6 ===== |
| - | ^ Description | + | ^ Description |
| - | | AD | + | | AD |
| - | | Finesse | + | | fin |
| - | | UCCE AW-HDS-DDS | + | | Rogger |
| - | | UCCE-CUIC-A | + | | AW-HDS-DDS | cce-aw-a.lab5.purplepi.ie |
| - | | CVP | + | | PG | cce-pg-a.lab5.purplepi.ie |
| - | | CUCM | uc-cucm12-a.lab2.purplepi.ie | + | | cce-CUIC-A |
| - | | VVB | UCCE-VVB-A.lab2.purplepi.ie | + | | CVP |
| - | | ASR | nuance-asr.lab2.purplepi.ie | + | | CUCM | cce-cucm-a.lab5.purplepi.ie |
| - | | ECE | ucce-ece-db-12.lab2.purplepi.ie | + | | VVB |
| - | | Attendant Console | + | |
| - | | Redbox 1 | redbox1.lab2.purplepi.ie | + | |
| - | | UCCX | https://uc-uccx-a.lab2.purplepi.ie/ | + | |
| - | ===== CCE 12 Beta ===== | ||
| - | |||
| - | ^ Description | ||
| - | | Finesse | ||
| - | | UCCE AW-HDS-DDS | ||
| - | | UCCE-CUIC-A | ||
| - | | CVP | ucce-cvp-1a.lab2.purplepi.ie | ||
| - | | VVB | UCCE-VVB-A.lab2.purplepi.ie | ||
| - | | ECE | ucce-ece-beta.lab2.purplepi.ie | ||
| - | |||
| - | ==== ECE 12 - Chat Undocked Example ==== | ||
| - | < | ||
| - | <script language=javascript> | ||
| - | var egainChat | ||
| - | /*eGain Chat server */ | ||
| - | egainChat.serverURL = " | ||
| - | /*eGain Chat Entry Point*/ | ||
| - | egainChat.EntryPointId | ||
| - | /*eGain Chat Locale*/ | ||
| - | egainChat.Locale | ||
| - | /*eGain template name*/ | ||
| - | egainChat.Template = " | ||
| - | /*Set to true to enable posting attributes to templates*/ | ||
| - | egainChat.PostChatAttributes = false; | ||
| - | egainChat.CustomerContextParameters = {}; | ||
| - | egainChat.openHelp = function () { | ||
| - | var domainRegex = / | ||
| - | try { | ||
| - | if (egainChat.eglvchathandle != null && egainChat.eglvchathandle.closed == false) { | ||
| - | egainChat.eglvchathandle.focus(); | ||
| - | return; | ||
| - | } | ||
| - | } | ||
| - | catch (err) { | ||
| - | } | ||
| - | var refererName = ""; | ||
| - | refererName = encodeURIComponent(refererName); | ||
| - | var refererurl = encodeURIComponent(document.location.href); | ||
| - | var hashIndex = refererurl.lastIndexOf('#' | ||
| - | if (hashIndex != -1) { | ||
| - | refererurl = refererurl.substring(0, | ||
| - | } | ||
| - | var eglvcaseid = (/ | ||
| - | var vhtIds = ''; | ||
| - | if (typeof EGAINCLOUD != ' | ||
| - | { | ||
| - | var ids = EGAINCLOUD.Account.getAllIds(); | ||
| - | vhtIds = '& | ||
| - | } | ||
| - | var EG_CALL_Q = window.EG_CALL_Q || []; | ||
| - | EG_CALL_Q.push([' | ||
| - | var eGainChatUrl = egainChat.serverURL + '/ | ||
| - | | ||
| - | eGainChatUrl += '' | ||
| - | eGainChatUrl += '& | ||
| - | | ||
| - | var domain = domainRegex.exec(eGainChatUrl)[0]; | ||
| - | | ||
| - | if ((eGainChatUrl + refererurl).length <= 2000) | ||
| - | eGainChatUrl += '& | ||
| - | var params = ' | ||
| - | | ||
| - | window.addEventListener(' | ||
| - | try{ | ||
| - | var message = JSON.parse(event.data); | ||
| - | if (event.origin === domain && message.Caller.indexOf(' | ||
| - | if (message.Key === ' | ||
| - | var response = { | ||
| - | | ||
| - | | ||
| - | }; | ||
| - | | ||
| - | } | ||
| - | } | ||
| - | }catch(e){} | ||
| - | }); | ||
| - | if (egainChat.PostChatAttributes) { | ||
| - | if(window.navigator.userAgent.indexOf(" | ||
| - | var win = document.getElementById(' | ||
| - | win.contentWindow.postMessage(JSON.stringify(egainChat.CustomerContextParameters), | ||
| - | }else{ | ||
| - | window.addEventListener(' | ||
| - | try{ | ||
| - | var message = JSON.parse(event.data); | ||
| - | if (event.origin === domain && message.Caller.indexOf(' | ||
| - | if (message.Key === ' | ||
| - | | ||
| - | var response = { | ||
| - | value: | ||
| - | caller: | ||
| - | }; | ||
| - | event.source.postMessage(JSON.stringify(response), | ||
| - | } | ||
| - | } | ||
| - | }catch(e){ | ||
| - | } | ||
| - | }); | ||
| - | } | ||
| - | } | ||
| - | egainChat.eglvchathandle = window.open(eGainChatUrl, | ||
| - | }; | ||
| - | /*To be called by client website. All the parameters specified in application-chat-defaults must be set here.*/ | ||
| - | egainChat.SetCustomerParameters = function (egainAttributeName, | ||
| - | egainChat.CustomerContextParameters[egainAttributeName] = attributeValue; | ||
| - | }; | ||
| - | egainChat.writeIframeIfRequired = function() { | ||
| - | if(egainChat.PostChatAttributes | ||
| - | var iframe = document.createElement(' | ||
| - | iframe.src=egainChat.serverURL+'/ | ||
| - | iframe.style.display = ' | ||
| - | iframe.name = ' | ||
| - | iframe.id = ' | ||
| - | if (typeof document.body !== ' | ||
| - | document.body.appendChild(iframe); | ||
| - | }else{ | ||
| - | setTimeout(egainChat.writeIframeIfRequired, | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | egainChat.writeIframeIfRequired(); | ||
| - | </ | ||
| - | <a href="#" | ||
| - | |||
| - | </ | ||
| - | |||
| - | ==== ECE 12 - Chat Docked Example ==== | ||
| - | |||
| - | The following line must be added to the HTML of all pages on which you want docked chat to function: | ||
| - | < | ||
| - | |||
| - | |||
| - | ===== UCCX ===== | ||
| - | < | ||
| - | |||
| - | ^ Description | ||
| - | | UCCX | uc-uccx-a.lab2.purplepi.ie | ||
| - | | SOCIALMINER | ||
| - | </ | ||
| - | |||
| - | ==== CCX Chat==== | ||
| - | |||
| - | === Classic Chat === | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | <meta http-equiv=" | ||
| - | <!-- Note: Ensure that the moment.js is available and correctly referenced in the client environment.--> | ||
| - | <script src=" | ||
| - | <script src=" | ||
| - | <script src=" | ||
| - | <script language=" | ||
| - | function updateAuthor(theForm){ | ||
| - | if(theForm.extensionField_Name){ | ||
| - | if(theForm.extensionField_Name.value!="" | ||
| - | theForm.author.value=theForm.extensionField_Name.value; | ||
| - | theForm.extensionField_Name.name=" | ||
| - | return(true); | ||
| - | if(theForm.extensionField_Email){ | ||
| - | if(theForm.extensionField_Email.value!="" | ||
| - | theForm.author.value=theForm.extensionField_Email.value; | ||
| - | return(true); | ||
| - | return(true); | ||
| - | |||
| - | / | ||
| - | /* | ||
| - | Below code handles the display of Chat form based on the Chat Schedule configuration. The chat form is displayed to the client if the client’s browser current time is in the Business working hours else offline message is display.The Chat Schedule configuration handles client’s in different time zones as well as daylight saving provided the client’s system time settings are appropriate. | ||
| - | The Chat Schedeule code flow requires moment timezone library, if the library is not accessible then scheduling configuration is ignore and Chat form is always displayed to the client. | ||
| - | */ | ||
| - | |||
| - | /* convert client’s timezone to server time zone using moment timezone library to validate against Chat Schedule configuration.*/ | ||
| - | var serverTimezone = " | ||
| - | var currentDateInServerTimeZone = moment.tz(new Date(), serverTimezone); | ||
| - | var currDay = currentDateInServerTimeZone.day(); | ||
| - | var currDate = currentDateInServerTimeZone.format(" | ||
| - | var currWorkTimeMins = (currentDateInServerTimeZone.hours() * 60) + currentDateInServerTimeZone.minutes(); | ||
| - | /*Below variables hold the Chat Schedule Configuration details as provided in the AppAdmin Schedule Configuration Page*/ | ||
| - | var holidays = []; | ||
| - | var specialDays = []; | ||
| - | var routineDays = []; | ||
| - | function isOnHoliday() { | ||
| - | for (var i=0; i < holidays.length; | ||
| - | if(holidays[i] == currDate){ | ||
| - | return true; | ||
| - | } | ||
| - | } | ||
| - | return false; | ||
| - | } | ||
| - | function isOnSpecialDay() { | ||
| - | for (var i=0; i < specialDays.length; | ||
| - | if(specialDays[i].date == currDate){ | ||
| - | break; | ||
| - | } | ||
| - | } | ||
| - | return specialDays[i]; | ||
| - | } | ||
| - | function isInWorkingHour(workTime) { | ||
| - | return currWorkTimeMins <= workTime.endTime && currWorkTimeMins >= workTime.startTime; | ||
| - | } | ||
| - | function isOperatingHour() { | ||
| - | var isOperatingHour= false; | ||
| - | if (!isOnHoliday()) { | ||
| - | var specialDate = isOnSpecialDay(); | ||
| - | if (specialDate) { | ||
| - | isOperatingHour = isInWorkingHour(specialDate.workTime); | ||
| - | else { | ||
| - | for (var i=0; i < routineDays.length; | ||
| - | if (routineDays[i].day == currDay) { | ||
| - | isOperatingHour = isInWorkingHour(routineDays[i].workTime); | ||
| - | break;}} | ||
| - | if (routineDays.length == 0){isOperatingHour = true; }} | ||
| - | } | ||
| - | return isOperatingHour | ||
| - | } | ||
| - | function onLoadInit() { | ||
| - | var displayChatForm= true; | ||
| - | /* Ignore Chat Schedule if moment timezone library is not available*/ | ||
| - | if (window.moment) { | ||
| - | displayChatForm = isOperatingHour(); | ||
| - | } | ||
| - | if(displayChatForm) { | ||
| - | document.getElementById(" | ||
| - | } | ||
| - | else { | ||
| - | document.getElementById(" | ||
| - | } | ||
| - | } | ||
| - | </ | ||
| - | </ | ||
| - | <body onload=" | ||
| - | <div id=" | ||
| - | <form action=" | ||
| - | <style type=" | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | < | ||
| - | <select name=" | ||
| - | <option value=" | ||
| - | </ | ||
| - | <input type=" | ||
| - | <input type=" | ||
| - | <input type=" | ||
| - | <!-- The following optional, hidden fields are available in order to customize the Customer Chat user interface. | ||
| - | Unlike other extension fields, these are not added to the social contact, and therefore do not display in the Agent Chat user interface.--> | ||
| - | <input type=" | ||
| - | <input type=" | ||
| - | <input type=" | ||
| - | <input type=" | ||
| - | <input type=" | ||
| - | </ | ||
| - | </ | ||
| - | <div id=" | ||
| - | <h2> Sorry, we are not available at the moment. </h2> | ||
| - | </ | ||
| - | </ | ||
| - | </ | ||
| - | ===Bubble Chat Code=== | ||
| - | < | ||
| - | <!-- Add this script tag without any modification to the target webpage --> | ||
| - | <script type=" | ||
| - | var ciscoBubbleChat = (function () { | ||
| - | var smHost = ' | ||
| - | var widgetId = ' | ||
| - | |||
| - | var appId = ' | ||
| - | var secure = ' | ||
| - | var appMargin = 10; | ||
| - | var messageEventListener = undefined; | ||
| - | return { | ||
| - | showChatWindow: | ||
| - | var logPrefix = ' | ||
| - | if (document.getElementById(appId)) { | ||
| - | console.log(logPrefix + 'Not loading BubbleChat as it is already loaded' | ||
| - | return; | ||
| - | } | ||
| - | var iframe = document.createElement(' | ||
| - | iframe.setAttribute(' | ||
| - | iframe.setAttribute(' | ||
| - | iframe.setAttribute(' | ||
| - | var appUrl = ' | ||
| - | iframe.setAttribute(' | ||
| - | document.body.appendChild(iframe); | ||
| - | document.getElementById(appId).style.visibility = ' | ||
| - | if(!messageEventListener) { | ||
| - | messageEventListener = function (event) { | ||
| - | console.log(logPrefix + ' | ||
| - | if (event.origin.indexOf(smHost) >= 0) { | ||
| - | console.log(logPrefix + ' | ||
| - | if (event.data.messageType === ' | ||
| - | document.getElementById(appId).height = event.data.height + appMargin; | ||
| - | console.log(logPrefix + ' | ||
| - | } else if (event.data.messageType === ' | ||
| - | document.body.removeChild(document.getElementById(appId)); | ||
| - | window.removeEventListener(' | ||
| - | console.log(logPrefix + ' | ||
| - | } | ||
| - | } | ||
| - | }; | ||
| - | } | ||
| - | window.addEventListener(' | ||
| - | console.log(logPrefix + 'Event listener for message added' | ||
| - | } | ||
| - | }; | ||
| - | })(); | ||
| - | </ | ||
| - | |||
| - | <!-- Use the function ' | ||
| - | <!-- eg: <button onclick=" | ||
| - | </ | ||