CCPulse StatValue on Email Alert

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.

Hi,

Modify your code in this way:

ThresholdInfo=“StatValue:”+CStr(Round(Threshold.StatValue/60,2)) + vbNewLine + _
“Threshold Exceeded:” + CStr(Threshold.StatAlias) + vbNewLine + _
“Advisor:” + CStr(Threshold.CFGObjectID) + vbNewLine + vbNewLine + vbNewLine

R.

1 Like

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.

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
Group: Team 5

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?

1 Like