This is looking more like a bug to me, but I am not 100% sure yet. I used some code I had lying around to replicate and I am seeing the same thing as you. The same is true when I attempt adding all permutations of the statkey for a single workgroup with respect to Interval and InteractionType e.g. created statistic keys for CurrentShift - Calls, PreviousShift - Calls, CurrentShift - <**All**>, PreviousShift - <**All**>, etc. I also tried via Postman ICWS stats, and receive the same value of nothing.
There may be a workaround if the the service level target is a service level on the workgroup, as these values should match. This is obviously not the best solution as you would have to check the workgroup configuration and compare the target to each level, and then create the statistic key
------------------------------
Sean Walls
Diamond Resorts Centralized Services Co.
------------------------------
Original Message:
Sent: 03-22-2018 07:01
From: Shilpashree Jayaprakash
Subject: Read the Service Level Target from ICBM using IceLib
Hello,
I am placing a call to a Workgroup and seeing the Workgroup details in the ICBM - under Service Level Distribution [Cumulative].
I have to read the 'Current Shift' column from this list. So I use the below code:
ReadOnlyCollection<StatisticDefinition> definition = catalog.GetStatisticDefinitions("ININ.Workgroup");
ParameterValueKeyedCollection parameterTwoValues = new ParameterValueKeyedCollection();
ParameterTypeId intervalType = new ParameterTypeId("ININ.Queue:Interval");
parameterTwoValues.Add(new ParameterValue(intervalType, "CurrentShift"));
StatisticKey ServiceLevelTargetKey = new StatisticKey(definition[34].Id, parameterTwoValues); (--> this gives 'inin.workgroup:ServiceLevelTarget?ININ.People.WorkgroupStats:Workgroup={Workgroup name}&ININ.Queue:Interval=CurrentShift')
listener.StatisticValueUpdated += StatisticValueUpdated;
listener.StartWatching(new[] { LoggedInWatchedKey, AvailableWatchedKey, TalkingWatchedKey, WorkingWatchedKey, NotReadyWatchedKey, WaitingWatchedKey, OldestWatchedKey, HandledWatchedKey, TodayWatchedKey, AbanadonedWatchedKey, DQWatchedKey, LongestWatchedKey, AverageWatchedKey, ServiceLevelTargetKey /*ServiceLevelDistributionKey*/ });
Inside StatisticValueUpdated(object sender, StatisticValueUpdatedEventArgs e) method, i get "{Percent: Id=ININ.Workgroup:ServiceLevelTarget, Val=0, IsNull=True, IsError=False}" for e.StatisticValues
This always returns me a Zero in my code, though I see the Current Shift populated with value within ICBM.
Not sure if I have missed something. I took the reference of the Sample application - StatisticsExample App from ININ.
Thanks,
Shilpa