03-24-2017 07:49 AM
I noticed that the screen pop will trigger on incoming call. Is there a way to trigger when rep actually answers the call?
Solved! Go to Solution.
03-24-2017 10:10 AM
Hi Joe,
Yes. When the agent answers the call, the state of the dialog for that extension changes to ACTIVE. So, you need to move your logic for the screen pop to the method when the dialog is updated (_processCall), specifically when the state for that agent changes to ACTIVE (in an if statement).
Thanx,
Denise
03-24-2017 10:10 AM
Hi Joe,
Yes. When the agent answers the call, the state of the dialog for that extension changes to ACTIVE. So, you need to move your logic for the screen pop to the method when the dialog is updated (_processCall), specifically when the state for that agent changes to ACTIVE (in an if statement).
Thanx,
Denise
03-24-2017 11:51 AM
I have this in the gadget:
It doesn't appear that "process call" ever gets logged.
_processCall = function (dialog) {
// if here then callvar1 didnt show up on initial dialog
// get the latest callvariables
var html = '<div>';
html += '<iframe src="https://uccx-001-app-prod.statebridgecompany.com:8445/3rdpartygadget/files/release/?LoanID=' + ulid + userparam + '" width="100%" height="650"> </iframe>';
html += '</div>';
//callvars = dialog.getMediaProperties();
//for (var key in callvars) {
// clientLogs.log("key " + key + " has value " + callvars[key]);
//}
$('#agentout').html(html);
gadgets.window.adjustHeight();
callstatus = "answer";
console.log("process call:" + mode);
render();
},
03-24-2017 11:53 AM
ok I think I found it! face plant
03-24-2017 12:00 PM
how do I get the state of the agent? user.getUserState is just READY
03-24-2017 12:43 PM
user.getState() gets you the current state of the agent.
03-24-2017 02:12 PM
This really isn't working. Can you make a sample gadget that works for when the agent clicks answer on the call control gadget that the screen pops into the gadgetURL.
All the combinations that I have tried do nothing when the agent answers the call.
03-24-2017 02:33 PM
Unfortunately we do not create custom gadgets. If you want to have 1 on 1 debugging to figure out your problem, you can open/purchase a support ticket here: https://developer.cisco.com/site/devnet/support/
If you do an analysis on what changes in the dialog when the agent clicks answer, you will understand when you need to trigger the code to do the screen pop. As I already mentioned earlier, the participant state for the agent changes to ACTIVE.
Thanx,
Denise
03-24-2017 02:49 PM
Ok, so we agree that agent state and participant state are different sets of codes.
I can get the agent state:
user.getState(); is there a participant.getState()?
html += '<div>Testing</div>';
html += '<div> num dialogs: ' + numDialogs + '</div>';
html += '<div> num countOfHandle: ' + countOfHandle + '</div>';
html += '<div>pstate: ' + JSON.stringify(pstate) + '</div>';
html += '<div>checkstate: ' + checkstate + '</div>';
html += '<div>call status: ' + callstatus + '</div>';
html += '<div> agent state: ' + user.getState(); + '</div>'
03-24-2017 02:53 PM
Here is the JavaScript doc: https://developer.cisco.com/site/finesse/docs/guides/javascript-library/
Since the participant state can be found in the dialog, you should look at the dialog jsdoc: JsDoc Reference - finesse.restservices.Dialog If you scroll down, you will see "getparticipants" and in there, there would be the state.
03-27-2017 08:28 AM
Hi, when I call these functions. the result is undefined.
var diag = finesse.restservices.Dialog;
console.log("darth 2");
var participants = diag.getParticipants();
The result is always undefined.
03-27-2017 09:27 AM
The dialog is the one that you from the function parameter.
03-27-2017 09:34 AM
That's not even a sentence.
What is the function that get's me the status of the participants.
And what addHandler do I call to event those changes?
When I go from ready to not ready, this processCall function is not called.
I need to capture state transitions on ParticipantStates and Ready/Not_Ready states.
The below is only called for when a call is in queue.
dialog.addHandler('change', _processCall);
03-27-2017 09:38 AM
Hi Joe,
I suggest that you open a Developer support ticket ( Cisco DevNet: DevNet Developer Support ) to get 1 on 1 help.
Thanx,
Denise
03-27-2017 04:59 PM
You know, you could have just said, dialog.getState() would give me the data I need.
LOL
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