Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: amarceau on January 19, 2011, 05:20:29 PM

Title: CCPulse Reporting on NotReady Reason Codes
Post by: amarceau on January 19, 2011, 05:20:29 PM
Has anyone successully implemented any CCPulse reporting stats on the NotReady Reason Codes.  I have been trying this every way according to the documentation and nothing is working.  Here's what I have right now:

Stat

[CurrAgentInNotReadyTime]
Category=CurrentTime
MainMask=NotReadyForNextCall
Objects=Agent, Place
Subject=AgentStatus


Filters

Reason_1=ExtensionReasonCode = "1"
Reason_2=ExtensionReasonCode = "2"
Reason_3=ExtensionReasonCode = "3"
Reason_4=ExtensionReasonCode = "4"
Reason_5=ExtensionReasonCode = "5"
Reason_6=ExtensionReasonCode = "6"
Reason_7=ExtensionReasonCode = "7"
Reason_8=ExtensionReasonCode = "8"

I've added a statistic in my CCPulse View for CCurrentAgentInNotReadyTime with one of the above filters - and the time always shows as zero - regardless of what not ready reason I go into...

Any ideas?

Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: cavagnaro on January 19, 2011, 05:27:13 PM
Please search in the forum, this question has been answered several times before.
Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: mduran22 on January 19, 2011, 05:32:27 PM
Your statistic looks correct

Try the following for your filter

GetMin("ReasonCode")=1 for your value.

Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: smile on January 20, 2011, 07:19:42 AM
How you defined the reason codes (fileds name and code)? I've used filters based on 'pairexist' function and it works well. as cavagnaro said, it's very popular question, try so search solution on forum.
Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: Tambo on January 24, 2011, 08:05:23 AM
Hi All,

I have been reporting on Not Ready reason codes through pulse for a while now, but I still cant get the Agent Status timer to reset when changing not ready codes it just keeps counting without resetting when the reason code is changed.

I've searched for a thread for this but cant find an answer, anyone got any ideas???

cheers

Tambo
Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: smile on January 24, 2011, 09:05:41 AM
Tambo, what did you try to do?
If you want to exclude reason code statistic from main not ready statistic, please use filter exception - '~' for general not ready state.
If you want to reset counters every time when agent change his state - use other statistic type. The default type (this only one type which can be used with historical reporting) is 'growing'. You can choose another one, e.g. Selection type. Keep it mind that it can be used only for real-time reporting, not for historical. Refer to Stat Server User's guide for details.
Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: mark on January 24, 2011, 10:36:01 AM
Do the agents actually change state between changing reason codes? If not, then the state in the main Agent Status window would not reset, as the state is still NotReady.
I'm sure this is the case, but could be wrong!

One way around this would be to have your softphone perform a quick change from notready, ready, notready.

Mark
Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: amarceau on January 25, 2011, 06:37:50 PM
We now have a solution for this which was provided by Genesys Techs.  We now have CCPulse showing realtime the NotReady Reason Code and the time in the State.  It does reset and starts counting when the NotReady Reason is changed.....

Here's what we had to do....

CCPulseStatServer Options/Filters Section
Setup Filters for your Available Reason Codes...  We have 8 - so ours are as follows:

Reason_1=ExtensionReasonCode=1
Reason_2=ExtensionReasonCode=2
Reason_3=ExtensionReasonCode=3
Reason_4=ExtensionReasonCode=4
Reason_5=ExtensionReasonCode=5
Reason_6=ExtensionReasonCode=6
Reason_7=ExtensionReasonCode=7
Reason_8=ExtensionReasonCode=8

CCPulse Template - Section Called NotReadyTimes
with the following
CurrentNotReadyTime1 with filter applied the NotReadyReason (Filters)
should have 8 stats created when done one with each filter for the reason code.

Create Formula with the following:


result.Text = CalculateReason();



function CalculateReason()

{

if (ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 1")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 1");
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "Training (" + f + ")";
  }

if (ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 2")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 2")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "Meeting (" + f + ")";
  }
 

if (ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 3")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 3")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "Coaching (" + f + ")";
  }

if (ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 4")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 4")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "Lunch (" + f + ")";
  }

if (ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 5")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 5")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "Break (" + f + ")";
  }

if (ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 6")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 6")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "Down Time (" + f + ")";
  }

if (ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 7")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 7")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "Manual Work (" + f + ")";
  }

if (ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 8")>0)
  {
  var d = ccpulse.group("NotReadyTimes").statistic("CurrentNotReadyTime 8")
  var h = Math.floor(d / 3600);
  var m = Math.floor(d % 3600 / 60);
  var s = Math.floor(d % 3600 % 60);
  var f = ((h > 0 ? h + ":" : "") + (m > 0 ? (h > 0 && m < 10 ? "0" : "") + m + ":" : "0:") + (s < 10 ? "0" : "") + s);
  return "Special (" + f + ")";
  }

return "N/A";

}

Then just hide the colums in the view that have all the filters and you will be left with the final NotReadyReason.  Which will display the Reason & the time in that reason.

Hope this helps....
Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: cavagnaro on January 26, 2011, 05:32:54 AM
Thanks for sharing!
Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: Timur Karimov on January 26, 2011, 08:37:52 PM
Great job! Very usefull! Fanx for sharing the code!
WBR
Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: mark on February 04, 2011, 02:28:55 PM
Good one that! Thanks :)
Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: Tambo on February 06, 2011, 06:08:49 PM
Thanks for this, works an absolute treat  ;D

Tambo
Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: Christian_Vera on December 15, 2011, 08:06:54 PM
Great Job!!!!

Thanks ;D ;D
Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: Dorian-Grim on January 10, 2017, 02:47:05 PM
I did the setup as mentioned. I also have 8 not ready status reason codes, but I get every statistic > 0. I don't get it why.
Somehow my filters won't apply? Agents are setting status reason from WDE and I'm using 8.1.100.17 for ccpulse

Anyone has any ideea?
Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: Tambo on January 10, 2017, 09:08:35 PM
your filters must be wrong, check spelling
Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: Dorian-Grim on January 11, 2017, 08:23:59 AM
Apparently ExtensionReasonCode, ReasonCode, Reason, etc... they are all custom strings. In my case, the developers modified them and are currently NRReason...

It works now
Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: Peter on September 21, 2018, 04:38:00 AM
Hi,
I'm a bit new to Genesys & have tried using the above code but get the below error.
In the instruction it does say "CCPulse Template - Section Called NotReadyTimes"
But I cannot find this through the Template Wizard, so in desperation was trying to create a new statistic.
Can anyone please add a few more detailed lines in the instructions to the firt post in this thread that may guide me to the correct places?
Would be very much appreciated.

---------------------------
CCPulse+
---------------------------
Error in formula: Group "NotReadyTimes" not found.
Line: 9, column: 2
---------------------------
[ OK ]
---------------------------

In the instruction it does say
"CCPulse Template - Section Called NotReadyTimes"



Title: Re: CCPulse Reporting on NotReady Reason Codes
Post by: cavagnaro on September 21, 2018, 05:43:41 AM
That should be the name of your CCPulse Group, when you create the template, the Header Name