Hello,
I haven't done a WDE customization for a while, and I didn't play/use the E-Mail chain of commands. But maybe the following info will help.
1) Chain of command to try
As you mention triggering a WebService when the agent accepts a new e-mail, you could possibly try with the ToasterInteractionEmailAccept chain of commands.
Here:
https://docs.genesys.com/Documentation/IW/8.5.1/Developer/Windows#scrollNav-5One advise though, make sure to make your WebService call non-blocking (async I mean). It is never good to block WDE execution (specifically when it is accepting/answering an interaction).
2) Logs
You probably know that already. But usually, when I try to figure out what WDE is doing exactly (what chain of commands it is calling in a specific scenario), I enable WDE logs and check there. The name of the chain of commands it invokes will appear in the logs.
WDE log options:
https://docs.genesys.com/Documentation/IW/latest/Dep/LogOptionsThere is also one for ESDK not listed in the link above:
https://docs.genesys.com/Documentation/Options/Current/IW/WDE-interaction-workspace#log-ESDKI think log.verbose set to all should be enough for the chain of commands. Possibly log.ESDK as well if you don't see them.
3) Customizing commands
When you add views or commands, it is better to wait for WDE to fully initialize.
Voice module is called almost immediately.
But when you have a lot of additional modules (Email, chat, .... and custom ones), and when you try to add/modify a view or a command in these modules, it is better to wait for full "login" so that you are sure the modules have been loaded by WDE.
I had written an article on this a while ago - with sample code to explain what I mean.
See here:
https://developer.genesys.com/workspace-desktop-edition-proper-time-to-add-views-and-commands-in-a-plugin/4) Another option
Another way to achieve what you are trying to do would be to leverage IInteractionManager and subscribe for events there.
IInteractionManager corresponds to WDE point of view on interactions. You will get interaction created when WDE creates one in its memory. And also Interaction related events (with media type, state/status, ...)
Regards,
------------------------------
Jerome Saint-Marc
Genesys - Employees
------------------------------
Original Message:
Sent: 07-31-2020 05:56
From: Cristobal Espinosa
Subject: Unable to insert a command in Email chain
Hello, I have to modify WDE in order to call a Web Service whenever a mail is accepted by the agent. My first step has been to insert a new command in the Email chain that accepts the e-mail. Reading the documentation Documentation:IW:Developer:E-Mails:8.5.1 - Genesys Documentation it is not very clear which chain I should use that but my first guess has been "InteractionEmailLoad", so i have created the command (AfterAnswerMailCommand) and I inserted it with this code:
commandManager.CommandsByName["InteractionEmailLoad"].Insert(0,
new CommandActivator() { CommandType = typeof(AfterAnswerMailCommand) });
But whenever I receive an e-mail, my command code is never executed. I have tried other chains like "InteractionEmailActionOnOpenedEmailById" but the result is the same. I have done similar things with voice calls succesfully so I don't understand why this is not working in this case.
#GenesysEngageDev
------------------------------
Cristobal Espinosa
Telefonica Soluciones de Informatica
------------------------------