Newer Version Available
BusinessHoursSettings
Represents the metadata used to manage settings for business hours and holidays in entitlements, entitlement templates, campaigns, and cases. This type extends the Metadata metadata type and inherits its fullName field.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See Settings for more details.
File Suffix and Directory Location
Business hours and holidays settings are stored in a single file named businessHours.settings in the settings directory. The .settings files are different from other named components because there is only one settings file for each settings component.
Version
BusinessHoursSettings is available in API version 29.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| businessHours | BusinessHoursEntry[] | Represents the application of business hours to entitlements, entitlement templates, campaigns, and cases. |
| holidays | Holidays[] | Represents a holiday and its usage in businessHours. |
BusinessHoursEntry
Represents the application of business hours to entitlements, entitlement templates, campaigns, and cases.
| Field Name | Field Type | Description |
|---|---|---|
| timeZoneId | string | The time zone for the time that defines business hours. |
| name | string | Name of the business hours. This name should be unique. |
| active | string | Indicates whether the business hours are active. |
| default | string | Indicates whether the business hours are used as the default business hours. |
| mondayStartTime | string | Start time for the business hours on Monday. Uses the format HH:mm:ss.SSSZ. |
| mondayEndTime | string | End time for the business hours on Monday. Uses the format HH:mm:ss.SSSZ. The value 00:00:00.000Z specifies midnight on Monday. |
| tuesdayStartTime | string | Start time for the business hours on Tuesday. Uses the format HH:mm:ss.SSSZ. |
| tuesdayEndTime | string | End time for the business hours on Tuesday. Uses the format HH:mm:ss.SSSZ. The value 00:00:00.000Z specifies midnight on Tuesday. |
| wednesdayStartTime | string | Start time for the business hours on Wednesday. Uses the format HH:mm:ss.SSSZ. |
| wednesdayEndTime | string | End time for the business hours on Wednesday. Uses the format HH:mm:ss.SSSZ. The value 00:00:00.000Z specifies midnight on Wednesday. |
| thursdayStartTime | string | Start time for the business hours on Thursday. Uses the format HH:mm:ss.SSSZ. |
| thursdayEndTime | string | End time for the business hours on Thursday. Uses the format HH:mm:ss.SSSZ. The value 00:00:00.000Z specifies midnight on Thursday. |
| fridayStartTime | string | Start time for the business hours on Friday. Uses the format HH:mm:ss.SSSZ. |
| fridayEndTime | string | End time for the business hours on Friday. Uses the format HH:mm:ss.SSSZ. The value 00:00:00.000Z specifies midnight on Friday. |
| saturdayStartTime | string | Start time for the business hours on Saturday. Uses the format HH:mm:ss.SSSZ. |
| saturdayEndTime | string | End time for the business hours on Saturday. Uses the format HH:mm:ss.SSSZ. The value 00:00:00.000Z specifies midnight on Saturday. |
| sundayStartTime | string | Start time for the business hours on Sunday. Uses the format HH:mm:ss.SSSZ. |
| sundayEndTime | string | End time for the business hours on Sunday. Uses the format HH:mm:ss.SSSZ. The value 00:00:00.000Z specifies midnight on Sunday. |
Holidays
Represents a holiday and its usage in businessHours.
| Field Name | Field Type | Description |
|---|---|---|
| name | string | Name of the holiday. This name does not have to be unique. |
| description | string | The description of the holiday. |
| isRecurring | string | Indicates whether the holiday is recurring. |
| activityDate | string | The date of the holiday. Use for non-recurring holidays. Uses the format HH:mm:ss.SSSZ. |
| recurrenceStartDate | string | The date the holiday starts recurring. Uses the format yyyy-mm-dd. |
| recurrenceEndDate | string | The date the holiday stops recurring. Uses the format yyyy-mm-dd. Optional. |
| startTime | string | The start time on the date of the holiday. Uses the format HH:mm:ss.SSSZ. startTime and endTime must be both null or both not null. If they are both null, indicates the whole day. |
| endTime | string | The end time on the date of the holiday. Uses the format HH:mm:ss.SSSZ. startTime and endTime must be both null or both not null. If they are both null, indicates the whole day. |
| recurrenceType | string | The recurrence type of the holiday. Valid values are: RecursDaily, RecursEveryWeekday, RecursMonthly, RecursMonthlyNth, RecursWeekly, RecursYearly, RecursYealyNth. |
| recurrenceInterval | string | The interval of weeks, months, or years the holiday recurs. |
| recurrenceDayOfWeek | string | The day of week the holiday recurs. Valid values: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. |
| recurrenceDayOfMonth | string | The day of month the holiday recurs. Valid values: integers 1-31. |
| recurrenceInstance | string | Valid values: First, Second, Third, Fourth, Last. Only used for recurrenceType RecursMonthlyNth and RecursYearlyNth. For example, if the recurenceInstance value is First, the holiday recurs on the first Monday of the month every 3 months. |
| recurrenceMonthOfYear | string | Valid values: January, February, March, April, May, June, July, August, September, October, November, December. |
| businessHours | string | The name of the business hours setting that applies to this holiday. |