Genesys Engage on-premises

 View Only

Discussion Thread View
  • 1.  Email Interaction Event Handling in WDE using the SDK

    Posted 09-29-2019 15:18
    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

    ------------------------------


  • 2.  RE: Email Interaction Event Handling in WDE using the SDK

    Posted 10-01-2019 03:16
    Hi Dean,

    Not That I've done so, but would it not be best to insert your command to make them not ready at the end of the "InteractionEmailReply" chain of command rather tahn listening for an event?
    https://docs.genesys.com/Documentation/IW/8.5.1/Developer/UseCustomizableCommands#Inserting_a_Command_in_a_Chain
    https://docs.genesys.com/Documentation/IW/latest/Developer/E-Mails

    ------------------------------
    Jason McLennan
    Commonwealth Bank of Australia
    ------------------------------



  • 3.  RE: Email Interaction Event Handling in WDE using the SDK

    Posted 10-02-2019 03:55
    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
    ------------------------------



  • 4.  RE: Email Interaction Event Handling in WDE using the SDK

    Posted 10-03-2019 06:24
    Thanks Charles-Henri that's very useful, I will give that a try.

    ------------------------------
    Dean Smith
    Connect Managed Services
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources