" /> CCPulse VBScript in threshold by hour/day - Genesys CTI User Forum

Author Topic: CCPulse VBScript in threshold by hour/day  (Read 1657 times)

Offline PFCCWA

  • Hero Member
  • *****
  • Posts: 655
  • Karma: -7
CCPulse VBScript in threshold by hour/day
« on: June 23, 2017, 03:57:48 PM »
Advertisement
hello,

I am developing a ccpulse script but wanted to know if is possible to create a threshold which will check for statvalue based on different times in a day and trigger an alert IF any are true?
It looks like I can do this for each hour using a different threshold but want to keep it in one for practical reasons.
My script so far is:

if Hour(Time())>=09 and Weekday(Date) = vbMonday and Threshold.StatValue < 50 and Threshold.StatValue > 1000 then
Threshold.Result = true
else
Threshold.Result = false
end if

I think this will end the threshold if the script is true, and only carry on if the initial conditions are not met.
What I want to do is have the threshold checked at every hour (09,10,11 onwards) and if any of the conditions are met in those hours then the action alert is triggered.

thanks,