cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
713
Views
1
Helpful
3
Replies

Get the active dialog on a collection

Zapa
Level 1
Level 1

Hello,

I'm pretty new to Finesse (and to Javascript) development.

I'm developing a quite simple gadget (based on the LearningSampleGadget Tutorial), in order to make a direct transfer to a number.

It seem to be working, but in the case that user have received a call, make a consult call and press the button of the gadget, no transfer is done.

It looks like if the system doesn't know which of the calls should transfer (the held or the active).

How do I assign the active dialog of both to my actualdialog variable that will call the method initiateDirectTransfer()?


Thanks in advance

3 Replies 3

dekwan
Cisco Employee
Cisco Employee

Hi Alberto,

I don't think I understand your scenario completely. Is this correct?

The agent:

1. Has a call (call#1) and wants to do a direct transfer

2. Gets a new call (call#2)

3. Starts a consult on call#2

4. Clicks the direct transfer button in your gadget

In #4, which call are you expecting to transfer? call#1 or call#2?

How do I assign the active dialog of both to my actualdialog variable that will call the method initiateDirectTransfer()?

In your gadget, have to keep track of which call id is the active one. So when you get a new call in handleNewDialog, you know that callId is the active one. Also, in the _processCall when the call gets updated, you have to see if the participant's state is ACTIVE. This would handle the scenario for calls getting put on hold. Lastly, this variable must be cleared when the call ends. There is probably a little bit more to it than the above, but hopefully you get the gist.

Thanx,

Denise

Ok, let me explain it:

  • - The agent receives an ACD-IN call (call#1)
  • - The agent starts a consult call (call#2)
  • - Agent press the in-development gadget button in order to transfer the call to a fixed number
    •           It's indifferent if the agent press the button with call#1 on hold or call#2 on hold
  • No call is transferred, both calls continues on the agent

I think that the problem is that, using the method Dialog.initiateDirectTransfer(), it doesn't know which of the dialogs on the Dialog Collection on the agents should be transferred.

So, I'm thinking on how to get which is the active dialog (in the whole collection) in order to call the method <active dialog>.initiateDirectTransfer().

Am I right with this approaching?

dekwan
Cisco Employee
Cisco Employee

Hi Alberto,

Thanks for the clarification. I would like to confirm your suspicions that you need to use <active dialog>.initiateDirectTransfer() instead of Dialog.initiateDirectTransfer. But, I would like to tell you that a direct transfer does not need you to start the consult, it already does it for you. So, when the agent gets call#1, your gadget should be calling the initiateDirectTransfer on THAT call and it will transfer. If you do it this way, you won't need to know which call is active since you will only have one call.

Thanx,

Denise