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
------------------------------
Original Message:
Sent: 09-29-2019 15:17
From: Dean Smith
Subject: Email Interaction Event Handling in WDE using the SDK
Hi all, I am trying to find a way to execute a function when an email interaction has been completed, the scenario is, the agent accepts an inbound email and then replies to the customer. I would like to execute some code immediately after the agent has replied to put the agent into a custom not ready state but I can't see any event to listen for, is there an interaction event to capture or should I be monitoring the state of the Email Media to capture the point when the interaction is completed e.g. the agent replied or transferred the email? As far as I can see when an email arrives at the agent they get an interaction InteractionInboundEmail with event EventInvite, followed by EventAct, but I can't see any events to say that the agent replied or transferred the email?
#Integrations
#Omni-ChannelDesktop/UserInterface
------------------------------
Dean Smith
------------------------------