[This is pre-release documentation and subject to change in future releases. This topic's current status is: Milestone-Ready]

Topic Last Modified: 2010-07-15

Workflows identify when the response group is available to take calls and how to handle calls that are made when the response group is not available. Before you configure your workflows, you can define your business hours and holidays. Then when you configure a workflow, you just apply the the business hours and holidays that you defined in advance to the workflow.

Note:
To apply holidays to a workflow, you must predefine at least one set of holidays. To apply business hours to a workflow, you can either predefine the business hours, or you can create custom business hours. Custom business hours, however, apply only to a specific workflow and cannot be reused for other workflows. You can create custom business hours in advance or at the time you configure the workflow.
Note:
You do not need to predefine business hours if your response group is always open or if you use only custom business hours.

Defining Business Hours

Business hours define the days of the week and the hours of a day that the response group is normally available to take calls. A business hours collection consists of the ranges of times for each day of the week that a response group is available. For example, a response group might be available from 8:00 AM to 4:00 PM on weekdays and from 9:00 AM to 12:00 PM and again from 1:00 PM to 5:00 PM on weekends.

To define business hour collections, you must use the New-CsRgsTimeRange and New-CsRgsHoursOfBusiness cmdlets. The New-CsRgsTimeRange cmdlet defines opening and closing hours, and the New-CsRgsHoursOfBusiness cmdlet identifies which opening and closing hours apply to each day of the week (the business hours collection). For details about using these cmdlets, see the RGSCmdlets.chm or inline help for Communications Server Management Shell.

Important:
Express time for parameters in these cmdlets as military time.

To create a business hours collection

  1. Open Communications Server Management Shell.

  2. For each unique range of hours you want to define, run:

    Copy Code
    $x = New-CsRgsTimeRange [–Name <name of time range>] `
    –OpenTime <time when business hours begin> -CloseTime <time when business hours end>
    

    To create the business hours collection that uses the ranges you defined, run:

    Copy Code
    New-CsRgsHoursOfBusiness –Parent <service where the workflow is hosted> `
    -Name <unique name for collection> `
    [-MondayHours1 <first set of opening and closing times for Monday>] `
    [-MondayHours2 <second set of opening and closing times for Monday>] `
    [-TuesdayHours1 <first set of opening and closing times for Tuesday>] `
    [-TuesdayHours2 <second set of opening and closing times for Tuesday>] `
    [-WednesdayHours1 <first set of opening and closing times for Wednesday>] `
    [-WednesdayHours2 <second set of opening and closing times for Wednesday>] `
    [-ThursdayHours1 <first set of opening and closing times for Thursday>] `
    [-ThursdayHours2 <second set of opening and closing times for Thursday>] `
    [-FridayHours1 <first set of opening and closing times for Friday>] `
    [-FridayHours2 <second set of opening and closing times for Friday>] `
    [-SaturdayHours1 <first set of opening and closing times for Saturday>] `
    [-SaturdayHours2 <second set of opening and closing times for Saturday>] `
    [-SundayHours1 <first set of opening and closing times for Sunday>] `
    [-SundayHours2 <second set of opening and closing times for Sunday>]
    

    The following example specifies business hours of 9:00 AM to 5:00 PM for weekdays, 8:00 AM to 10:00 AM and again from 2:00 PM to 6:00 PM for Saturdays, and no business hours for Sundays:

    Copy Code
    $a = NewRgsTimeRange –Name "Weekday Hours" `
    -OpenTime "9:00" –CloseTime "17:00"
    $b = NewRgsTimeRange –Name "Saturday Morning Hours" `
    -OpenTime "8:00" –CloseTime "10:00"
    $c = NewRgsTimeRange –Name "Saturday Afternoon Hours" `
    -OpenTime "14:00" –CloseTime "18:00"
    New-CsRgsHoursOfBusiness –Parent "ApplicationServer:Redmond.contoso.com" `
    -Name "Help Desk Business Hours" `
    -MondayHours1 $a `
    -TuesdayHours1 $a `
    -WednesdayHours1 $a `
    -ThursdayHours1 $a `
    -FridayHours1 $a `
    -SaturdayHours1 $b `
    -SaturdayHours2 $c
    

Defining Holidays

Holidays define the days that agents will not be working and, therefore, are not available to take calls. Holiday sets are collections of holidays. For example, the national holidays for year 2011 might be a holiday set. Multiple holiday sets can apply to a workflow. For example, you might define a set of national holidays for the calendar year, another set of holidays for company days off, and another set of holidays for team events. Any combination of the holiday sets can apply to a workflow.

To define holidays and holiday sets, you must use the New-CsRgsHoliday and New-CsRgsHolidaySet cmdlets. The New-CsRgsHoliday cmdlet defines individual holidays, and the New-CsRgsHolidaySet cmdlet identifies which holidays are in a holiday set. For more details about these cmdlets, see the RGSCmdlets.chm or inline help for Communications Server Management Shell.

To create a holiday set

  1. Open Communications Server Management Shell.

  2. For each holiday you want to define, run:

    Copy Code
    $x = New-CsRgsHoliday [-Name <holiday name>] `
    -StartDate <starting date of holiday> -EndDate <ending date of holiday>
    

    To create the holiday set that contains the holidays you defined, run:

    Copy Code
    New-CsRgsHolidaySet –Parent <service where the workflow is hosted> `
    -Name <unique name for holiday set> `
    -HolidayList <one or more holidays to be included in the holiday set>
    

    The following example shows a holiday set that includes two holidays:

    Copy Code
    $a = New-CsRgsHoliday –Name "New Years Day" –StartDate "1/1/2011" –EndDate "1/1/2011"
    $b = New-CsRgsHoliday –Name "Independence Day" –StartDate "7/4/2011" –EndDate "7/4/2011"
    New-CsRgsHolidaySet –Parent "ApplicationServer:Redmond.contoso.com `
    -Name "2011 Holidays" –HolidayList ($a $b)