Hours

Sets the hours of operation profile to your organization so the script can determine whether your organization is open, closed, on holiday, and so on. This allows you to create branches for each variation. For example, you might want to have different greetings to play on holidays or when your contact center is closed.

You can create a new hours of operation profile by double-clicking this action. You can also create or edit a profile in the CXone ACD application.  When editing profiles in CXone, remember that more than one script can use the same profile. Changes to the profile impact all scripts that use the profile.

Any profiles you create in CXone automatically appear in the Hours of Operation window in Studio. If you have multiple business unitsClosed High-level organizational grouping used to manage technical support, billing, and global settings for your CXone environment, be sure to select the same one in Studio that you used to create your Hours of Operation profile in CXone. If you select a different business unit, you won't see the same profiles.

Supported Script Types

The icon for a Generic script type - a rectangle with < and > symbols inside it.

The icon for the Email script type - a large @ symbol in a diamond.

The icon for the Chat script type - a chat bubble with an ellipsis inside (...), in a diamond shape.

The icon for the Phone script type - an old-style phone handset with curved lines indicating sound coming out of it.

The icon for the Voicemail script type - a symbol that looks like a cassette tape - two circles sitting on a horizontal line.

The icon for the Work Item script type-a piece of paper with one corner folded down and a bullet list on it.

The icon for the SMS script type - a smart phone with a chat bubble coming out of it.

The icon for the Digital script type - a computer monitor with a smartphone next to it.

Generic

Email Chat Phone Voicemail Work Item SMS Digital

Input Properties

These properties define data that the action uses when executing.

Property

Description

Profile With this property, you can select an Hours of Operation profile, which the script uses to determine whether your contact center is open, closed, on holiday, and so forth.

Result Branch Conditions

Result branch conditions allow you to create branches in your script to handle different outcomes when an action executes.

Condition

Description

Default

Path taken unless the script meets a condition that requires it to take one of the other branches. It is also taken if the action's other branches are not defined.

OnOpen

Path taken if the current date and time match the specified criteria for being open.

OnClosed

Path taken if the current date and time fall outside the specified criteria for being open.
OnHoliday Path taken if the current date is marked as a holiday in the settings.
OnError Path taken when the action fails to execute properly. For example, when there is an unexpected problem such as poor connectivity, syntax errors, and so on. The _ERR variable, with a single underscore character, should be populated with a condensed explanation of the problem.
OnWeather Path taken if you have selected Weather in the Override Branches section in your Hours of Operation profile in CXone.
OnMeeting Path taken if you have selected Meeting in the Override Branches section in your Hours of Operation profile in CXone.
OnEmergency Path taken if you have selected Emergency in the Override Branches section in your Hours of Operation profile in CXone.
OnOther Path taken if you have selected Other in the Override Branches section in your Hours of Operation profile in CXone.

Create an Hours of Operation Profile

  1. In Studio, double-click the Hours action to display the Hours of Operation Profiles window.

  2. Click Create New.

  3. Enter the name of the profile and then add a description.

  4. Click Next .

  5. For each day of the week, select the time that the contact center will open for business and the time that the contact center will close for the day.

  6. For any days that the business is closed all day, click Closed All Day.

  7. Click Next.

  8. Click Create New.

  9. Enter the name of the holiday and the date and hours of that holiday.

  10. Click Add. You will see the holiday added to the list of holidays. You can use the Test Open Hours to perform an immediate test of the hours your contact center is open or closed.

  11. Click Finish when you have added all of your holidays.

Script Example

This example is not a complete script. Additional scripting work is required to use this action.

This script uses the Hours of Operation Profile (selected in the Hours action) to determine which path to follow (as set by a user-defined variable). While the entire script is valuable in determining whether your company is open, closed, or on holiday, this script also shows the Branch Override paths (Error, Weather, Meeting, Emergency, or Other). These branches can be set through Hours of Operation (in CXone) for a temporary period of time if you have a temporary issue come up, for example, bad weather or an emergency. Remember that if you select a branch override option in CXone, your script must have a corresponding branch; otherwise, the script will follow the default branch. Click here for more information on Branch Override settings in Hours of Operation in CXone.

Would you like to download this script?