01-25-2018 07:50 AM
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
01-25-2018 12:55 PM
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
01-25-2018 11:44 PM
Ok, let me explain it:
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?
01-26-2018 12:27 PM
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
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