11-12-2014 02:02 AM - edited 03-15-2019 06:03 AM
Hi guys,
I have been asked by one customer to calculate their SL for 20 seconds threshold for number of skill groups, for last 11 months,
without changing their current (default) measuring value (30 sec)!
Is this possible somehow?
Can anybody point me in the direction to resolve this?
P.S. I tried to revert SL value for one skill group, and than to execute one CUIC report but without success (I recived same SL % as before).
Thanks,
Lazar
Solved! Go to Solution.
11-17-2014 02:32 AM
Hi,
this might be a good start:
DECLARE @dateFrom DATETIME, @dateTo DATETIME, @SLLimit INT
SET @dateFrom = '2014-11-12 00:00:00'
SET @dateTo = '2014-11-13 00:00:00'
SET @SLLimit = 20
SELECT SUM(1) AS AllCalls,
SUM(CASE WHEN tcd.NetQTime <= @SLLimit THEN 1 ELSE 0 END) AS SLMet
FROM Termination_Call_Detail tcd
WHERE tcd.DateTime >= @dateFrom AND
tcd.DateTime < @dateTo AND
tcd.AgentSkillTargetID IS NOT NULL AND
tcd.SkillGroupSkillTargetID IS NOT NULL AND
tcd.RouterCallKeyDay > 0 AND
tcd.TalkTime > 0
The result of this query is actually two numbers: AllCalls gives you the number of calls (explained bellow) and the SLMet is the number of calls where the length of time spent in the Router Queue (NetQTime) is less than or equal to 20 seconds.
The input parameters are
@dateFrom, @dateTo: the start and the end of the observed period;
@SLLimit: the upper bound of the interval for one call's queue time, if it is not passed then the call is considered answered within this "service level" interval.
Please note there are multiple conditions in the WHERE clause: the AgentSkillTargetID and the SkillGroupSkillTargetID cannot be NULL (this ensures we only take a look at calls handled by agents and skill groups) also the RouterCallKeyDay > 0 ensures we count ACD calls only and the TalkTime > 0 filters out answered calls only.
You can sort of enhance this with for instance
SUM(CASE WHEN (tcd.NetQTime + tcd.RingTime) <= @SLLimit THEN 1 ELSE 0 END) AS SLMet
That would also count with RingTime.
G.
11-12-2014 02:15 AM
Hi,
yes, this is possible, although it's not going to be that easy.
Could you do the following for me (just to check whether we have available data) on the <instancename>_hds database?
SELECT TOP 1 tcd.DateTime FROM Termination_Call_Detail tcd ORDER BY tcd.DateTime ASC
Is the datetime value returned in this query older than the start of the above mentioned 11 month period?
G.
11-12-2014 02:52 AM
Hello Szabo,
thanks for prompt respone again!
Yes, we have data for last 2 years! (2012-05-19 08:00:09.017 )
Lazar
11-13-2014 02:02 AM
Hi, fyi, I didn't forget about this, I'm just a bit busy at this moment. As soon as a "window" appears, I will create the SQL query that would generate the requested info.
G.
11-17-2014 02:32 AM
Hi,
this might be a good start:
DECLARE @dateFrom DATETIME, @dateTo DATETIME, @SLLimit INT
SET @dateFrom = '2014-11-12 00:00:00'
SET @dateTo = '2014-11-13 00:00:00'
SET @SLLimit = 20
SELECT SUM(1) AS AllCalls,
SUM(CASE WHEN tcd.NetQTime <= @SLLimit THEN 1 ELSE 0 END) AS SLMet
FROM Termination_Call_Detail tcd
WHERE tcd.DateTime >= @dateFrom AND
tcd.DateTime < @dateTo AND
tcd.AgentSkillTargetID IS NOT NULL AND
tcd.SkillGroupSkillTargetID IS NOT NULL AND
tcd.RouterCallKeyDay > 0 AND
tcd.TalkTime > 0
The result of this query is actually two numbers: AllCalls gives you the number of calls (explained bellow) and the SLMet is the number of calls where the length of time spent in the Router Queue (NetQTime) is less than or equal to 20 seconds.
The input parameters are
@dateFrom, @dateTo: the start and the end of the observed period;
@SLLimit: the upper bound of the interval for one call's queue time, if it is not passed then the call is considered answered within this "service level" interval.
Please note there are multiple conditions in the WHERE clause: the AgentSkillTargetID and the SkillGroupSkillTargetID cannot be NULL (this ensures we only take a look at calls handled by agents and skill groups) also the RouterCallKeyDay > 0 ensures we count ACD calls only and the TalkTime > 0 filters out answered calls only.
You can sort of enhance this with for instance
SUM(CASE WHEN (tcd.NetQTime + tcd.RingTime) <= @SLLimit THEN 1 ELSE 0 END) AS SLMet
That would also count with RingTime.
G.
11-17-2014 06:26 AM
Thanks a lot Szabo for sharing Your knowledge!
Can You clarify this below for me please?
Now I can calculate the SL for particular Call Type like this:
DECLARE @dateFrom DATETIME, @dateTo DATETIME, @SLLimit INT
SET @dateFrom = '2014-10-22 00:00:00'
SET @dateTo = '2014-10-22 23:59:00'
SET @SLLimit = 20
SELECT SUM(1) AS AllCalls,
SUM(CASE WHEN tcd.NetQTime <= @SLLimit THEN 1 ELSE 0 END) AS SLMet
FROM Termination_Call_Detail tcd
WHERE tcd.DateTime >= @dateFrom AND
tcd.DateTime < @dateTo AND
tcd.AgentSkillTargetID IS NOT NULL AND
tcd.SkillGroupSkillTargetID IS NOT NULL AND
tcd.CallTypeID = 5043 AND
tcd.RouterCallKeyDay > 0 AND
tcd.TalkTime > 0
or for particular skill group, by matching the SkillGroupSkillTragetID of that skill group!
Am I correct?
Regards,
Lazar
11-17-2014 06:26 AM
Hi Lazar,
yes, exactly. I assume you know your ICM scripts perfectly well and you are absolutely sure about the CallType nodes' placement :-)
G.
11-17-2014 06:28 AM
Thanks Szabo :)
01-26-2015 09:32 AM
Hi Szabo,
one more clarification, please.
Is time tcd.NetQTime (time spent in Router Queue) are measured for all calls(answered+abandoned)?
In other words, are in this 20 sec SL, all calls that are answered in 20 sec + all calls that are abandoned in 20 sec?
Thanks,
Lazar
01-26-2015 12:01 PM
Lazar,
Looking at the DB Schema entry for NetQTime:
Represents the time the call spent on Network Queue in the CallRouter.
There doesn't appear to be any distinction between Abandoned, Answered, Dequeued, et cetera for this field.
-Jameson
01-27-2015 12:46 AM
Thanks Jameson,
I assumed that too.
Regards,
Lazar
01-29-2015 03:04 AM
Hello everyone,
Is it possible to filter the calls somehow, by making distinction between Abandoned, Answered etc. in the query?
Thanks a lot!
Dragan