Hi Andrew
Thanks for your reply. I tried to achieve my goals using the way you described but I failed in doing so. Maybe I'm doing things wrong so that's why I have to ask back a few more things.
I have created a new custom command just to check if things are invoked (I think it is not necessary at the end, is it?) and added it to the command chain like this:
commandManager.InsertCommandToChainOfCommandBefore("MediaEmailCreateNewOutboundEmail", "Create", new List<CommandActivator>()
{
new CommandActivator() { CommandType = typeof(BeforeOutgoingMailCommand), Name = "BeforeOutgoingMail" }
});
When I invoke the command chain named MediaEmailCreateNewOutboundEmail, the command is called, but no outgoing mail window is shown then. I tried to provide the necessary parameters but maybe there is my mistake somewhere.
string interactionId = "Id000"; // This parameter is provided later through the external interface
string email = "test@email.com"; // This parameter should come from the contact in UCS with contactId provided later through the external interface
ICommandManager commandManager = Container.Resolve<ICommandManager>();
IMediaOpenMedia mediaOpenMedia = Container.Resolve<IMediaOpenMedia>(); // What needs to be set here as the object seems to be new?
IDictionary<string, object> parameters = new Dictionary<string, object>();
parameters.Add("CommandParameter", mediaOpenMedia);
parameters.Add("ParentInteractionId", interactionId);
parameters.Add("InitialEmail", email);
commandManager.GetChainOfCommandByName("MediaEmailCreateNewOutboundEmail").Execute(parameters);
What am I doing wrong?