PureEngage On-Premises

 View Only

Sign Up

  • 1.  How to create a custom module for Voice and Chat (WDE)

    Posted 10-02-2015 09:02
    Hi,
    it's my first post and I hope that anyone can help me :)
    I've tryed to customize the Chat and Voice events with the PSDK .NET and developed two different modules to handle this events.
    It's possible to create an unique module for two different chains of commands?
    Another problem is that when arrive the chat events and I accept the interaction through the WDE, this interaction will caught only from Voice module. Where I go wrong?

    Thank You
    Laura


  • 2.  RE: How to create a custom module for Voice and Chat (WDE)

    Posted 10-02-2015 11:39
    Without posting the related fragment of your code, it is not possible to help you. But, all seem like some incorrect part within code. Try to follow the available samples and documentation.


  • 3.  RE: How to create a custom module for Voice and Chat (WDE)

    Posted 10-02-2015 12:16
    Thanks for your response Jakub :)

    In the module.cs:
    ...
    public void Initialize()
    {
      ....
      commandManager.InsertCommandToChainOfCommandBefore("InteractionVoiceAnswerCall","AnswerCall",new List<CommandActivator>() { new CommandActivator() { CommandType = typeof(InteractionVoiceAnswerCallCommand), Name = "AnswerCall" } });

    ....
    }

    In the CustomCommand.cs:
    ...
    public bool Execute(IDictionary<string, object> parameters, IProgressUpdater progress)
            {
                // To go to the main thread
                if (Application.Current.Dispatcher != null && !Application.Current.Dispatcher.CheckAccess())
                {
                    object result = Application.Current.Dispatcher.Invoke(DispatcherPriority.Send, new ExecuteDelegate(Execute), parameters, progress);
                    return (bool)result;
                }
                else
                {
                    // Ok, we are in the main thread
                    log.Info("Execute");
                    try
                    {
                        
                        IInteractionVoice interactionVoice = parameters["CommandParameter"] as IInteractionVoice;
                      
         ...
         //Take URLWS from attached data
         ....
         
                        Process.Start("iexplore.exe", URLWS);

                    }
                    catch (Exception ex)
                    {
                        mess = ex.Message;
                        MessageBox.Show("errore" + mess);
                    }
                    finally
                    {
                       
                    }
                    return false;
                }
            }

    This works fine for the Voice, but when I accept a chat, the interaction have the same behaviour of the Voice. Why?


  • 4.  RE: How to create a custom module for Voice and Chat (WDE)

    Posted 10-02-2015 12:53
    Your code seems to be properly. If this fragment of code is called for chat interaction as well, try to check the logs of IWS (on debug level) what sequence of commands are fired during the incoming chat (or post the logs) In other hand, try to check the RN for IWS/WDE to make sure that is not a known bug.


  • 5.  RE: How to create a custom module for Voice and Chat (WDE)

    Posted 10-09-2015 07:23
    Hi,
    if you would like to use this code for non voice interaction try to change IInteractionVoice => IInteraction. of course for chat you have to register this command into different chain.

    IInteraction interaction = parameters["CommandParameter"] as IInteraction;

    best regards
    R