cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7433
Views
30
Helpful
15
Replies

Finesse Gadget HIDE button for Consult calls only

smeegada1
Spotlight
Spotlight

I have created a button to display when call is active and in agent in TALKING status but noticed button is displaying when Agent trying to Consult with other agent(since agent status is TALKING) and would need help on how to hide this button for Consults. I have tried analyzing the desktop logs and i dont see any specific user state for CONSULT to write IF condition in logic.

Any help is appreciated.

5 Accepted Solutions

Accepted Solutions

dekwan
Cisco Employee
Cisco Employee

Hi,

 

Maybe it is better for you to use the dialog event rather than the agent state. From your other post, this button is to initiate a direct transfer? But with this question, it seems like you want the button to show for all calls except consult.

 

What I would suggest is to drop the checking of the agent state and go with the dialog event. When a new dialog comes in (

handleNewDialog), check the callType (https://developer.cisco.com/docs/finesse/#!dialog-api-parameters/dialog-api-parameters for a list of possible values) to see if it is CONSULT*. Depending on the value, show or don't show the button.
 
For your failover scenario, you will have to get the existing dialogs from user.getDialogs (this method call is already in handleUserLoad). If it is > 1, check the call types of each dialog.
 
Thanx,
Denise

View solution in original post

Hi,

 


Could you please elaborate in detail if my analysis is incorrect?Instead of looking at user.getstate you are asking to use Dialog evet right?

Correct.

 

I have looked at local logs and dont exactly see 'CONSULT' in actions but do see below?Do you mean to check in that entire list in Dialog":"participants if Consult exists and disable button?If am looking at wrong place could you please help me?

 

2021-05-12T15:07:25.856 -04:00: 4D124A: May 12 2021 15:07:25.899 -0400: Header : [WorkflowEngine] Converting event to xml document. Type: Dialog Action: change Uri: /finesse/api/Dialog/33581389 Event: {"Dialog":"participants":{"Participant":[{"actions":{"action":["TRANSFER_SST","CONSULT_CALL","HOLD","UPDATE_CALL_DATA","SEND_DTMF","DROP"]}


I wasn't talking about the actions, I'm talking about the callType under mediaProperties.

 

Untitled.png

 

You can see the list of possible values here: https://developer.cisco.com/docs/finesse/#!dialog-api-parameters/dialog-api-parameters

In the gadget, you can get the mediaProperties by using dialog.getMediaProperties() [I just realized that this method isn't documented. I will open a doc bug]. From there, you can get the callType (I forgot the exact code to get this, so I suggest using the developer tools to see the DOM).

 

I hope this helps!

 

Thanx,

Denise 

 

 

View solution in original post

Hi Denise,

Do we have to move logic from callback to handleNewDialog function to get correct calltype value? Following is the order i have copied from Locallogs.In Gadget we are writing logic based on CallType=Transfer but in below scenario we are getting calltype=TRANSFER followed by PREROUTE_ACD_IN.This is 

 

May 14 2021 16:31:14.486 -0400: Header : [WorkflowEngine] Converting event to xml document. Type: Dialog Action: change Uri: /finesse/api/Dialog/67132254 Event: {"Dialog":{"associatedDialogUri":null,"fromAddress":"XXXXXX","id":"67132254","secondaryId":"2130706479","mediaProperties":{"DNIS":"XXXXXX","callType":"TRANSFER",

 

May 14 2021 16:31:14.510 -0400: Header : [WorkflowEngine] "TRANSFER" IS_IN_LIST "ACD_IN,PREROUTE_ACD_IN,PREROUTE_DIRECT_AGENT,TRANSFER,OVERFLOW_IN,OTHER_IN,AGENT_OUT,OUT,OUTBOUND,OUTBOUND_CALLBACK,OUTBOUND_PERSONAL_CALLBACK,AGENT_INSIDE,OFFERED,CONSULT,CONSULT_OFFERED,CONSULT_CONFERENCE,CONFERENCE,TASK_ROUTED_BY_ICM,TASK_ROUTED_BY_APPLICATION,VOICE_CALL_BACK,NON_ACD,SUPERVISOR_BARGE_IN,NULL" evaluates to TRUE

 

May 14 2021 16:31:14.468 -0400: UpdateCallVariableDataSampleGadget : displayCallVariables(): *callType* is: PREROUTE_ACD_IN

 

View solution in original post

Hi,

 

So in my experience debugging consult transfer/conference for solutions involving CVP, CVP does something a bit funky with the call legs, especially when the consult is to a routepoint which gets assigned to an agent. It will create 3 callIds (original + 2 for consult). This is probably what you are running into because I don't think both call legs for the consult has a callType of CONSULT.

 

When you say "active lines", do you mean the number of parties in the call? Yes. You can see how many participants are in the dialog. The only problem is that if you are consulting to a routepoint to get to an agent, there will be a small period of time (seconds) where there are three parties because it will be the consulting caller (agent1), RP, agent (agent2).

 

Thanx,

Denise

View solution in original post

Hi Denise,

I will look into CVP behavior and get back to you if needed. YES exactly am looking to see number of parties in the call, could you please help me how to get it and which method/function to use? Based on number of participants i can write logic to fix my issues?

View solution in original post

15 Replies 15

dekwan
Cisco Employee
Cisco Employee

Hi,

 

Maybe it is better for you to use the dialog event rather than the agent state. From your other post, this button is to initiate a direct transfer? But with this question, it seems like you want the button to show for all calls except consult.

 

What I would suggest is to drop the checking of the agent state and go with the dialog event. When a new dialog comes in (

handleNewDialog), check the callType (https://developer.cisco.com/docs/finesse/#!dialog-api-parameters/dialog-api-parameters for a list of possible values) to see if it is CONSULT*. Depending on the value, show or don't show the button.
 
For your failover scenario, you will have to get the existing dialogs from user.getDialogs (this method call is already in handleUserLoad). If it is > 1, check the call types of each dialog.
 
Thanx,
Denise

Hi Denise,

Could you please elaborate in detail if my analysis is incorrect?Instead of looking at user.getstate you are asking to use Dialog evet right? I have looked at local logs and dont exactly see 'CONSULT' in actions but do see below?Do you mean to check in that entire list in Dialog":"participants if Consult exists and disable button?If am looking at wrong place could you please help me?

 

2021-05-12T15:07:25.856 -04:00: 4D124A: May 12 2021 15:07:25.899 -0400: Header : [WorkflowEngine] Converting event to xml document. Type: Dialog Action: change Uri: /finesse/api/Dialog/33581389 Event: {"Dialog":"participants":{"Participant":[{"actions":{"action":["TRANSFER_SST","CONSULT_CALL","HOLD","UPDATE_CALL_DATA","SEND_DTMF","DROP"]}

 

Thank you again.

Hi,

 


Could you please elaborate in detail if my analysis is incorrect?Instead of looking at user.getstate you are asking to use Dialog evet right?

Correct.

 

I have looked at local logs and dont exactly see 'CONSULT' in actions but do see below?Do you mean to check in that entire list in Dialog":"participants if Consult exists and disable button?If am looking at wrong place could you please help me?

 

2021-05-12T15:07:25.856 -04:00: 4D124A: May 12 2021 15:07:25.899 -0400: Header : [WorkflowEngine] Converting event to xml document. Type: Dialog Action: change Uri: /finesse/api/Dialog/33581389 Event: {"Dialog":"participants":{"Participant":[{"actions":{"action":["TRANSFER_SST","CONSULT_CALL","HOLD","UPDATE_CALL_DATA","SEND_DTMF","DROP"]}


I wasn't talking about the actions, I'm talking about the callType under mediaProperties.

 

Untitled.png

 

You can see the list of possible values here: https://developer.cisco.com/docs/finesse/#!dialog-api-parameters/dialog-api-parameters

In the gadget, you can get the mediaProperties by using dialog.getMediaProperties() [I just realized that this method isn't documented. I will open a doc bug]. From there, you can get the callType (I forgot the exact code to get this, so I suggest using the developer tools to see the DOM).

 

I hope this helps!

 

Thanx,

Denise 

 

 

Hi Denise,

I appreciate all the info/help you are providing.I was able to pull the calltype value with code - var callType = callVariables["callType"]; as you mentioned above from DOM and write the logic.When Agent1 do consult with Agent2, Agent1 dialog calltype value is 'CONSULT' but on 'Agent2 dialog calltype is PREROUTE_ACD_IN and not CONSULT.Is there a way or value i can check on Agent2 to know if it is a CONSULT call?

 

Thanks,

Sreeni

Hi Denise,

Do we have to move logic from callback to handleNewDialog function to get correct calltype value? Following is the order i have copied from Locallogs.In Gadget we are writing logic based on CallType=Transfer but in below scenario we are getting calltype=TRANSFER followed by PREROUTE_ACD_IN.This is 

 

May 14 2021 16:31:14.486 -0400: Header : [WorkflowEngine] Converting event to xml document. Type: Dialog Action: change Uri: /finesse/api/Dialog/67132254 Event: {"Dialog":{"associatedDialogUri":null,"fromAddress":"XXXXXX","id":"67132254","secondaryId":"2130706479","mediaProperties":{"DNIS":"XXXXXX","callType":"TRANSFER",

 

May 14 2021 16:31:14.510 -0400: Header : [WorkflowEngine] "TRANSFER" IS_IN_LIST "ACD_IN,PREROUTE_ACD_IN,PREROUTE_DIRECT_AGENT,TRANSFER,OVERFLOW_IN,OTHER_IN,AGENT_OUT,OUT,OUTBOUND,OUTBOUND_CALLBACK,OUTBOUND_PERSONAL_CALLBACK,AGENT_INSIDE,OFFERED,CONSULT,CONSULT_OFFERED,CONSULT_CONFERENCE,CONFERENCE,TASK_ROUTED_BY_ICM,TASK_ROUTED_BY_APPLICATION,VOICE_CALL_BACK,NON_ACD,SUPERVISOR_BARGE_IN,NULL" evaluates to TRUE

 

May 14 2021 16:31:14.468 -0400: UpdateCallVariableDataSampleGadget : displayCallVariables(): *callType* is: PREROUTE_ACD_IN

 

Hi Denise,

Do we have to move logic from callback to handleNewDialog function to get correct calltype value? Following is the order i have copied from Locallogs.In Gadget we are writing logic based on CallType=Transfer but in below scenario we are getting calltype=TRANSFER followed by PREROUTE_ACD_IN.This is 

 

May 14 2021 16:31:14.486 -0400: Header : [WorkflowEngine] Converting event to xml document. Type: Dialog Action: change Uri: /finesse/api/Dialog/67132254 Event: {"Dialog":{"associatedDialogUri":null,"fromAddress":"XXXXXX","id":"67132254","secondaryId":"2130706479","mediaProperties":{"DNIS":"XXXXXX","callType":"TRANSFER",

 

May 14 2021 16:31:14.510 -0400: Header : [WorkflowEngine] "TRANSFER" IS_IN_LIST "ACD_IN,PREROUTE_ACD_IN,PREROUTE_DIRECT_AGENT,TRANSFER,OVERFLOW_IN,OTHER_IN,AGENT_OUT,OUT,OUTBOUND,OUTBOUND_CALLBACK,OUTBOUND_PERSONAL_CALLBACK,AGENT_INSIDE,OFFERED,CONSULT,CONSULT_OFFERED,CONSULT_CONFERENCE,CONFERENCE,TASK_ROUTED_BY_ICM,TASK_ROUTED_BY_APPLICATION,VOICE_CALL_BACK,NON_ACD,SUPERVISOR_BARGE_IN,NULL" evaluates to TRUE

 

May 14 2021 16:31:14.468 -0400: UpdateCallVariableDataSampleGadget : displayCallVariables(): *callType* is: PREROUTE_ACD_IN

Hi,

 

Where is your logic for checking the callType? It should be in the handleNewDialog callback.

 

As far as Agent2 getting PREROUTE_ACD_IN as the callType, what type of system is this? CCE or CCX? If it is CCE, is CVP involved? I tried this on a CCX 12.5 system and both agents got CONSULT as the calltype, even when agent1 called the RP to get to agent2.

 

One option that you can try is to see if a "secondaryId" value exists. This is usually populated in a transfer/conference scenario. I am not sure if this logic would work 100% of the scenarios though (might not work for some corner cases?).

 

Thanx,

Denise

Hi Denise,

My logic is inside displayCallVariables function. We are on UCCE 11.6 and yes CVP is involved.

 

handleNewDialog = function (dialog) {
if (isUCDAllowableAction(dialog)) {
currentDialog = dialog;
displayCallVariables(currentDialog);
}

dialog.addHandler('change', _processCall);},

 

Is there a way to check number of active lines?I mean in case of conference of 3(Caller,Agent1,Agent2);Consult 2(Agent1/Agent2);Normal call 1(Agent/caller) in any of existing functions?

 

To be clear - I am looking to find which Participant in conference - Caller or Agent1 or Agent2 dropped/Disconnected and who else is on call?

Hi,

 

So in my experience debugging consult transfer/conference for solutions involving CVP, CVP does something a bit funky with the call legs, especially when the consult is to a routepoint which gets assigned to an agent. It will create 3 callIds (original + 2 for consult). This is probably what you are running into because I don't think both call legs for the consult has a callType of CONSULT.

 

When you say "active lines", do you mean the number of parties in the call? Yes. You can see how many participants are in the dialog. The only problem is that if you are consulting to a routepoint to get to an agent, there will be a small period of time (seconds) where there are three parties because it will be the consulting caller (agent1), RP, agent (agent2).

 

Thanx,

Denise

Hi Denise,

I will look into CVP behavior and get back to you if needed. YES exactly am looking to see number of parties in the call, could you please help me how to get it and which method/function to use? Based on number of participants i can write logic to fix my issues?

See below. We keep on crossing paths

dekwan
Cisco Employee
Cisco Employee

Hi,

 

Looks like we crossed paths with the edit to your post.

 

I was trying to find the method to get the participants but it seems like we are missing a handful of methods for the dialog in our documentation. I will add this to the pending doc bug that I need to open. The Finesse team had converted the old JavaDoc to the current format in order to explain the different methods better but seems like some methods were accidentally forgotten. You can find the old JavaDoc version here: https://developer.cisco.com/docs/finesse/#!previous-documentation-pdfs/finesse-javascript-library-documentation

 

For the participants, you can do dialog.getParticipants() which will return an Array list of participants.

 

Thanx,

Denise

 

 

 

 

 

Hi Denise,

Based on our testing, getParticipants is returning the participants state but only when agent2 is disconnect/Direct Transfer call and before going to WRAP_UP only.No update event from when Agent1 dropped off from Call until Agent2 take actions. Following are the details.

- 1:33PM - Customer called Agent1

- 1:33PM - Agent1 initiate Consult with Agent2

-1:34PM - Agent2 received call and Answered

-1:35PM - Agent1 click conference and all 3 parties in call

-1:36PM - Agent1 drop off from Conference call and only Agent2 and caller are active

-1:37PM - Agent2 dropped call and went to WRAP_UP

 

Finesse Logs on AGENT2 machine:-

No log events on Agent2 Finesse logs from 1:34PM to 1:37PM

 

Log snippet:0-

 

2021-05-17T13:34:51.384 -04:00: BFB446: : May 17 2021 13:34:51.411 -0400: Header : Client: 2021-05-17T17:34:51.372Z, Server: 2021-05-17T17:34:51.399Z, Drift: 27ms, Network Latency (round trip): 24ms
2021-05-17T13:35:51.395 -04:00: BFB446: : May 17 2021 13:35:51.425 -0400: Header : Client: 2021-05-17T17:35:51.377Z, Server: 2021-05-17T17:35:51.407Z, Drift: 30ms, Network Latency (round trip): 35ms
2021-05-17T13:36:51.394 -04:00: BFB446:: May 17 2021 13:36:51.423 -0400: Header : Client: 2021-05-17T17:36:51.380Z, Server: 2021-05-17T17:36:51.409Z, Drift: 29ms, Network Latency (round trip): 26ms
2021-05-17T13:37:12.835 -04:00: BFB446:: May 17 2021 13:37:12.864 -0400: Header : [ClientServices] MasterPublisher._parseAndPublishXMLEvent() - Received XML event on node '/finesse/api/User/133740/Dialogs': <Update><data><dialog>

 

Do we have to move this logic check to different function to get realtime call/data?Currently my logic in displayCallVariables function.

 

handleNewDialog = function (dialog) {
if (isUCDAllowableAction(dialog)) {
currentDialog = dialog;
displayCallVariables(currentDialog);
}

dialog.addHandler('change', _processCall);},

 

Thanks,

Sreeni

 

 

Hi,

 

handleNewDialog only gets triggered once, when there is a new dialog for the agent. When the participants change throughout the life of the call, this method will not be triggered. You need to move your logic to the appropriate handler. As you can see in the code you pasted, the _processCall handler will be triggered whenever there is a change to the dialog.

 

Unfortunately, I can't give you a direct/specific answer without seeing your whole code. If you would like me to take a deeper look into your code, you will need to open/purchase a case-based ticket: https://developer.cisco.com/site/support/

 

Thanx,

Denise

Thanx,

Denise