cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1290
Views
0
Helpful
14
Replies

screen pop gadget incoming call vs answer

jdickinson
Level 5
Level 5

I noticed that the screen pop will trigger on incoming call. Is there a way to trigger when rep actually answers the call?

1 Accepted Solution

Accepted Solutions

dekwan
Cisco Employee
Cisco Employee

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

View solution in original post

14 Replies 14

dekwan
Cisco Employee
Cisco Employee

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

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();

    },

ok I think I found it! face plant

how do I get the state of the agent? user.getUserState is just READY

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.

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

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>'

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.

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.

The dialog is the one that you from the function parameter.

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);

Hi Joe,

I suggest that you open a Developer support ticket ( Cisco DevNet: DevNet Developer Support ) to get 1 on 1 help.

Thanx,

Denise

You know, you could have just said, dialog.getState() would give me the data I need.

LOL