Genesys Engage on-premises

 View Only


Discussion Thread View
  • 1.  WDE not able to capture a "command" when call is wrapped

    Posted 12-03-2020 04:48
    Edited by Tiago Silva 12-03-2020 09:35
    Hi community,

    hope everyone is safe.
    We need some help please, as we are trying to amend WDE customisations we already have, but this time to trigger an action on the CRM whenever an agent "wraps an interaction" using WDE (i.e. selecting a valid wrap code). We would like to use a "command" to trigger an action send by WDE to a CRM in order to DELETE an ITX Id  (it's not an "event" as we are already using those to trigger other actions, and wrapping a call does not trigger any event from WDE, but a "command" instead - as it is not intended to reach to Tserver).
    We would like to use the capability in the following scenario: If an agent selects a valid wrap code, and marks done we send a "DELETE interaction" to the CRM, otherwise if they just mark DONE, we won't send the DELETE (as wrap code is null or unselected).

    Anyone can share a list of possible commands we can use? (this is coming from a "IViewEventManager" interface, part of
    Genesyslab.Desktop.Modules.Windows.Event) more info on:
    Thank you in advance


    #GenesysEngageDev
    #Integrations
    #CustomPSApplications
    #InteractionWorkspace
    ------------------------------
    Tiago Silva
    Conn3ct
    ------------------------------​​


  • 2.  RE: WDE not able to capture a "command" when call is wrapped
    Best Answer

    GENESYS
    Posted 12-07-2020 04:52
    Edited by Tiago Silva 12-10-2020 04:32
    Hi Tiago,

    You should be able to implement an InteractionClosed EventHandler for the InteractonManager object.
    You get the InteractionClosed event when the Interaction has been Marked Done.


    public CustomModule(IUnityContainer container, IConfigManager configManager, IAgent agent, IViewEventManager viewEventManager, IInteractionManager interactionManager, ILogger log, IConfigurationService configService)
    {
    ...
    this.interactionManager = interactionManager;
    ...
    interactionManager.InteractionCreated += interactionManager_InteractionCreated;
    interactionManager.InteractionEvent += InteractionManager_InteractionEvent;
    interactionManager.InteractionClosed += interactionManager_InteractionClosed;
    ....
    ....


    In the handler code check to see if there is a KVP for the DispostionCode in the AttachedData, if there is you send your delete message to the CRM..

    private void interactionManager_InteractionClosed(object sender, EventArgs<IInteraction> e)
    {
    String dispCodeKeyName = configManager.GetValueAsString("interaction.disposition.key-name", "DispositionCode");
    IInteraction interaction = e.Value;
    log.Debug($"Interaction Closed: {interaction.InteractionId}" );
    Genesyslab.Enterprise.Commons.Collections.KeyValueCollection ad = interaction.GetAllAttachedData();
    if (!string.IsNullOrEmpty(dispCodeKeyName) && ad.ContainsKey(dispCodeKeyName))
    {
    String value = ad.GetAsString(dispCodeKeyName);
    if (!string.IsNullOrEmpty(value))
    {
    log.Debug($"Send DELETE to CRM. WrapCode '{value}'. InteractionId: {interaction.InteractionId}");
    }
    }

    }

    ------------------------------
    Pete Hoyle
    Genesys - Employees
    ------------------------------



  • 3.  RE: WDE not able to capture a "command" when call is wrapped

    Posted 12-10-2020 04:32
    Edited by Tiago Silva 12-10-2020 04:32
    Hi Pete,

    first of all thanks very much for the details shared, I've passed these to the developers immediately and they have indeed tested. It works! :)
    Thank you for your brilliant inputs, we are fixing an outstanding issue for the and we will handover for customer testing as soon as we finish our system integration testing.

    Cheers again Pete, much appreciated!

    Kind Regards,

    ------------------------------
    Tiago Silva
    Conn3ct
    ------------------------------



Need Help finding something?

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