Hello Dean,
What I have done for this:
- First, register to interactionEvent:
IInteractionManager itm = container.Resolve<IInteractionManager>(); itm.InteractionEvent += new EventHandler<EventArgs<IInteraction>>(InteractionEvent); - Then, in
InteractionEvent, looking for Ended state:
private void NewInteractionEvent(object sender, EventArgs<IInteraction> e)
{
IInteraction eventInteraction = e.Value;
if (eventInteraction.State.ToString().Equals("Ended"))
{
...
}
}
- Looking for ack message:
string sMEDIA = eventInteraction.EntrepriseInteractionCurrent.IdType.MediaType.ToString();
IMessage mess = eventInteraction.EntrepriseLastInteractionEvent;
if (mess != null && mess.Id == EventAck.MessageId)
{
if (sMEDIA.Equals("Multimedia"))
{
...
}
}
- Here there is 4 states possible:
The email has been sent
The email has been canceled (outbound)
The email has been placed in Draft
The email has been moved back to Queue/Workbin
For all of the states above, I stored lastaction made in my module so I know which one is occuring on this interaction
Hope it helps
------------------------------
Charles-Henri Vannimenus
CERITEK
------------------------------