cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
331
Views
0
Helpful
2
Replies

Problems when using function T[now] on a script

regraxpto
Level 1
Level 1

On an ipccx implementation im using a script, which does regular stuff like checking holydays, business hours, etc. To do that, I leave the variables "opens_at" and "closes_at" with the option "parameter" checked, to let the customer choose the value on the application, in crs.

The script does the following: "opens_at" is defined as T[09:00:00 AM] and "closes_at" as T[07:00:00 PM]. Then I use the function T[now] to find out the time when the call was placed. After comparing T[now] with "opens_at" and "closes_at" the script will prompt a "closed office" or queues the call to a free agent. It works fine for the first day but after that, the office will be closed forever and ever, unless I press the "Update" button on the application management (every day, after midnight). Does anyone is using T[now] and the script is working correctly?

2 Replies 2

regraxpto
Level 1
Level 1

It seems that T[now], records a timestamp of date also, which causes the script to work only on the day I did update. The problem was resolved using T[now].hour instead of T[now] only.