Genesys CTI User Forum
Genesys CTI User Forum => Genesys-related Development => Topic started by: vinicius.gaspar on August 22, 2019, 02:51:14 PM
-
I need to activate the Mark Done Button in the ToolbarInteractionBarRegion after a given time. For example, if the agent doesn't click on it in 20 seconds, it must "click itself".
I already know how to handle the timer elapsed event but I can't find any solutions for the button activation.
Anyone have any ideas?
-
Try this (assuming you passed ICommandManager as argument, and assigned to commandManager):
[code]
commandManager.GetChainOfCommandByName("InteractionVoiceIfPossibleCloseInteraction").Execute();
[/code]
-
[quote author=hsujdik link=topic=11418.msg52038#msg52038 date=1566489253]
Try this (assuming you passed ICommandManager as argument, and assigned to commandManager):
[code]
commandManager.GetChainOfCommandByName("InteractionVoiceIfPossibleCloseInteraction").Execute();
[/code]
[/quote]
Thank you, @hsujdik. It quite seems what I needed but it didn't really do the trick. When I run the command the interaction related views don't close the same way as when I push the MarkDone button manually.
I also tried :
[code]
commandManager.GetChainOfCommandByName("BundleClose").Execute();
[/code]
But it didn't work as well.
-
So, in case someone is wondering, I was able to come up with a solution for the "click itself" thing. There is a keyboard shortcut for pressing the MarkDone button, it's CTRL + E.
I found this NuGet package called InputSimulator v1.0.4 by Michael Noonan ([url=https://archive.codeplex.com/?p=inputsimulator]https://archive.codeplex.com/?p=inputsimulator[/url]). Using it I managed to simulate this shortcut programmatically.
After installing the package, first you need to add these namespaces:
[code]
using WindowsInput.Native;
using WindowsInput;
[/code]
Then, where or when you want to activate the keyboard shortcut you must insert this:
[code]
InputSimulator inputSimulator = new InputSimulator();
inputSimulator.Keyboard.ModifiedKeyStroke(VirtualKeyCode.CONTROL, VirtualKeyCode.VK_E);
[/code]
-
Nice. Thanks for sharing. As long as it works is good. Just be care to keep that mapping at WDE options
Enviado de meu SM-G9650 usando o Tapatalk
-
Command chain must be working. you don't need to use workarounds and simulate click :-)
I did it like that:
private IInteractionManager ixnManager;
ixnManager = _container.Resolve<IInteractionManager>();
//if you are in interaction view just take current interaction from case
IInteraction ixn = ixnManager.GetInteractionByEntrepriseId(interactionId);
IDictionary<string, object> parameters = new Dictionary<string, object>();
//maybe bundle will be part of case depending from which view are you using
parameters.Add("CommandParameter", ixnManager.GetBundleById(ixn.BundleId));
//execute command chain with correct parameters and it will work
container.Resolve<ICommandManager>().GetChainOfCommandByName("BundleClose").Execute(parameters);
-
[quote author=RobertH link=topic=11418.msg52157#msg52157 date=1569570913]
Command chain must be working. you don't need to use workarounds and simulate click :-)
I did it like that:
private IInteractionManager ixnManager;
ixnManager = _container.Resolve<IInteractionManager>();
//if you are in interaction view just take current interaction from case
IInteraction ixn = ixnManager.GetInteractionByEntrepriseId(interactionId);
IDictionary<string, object> parameters = new Dictionary<string, object>();
//maybe bundle will be part of case depending from which view are you using
parameters.Add("CommandParameter", ixnManager.GetBundleById(ixn.BundleId));
//execute command chain with correct parameters and it will work
container.Resolve<ICommandManager>().GetChainOfCommandByName("BundleClose").Execute(parameters);
[/quote]
Thanks for sharing! This method worked way better. :)