Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: pdavid on February 07, 2007, 08:21:44 PM

Title: CCPulse StatValue on Email Alert
Post by: pdavid on February 07, 2007, 08:21:44 PM
Ok folks here's the issue I'm faced with, on the email alerts I have the statvalue returned, however this value is in seconds so I've added the formula "/60" to get this in minutes which works, however some values exceed 2 decimal points. I've read about the round function for VB, but am not certain how to incorporate it to display the result rounded to 2 decimal points. Below is the code I have.

thresholdInfo="StatValue:"+CStr(Threshold.StatValue/60) + vbNewLine + _
                                "Threshold Exceeded:" + CStr(Threshold.StatAlias) + vbNewLine + _
                                "Advisor:" + CStr(Threshold.CFGObjectID) + vbNewLine + vbNewLine + vbNewLine

the VB Round function (not mine, found on the net) is the below, I just don't know how to incorporate this into the above.

Example 1
dim x
x=24.13278
document.write(Round(x))

Output:24

Example 2
dim x
x=24.13278
document.write(Round(x,2))

Output:24.13


Any help with this would be greatly appreciated.
Title: Re: CCPulse StatValue on Email Alert
Post by: René on February 07, 2007, 08:40:04 PM
Hi,

Modify your code in this way:

ThresholdInfo="StatValue:"+[b]CStr(Round(Threshold.StatValue/60,2))[/b] + vbNewLine + _
                    "Threshold Exceeded:" + CStr(Threshold.StatAlias) + vbNewLine + _
                    "Advisor:" + CStr(Threshold.CFGObjectID) + vbNewLine + vbNewLine + vbNewLine


R.
Title: Re: CCPulse StatValue on Email Alert
Post by: pdavid on February 07, 2007, 10:27:17 PM
That did it! I really appreciate your help with the coding, this is a huge win for me! Thanks again I'm truly greatful as this is going to help me with an email alert initiative I have going here.
Title: Re: CCPulse StatValue on Email Alert
Post by: pdavid on February 14, 2007, 05:33:13 PM
Ok here's another question..

Is it possible for the email alerts to include agent group? For example.

StatValue: 10
Threshold Exceeded: TalkTime
Advisor:pdavid
[b]Group: Team 5[/b]

I know you can grab the statvalue, threshold, and agent/queue name, but is it possible to add the agent group name to include within the email?