PureConnect

 View Only
Discussion Thread View
  • 1.  IceLib Statistics in 4.0

    Posted 08-29-2012 10:45
    Hi, Does anyone have experience with the ININ.IceLib.Statistics namespace in 4.0? I want to know how many interactions recieved on a specific queue today. I see from IceLib selfhelp (Statistics Catalog) and sample apps that this is possible, but not exactly how to do it. I guess I should put I watch on just the info I need, and then capture the value for that parameter. I appreciate any comments or code snippets..


  • 2.  RE: IceLib Statistics in 4.0

    Posted 09-03-2012 14:06
    Hi, I will try to be a bit more specific.. I want to know the value for InteractionsEntered. First I get the desired "attribute" to watch from the StatisticCatalog: StatisticCatalog catalog = new StatisticCatalog(_StatisticsManager); catalog.StartWatching(); ReadOnlyCollection<StatisticDefinition> statistics = catalog.GetStatisticDefinitions(); foreach (StatisticDefinition statistic in statistics) { if (statistic.Id.Uri == "ININ.Workgroup:InteractionsEntered") { id_InteractionsToday = statistic.Id; } } catalog.StopWatching(); Then I set a watch to get the exact value for InteractionsEntered, for the workgroup in _sWorkgroupName, with given inputs (workgroup and interval): public void setInteractionsEntered() { try { ParameterTypeId id_Length = new ParameterTypeId("ININ.Queue:Interval"); ParameterTypeId id_Workgroup = new ParameterTypeId("ININ.People.WorkgroupStats:Workgroup"); ParameterValueKeyedCollection _ParameterValueKeyedCollection = new ParameterValueKeyedCollection(); _ParameterValueKeyedCollection.Add(new ParameterValue(id_Workgroup, _sWorkgroupName)); _ParameterValueKeyedCollection.Add(new ParameterValue(id_Length, "5000")); StatisticListener listener = new StatisticListener(_StatisticsManager); StatisticKey watchedKeyInteractionsEntered = new StatisticKey(id_InteractionsToday, _ParameterValueKeyedCollection); StatisticValue statValue; listener.StartWatching(new[] { watchedKeyInteractionsEntered }); statValue = listener[watchedKeyInteractionsEntered]; if (!statValue.IsError && !statValue.IsNull) { StatisticIntValue intValue = (StatisticIntValue) statValue; MessageBox.Show(intValue.Value.ToString()); _InteractionsToday = intValue.Value; } listener.StopWatching(); } catch (Exception ex) { Tracing.TraceException(ex, "An exception occurred in setAvgWaitTime" + ex.Message.ToString()); } } I don't see any errors, but when debugging, I see that !statValue.IsNull is ALWAYS true, and the value is zero, even though I know it should have a positive value. Any thoughts on how to go with this is appreciated. Regards Mari


  • 3.  RE: IceLib Statistics in 4.0

    Posted 09-28-2012 21:24
    Unfortunatly, Session manager does not initially return a value for stats. You have to start the listenser and then wait stats change events: _StatsManager = StatisticsManager.GetInstance(_Session); _StatsCatalog = new StatisticCatalog(_StatsManager); _StatsListener = new StatisticListener(_StatsManager); _StatsListener.StatisticValueUpdated += StatisticValueUpdated; private void StatisticValueUpdated(object sender, StatisticValueUpdatedEventArgs e) { StatisticValue value = default(StatisticValue); StatisticKey key = default(StatisticKey); }


  • 4.  RE: IceLib Statistics in 4.0

    Posted 10-15-2012 13:21
    Hi, and thanks for your update. I'm not sure I understand what you mean. But I got it working with the code I posted, when replacing the interval-value with "CurrentShit" instead of "5000". However, the execution is unstable. Even when running the IceLib sample app for statistics, I see that for a given workflow, the value for InteractionsEntered is either a)10 (which is the correct) b)Nothing appears c) Two or more rows are returned, where one row is 0, and one row is 10.. Did anyone experienced some difficulties with this? Do you think the code you suggested will solve this, or perhaps you can explain a bit more? Thanks in advance. Regards Mari.


  • 5.  RE: IceLib Statistics in 4.0

    Posted 10-15-2012 13:51
    I mean "CurrentShift"... Not CurrentShit... :-)


  • 6.  RE: IceLib Statistics in 4.0

    Posted 02-07-2013 21:33
    Are statistics introduced in CIC 4 or did they come in on some SU in CIC 3?


Need Help finding something?

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