Calendar availability block
Availability blocks override an organization's business calendar for a time range. Blocks can now be scoped to a specific contact.
Fields
| Field Name | Type | Notes |
|---|---|---|
| CalendarAvailabilityBlockId | Int32 | Primary key |
| CalendarId | Int32 | Parent calendar |
| Start | DateTimeOffset | Start of the override window |
| End | DateTimeOffset | End of the override window |
| IsAvailable | Boolean | true adds availability, false removes availability |
| Description | String | Optional description |
| CustomValues | Dictionary | Free-form metadata |
| ContactId | Nullable Int32 | Optional contact scope. null means org-wide; a value applies the block only for that contact. |
| Contact | Contact | Optional scoped contact navigation |
| RecurrenceRule | CalendarAvailabilityRecurrenceRule | Optional recurrence pattern |
Contact-scoped availability
ContactId is the typed relationship used to scope carrier/customer-specific business calendar exceptions. For example, a carrier closure should be stored as an availability block with that carrier's contact id instead of using a magic customValues.carrierId key.
When calculating businessDays with a contact id, the API includes:
- org-wide blocks where
ContactIdisnull - blocks whose
ContactIdmatches the requested contact
When no contact id is provided, all blocks are considered for backward compatibility.