PureEngage On-Premises

 View Only

Sign Up

  • 1.  Customize InteractionChatAcceptChat chain of Command in IWS

    Posted 04-02-2015 09:49
    Hi All,
     
    I need to add a command to the chain « InteractionChatAcceptChat” using C# and IWS ExtensionSample module.
     
    I add the following code to ExtensionSampleModule.cs/ initialize()
                commandManager.CommandsByName["InteractionChatAcceptChat "].Insert(1,
                    new CommandActivator() { CommandType = typeof(AfterAnswerChatCommand) });
               
    The issue is that I have the following error all the time “The given key was not present in the dictionary”
     
    Did I miss something?
    In the project reference, I add Genesyslab.Desktop.Modules.OpenMedia.dll, Genesyslab.Enterprise.Services.Multimedia.dll and Genesyslab.Platform.OpenMedia.Protocols.dll.
     
    Best regards
     


  • 2.  RE: Customize InteractionChatAcceptChat chain of Command in IWS

    Posted 04-07-2015 00:50
    Hi Abdelhaq,

    Try adding the command a different way.

    First, I found the command chain you are talking about on the doc site here: 
    http://docs.genesys.com/Documentation/IW/8.1.4/Developer/Chat

    According to the docs there is 1 command in that chain named "Accept".  You will have to decide if you want to add your custom command before or after the Accept command.  To add, do this:
     
    commandManager.InsertCommandToChainOfCommandBefore("InteractionChatAcceptChat", "Accept",
    
    new List<CommandActivator>() {
    new CommandActivator() 
    { 
    CommandType = typeof(YourCustomCommandClassName), Name = "SomeNameYouChoose" 
    }});
    The above code would register your command to run before the Accept command.

    Additionally, something I found confusing at first was if you return true the command chain halts and it is similar to saying, "this command failed, stop the chain".  If you return false, this represents, "the command completed, move on to the next command in the chain".

    Regards,
    Andrew