Default values in schedules
and MASTER events
streamline event creation by acting as templates for fields like title and
location. These defaults allow events to inherit specified values unless
explicitly overridden, simplifying setup and ensuring consistency across related
events. You can identify which event fields have inherited values by checking
the event's inheritedFields array.
When default fields for a schedule or MASTER event are updated, future
events that inherit these values automatically reflect the changes, while
past events retain their original values.
To override a default value, specify that field when
creating
or updating
the event. Set a field to null to generate an empty value.
To revert overridden fields to their default values, use
restoreEventDefaults().
Provide the relevant event ID and specify which fields to restore. For instance,
if an event has custom values for location, title, and capacity, but you
want to reset only the title and capacity to their defaults (leaving
location unchanged), include the event ID and set fields to
["TITLE", "CAPACITY"].
schedule objectThe values of the following fields in the schedule object serve as defaults for event objects:
Default field in schedule | Affected field in event |
|---|---|
defaultTitle | title |
timeZone | timeZone |
defaultLocation | location |
defaultCapacity | capacity |
defaultConferencingDetails | conferencingDetails |
MASTER eventsFor single-occurrence events, defaults only come from the schedule. However,
INSTANCE and EXCEPTION events can inherit additional values from the
associated MASTER event.
Default field in MASTER event | Notes |
|---|---|
start | Shown as TIME in inheritedFields. |
end | Shown as TIME in inheritedFields. |
resources | |
participants |
Wix Bookings utilizes the
service
name as defaultTitle in the relevant schedule. When the business owner
updates the service name, these changes occur automatically: