CCX Scripting Series – Granular Time of Day Routing

I had a client request to route (or stop routing) calls to a CSQ at more granular increments than the 15 minute intervals provided by the CCX Script Editor.  The script editor allows us to only define ToD schedules in 15 minutes increments, but the customer wanted to stop routing calls to the queue 5 minutes prior to their office closing.  Here’s what I ended up doing.

Created int variable to get the hour of the day.  Used D[now].hod instead of T[now].hour because D[now].hod returns the hour in 24 hour format instead of 12 hour format (4) and doesn’t require you to determine whether it’s am or pm like T[now].hour does.

Created int variable to get minute of the hour.  Used T[now].min

The time of day schedule is set to 7am to 4:30pm; however, customer didn’t want to allow any more calls into the queue after 4:25pm.  So I dropped the If statement below into the 7:am-4:30pm output branch of the time of day schedule to re-route the calls 5 minutes before the queue closes.

Leave a Reply

Your email address will not be published. Required fields are marked *