PureEngage On-Premises

 View Only

Sign Up

  • 1.  How to get the workbin item count in WDE

    Posted 04-29-2016 04:14

    I have used the IObjectContainer to get the IEnterpriseServiceProvider, and I have used that to get the IChannelService and IWorkbinServce (all of this is based on the Samples provided with WDE).

    The IDevice is determined from either the IAgentMultimedia or the IAgent.

    The IClientChannel is obtained using the IChannelService, passing the IDevice in to GetChannel.

    the IWorkbinService interface has been used to get the name, parameter, and type of each of the Workbins for the current agent - this is done using the GetWorkbinsConfiguration method, passing in the IClientChannel and the IDevice.

    However, when I try to use the GetWorkbin method of IWorkbinService, passing in IDevice, and the Type, Name, and Parameter from each entry in the results of GetWorkbinsConfiguration, I get a null object back.

    Is there something else I am supposed to do before I can call GetWorkbin?

     

    The end goal of this is to be able to access the number of items in Agent and AgentGroup workbins.  Is this the correct approach, or is there some other method to be used?

     

    I find the Genesys documentation and examples for all of this severely lacking.

     

     



  • 2.  RE: How to get the workbin item count in WDE

    Posted 04-29-2016 09:41
    Hi Bevan,

    Try this code:

     
    private void GetWorkbinCount()
            {
                IWorkbinsCollection wbc = container.Resolve<IWorkbinsCollection>("WorkbinsCollection");
                string key = "desktop-draft-workbin";
                log.Debug("Workbin Name: " + key);
                IWorkbinObject wo = wbc.GetIWWorkbin(key);
                if (wo == null)
                {
                    log.Debug("Workbin Name: " + key + " Was NULL");
                    return;
                }
                if (wo.cfg == null)
                {
                    log.Debug("Workbin Name: " + key + " Invalid Config");
                    return;
                }
                string wb_type = wo.cfg.getType().ToString();
                if (wo != null && wo.cfg != null && (wo.cfg.getType() == Platform.OpenMedia.Protocols.OpenMediaAttributes.WorkbinType.Agent))
                {
                    Dictionary<string, Genesyslab.Enterprise.Model.Interaction.IOpenMediaInteraction> intearctions = wo.GetOMInteractionList();
                    log.Debug("Number of Interactions in Workbin: " + intearctions.Count);
                }
            }

    Pete.


  • 3.  RE: How to get the workbin item count in WDE

    Posted 04-29-2016 11:11
    Thanks Pete, that code works much better.