Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: LJLeon on February 14, 2017, 10:13:04 PM

Title: CCPulse Custom Statistics - Own Formulas (result format, Round Up, Decimal Point
Post by: LJLeon on February 14, 2017, 10:13:04 PM
Hello guys.

I´d like to ask you for some help. I´m trying to set my own formula, which could predict Agent´s Total number of Outband call per shift, based on Actual Outband Calls per Actual Login Time.

It is something like  this:
((ccpulse.group("Total Time").OUT/ccpulse.LOG.Total_Log)*60)*495

and it looks like it works, but the result is shown with 2 decimal places.

I´ll try to find it here, or in other documentations, but nothing help.
I´trying it with, (result.Long); (Math.round) etc. but I dont have any Java experience, so maybe I just didnt know how to do it right.

Thank you for any help.
Title: Re: CCPulse Custom Statistics - Own Formulas (result format, Round Up, Decimal Point
Post by: Tambo on February 15, 2017, 08:30:49 AM
have you tried changing the time format within the template to seconds rather than Hours:Min:Sec
Title: Re: CCPulse Custom Statistics - Own Formulas (result format, Round Up, Decimal Point
Post by: LJLeon on February 15, 2017, 12:52:57 PM
Hi, what should be the result of that? or where can I change it? I think that calculation takes Total Count of Outband Calls and Divide it by Actual Log (in seconds).
then I multiply it with lenght of agents shift (495min) without lunch.

It seems that it works, but the result´s is number for example 73.33. I want to show it in CCPulse, rounded to whole number, or just show with zero decimal places.
Title: Re: CCPulse Custom Statistics - Own Formulas (result format, Round Up, Decimal Point
Post by: Tambo on February 15, 2017, 02:35:51 PM
should you not have both set the same in seconds ? otherwise you will get a partial minute no?
Title: Re: CCPulse Custom Statistics - Own Formulas (result format, Round Up, Decimal Point
Post by: LJLeon on February 15, 2017, 03:08:07 PM
Thanks for your advice´s, now, with lot of googling, I have something that works.

var predictedOut=(((ccpulse.Totals.OUT+ccpulse.Totals.INB) / ccpulse.LOG.Total_Log)*29700);
predictedOut.toFixed(0);

Calculation seems right, and the result is showed without decimal numbers, in whole numbers.

Now I have onother task:)
I´m trying to show % Talktime from LogTime:

((ccpulse.Totals.Total_Talk_Time/ccpulse.LOG.Total_Log)*100);

but the result i need in % and rounded again :)

Thanks for any advice
Title: Re: CCPulse Custom Statistics - Own Formulas (result format, Round Up, Decimal Point
Post by: Tambo on February 15, 2017, 04:43:04 PM
comes out as a round % , it's not pretty but it works

result.Text = CalculateReason();



function CalculateReason()

{

if (((ccpulse.group("Individual Agent").statistic("TotalTalkStatusTime 1")/ccpulse.group("Individual Agent").statistic("Login Time"))*100))
{

var d = ((ccpulse.group("Individual Agent").statistic("TotalTalkStatusTime 1")/ccpulse.group("Individual Agent").statistic("Login Time"))*100)
    var s = Math.floor(d % 3600 % 60);
  var f = (+ s);
return  "("+ f +")";
  }
}
Title: Re: CCPulse Custom Statistics - Own Formulas (result format, Round Up, Decimal Point
Post by: LJLeon on February 16, 2017, 08:49:14 AM
Hi, thank you very much for your reply, It seems pretty complicated for me, with no javascript experience :D but im gonna try it, what will be the result.
Between whiles I put together this:

(Math.round((ccpulse.Actual_Totals.Total_Talk_Time/ccpulse.LOG.Total_Log)*100))+' %';

the result is rounded, and I put there % symbol :)