06-18-2015 03:25 PM
I am trying to make a gadget where a new window/tab will show up with every incoming call. The new window is our CRM application and it is being prepopulated based on a call id from the Call Variables.
I had installed the Screen Pop sample on our 9.1.1 Finesse and was unable to get the iframe to show up. It simply says "Screen Pop goes here", meaning the render function was called, but the numdialog counter never incremented.
I made some modifications and I notice that I can reliably detect the end of a call. But detecting the start of the call has been unsuccessful.
Anything obvious I am missing? Has the Dialog object significantly changed between versions?
render = function () {
var currentState = user.getState();
var html = '';
html += '<div>';
if (numDialogs==1) {// Replaced with URL and Query String to our CRM
window.open(www.bing.com);
gadgets.window.adjustHeight();
}
else {clientLogs.log("No call detected");
gadgets.window.adjustHeight();
}
},
_processCall = function (dialog) {
// if here then callvar1 didnt show up on initial dialog
// get the latest callvariables
callvars = dialog.getMediaProperties();
clientLogs.log("_processCall:cv1="+callvars["callVariable1"]);
render();
},
/**
* Handler for additions to the Dialogs collection object. This will occur when a new
* Dialog is created on the Finesse server for this user.
*/
handleNewDialog = function(dialog) {
// increment the number of dialogs
numDialogs++;
// get the call variable data from the dialog
// dialog.getMediaProperties() returns an array of properties
callvars = dialog.getMediaProperties();
clientLogs.log("handleNewDialog:cv1="+callvars["callVariable1"]);
// if callVariable1 is null then add a handler for subsequent dialog events
// where the call data will have been updated
if (callvars["callVariable1"] == null )
{
dialog.addHandler('change', _processCall);
}
else
{
// render the html in the gadget
clientLogs.log("rendering dialog");
render();
}
},
Solved! Go to Solution.
06-19-2015 10:27 AM
If you could try this first. Sometimes the prefix HTTP, or HTTPS, simply needs to be changed to //
So, //myCRM.com
Also, some websites don't allow themselves to be loaded into an IFRAME. And, that's what's happening here with the screen pop. If you could test a simple HTML page, outside of Finesse, and see if you could load your CRM into an IFRAME. For example Google.com will not work with a screenpop, as Google does not allow its site to be loaded into an IFRAME.
If these two ideas don't help, then let's get into the code.
Thanks!
06-19-2015 10:27 AM
If you could try this first. Sometimes the prefix HTTP, or HTTPS, simply needs to be changed to //
So, //myCRM.com
Also, some websites don't allow themselves to be loaded into an IFRAME. And, that's what's happening here with the screen pop. If you could test a simple HTML page, outside of Finesse, and see if you could load your CRM into an IFRAME. For example Google.com will not work with a screenpop, as Google does not allow its site to be loaded into an IFRAME.
If these two ideas don't help, then let's get into the code.
Thanks!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide