Author Topic: How to complete interaction automatically from WDE when chat ixn disconnects?  (Read 2685 times)

Offline bilge

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Hi All,

We need to complete the chat interaction using SDK automatically when it disconnects, since the call is not ended if agent does not hit the Mark Done button. Agents use WDE 8.5 and we develop our custom codes on Platform SDK 8.5.

I guess, we need to call BundleClose command when the chat interaction is disconnected, however this command can be called when agent hits the Mark Done. Is there any other way to complete the interaction by not hitting this button?

Thank you,
Best Regards. 

Offline PeteHoyle

  • Full Member
  • ***
  • Posts: 126
  • Karma: 13

Hi,

As you say, you can call the BundleClose command from your code, create a listener for when the chat interaction is released, as long as you don't want the Agents to Disposition the call..

You need to get an InteractionBundle object using the BundleId of your Interaction.


          [code] 
            IInteractionsBundle interactionBundle = null;
            if (!string.IsNullOrEmpty(interaction.BundleId))
            {
                interactionBundle = interactionManager.GetBundleById(interaction.BundleId);
            }
[/code]
And then call the BundleClose chain of command:

                [code]
                IDictionary<string, object> parameterRelease = new Dictionary<string, object>();
                parameterRelease.Add("CommandParameter", interactionBundle);
                IChainOfCommand command = commandManager.GetChainOfCommandByName("BundleClose");
                command.Execute(parameterRelease);[/code]


Offline bilge

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Hi Pete,

Thank you for your help, your code works fine.

BR