Configuration
This page describes all appConfig options of BookingJs in detail: referencing, display, behavior, customer identification, and callbacks.
Overview
The appConfig options directly control the behavior of timum and let you react to various events.
The three arguments of init()
init() accepts up to three arguments in this order:
| Argument | Description |
|---|---|
appConfig | Object with all behavior options: references, callbacks, localization, form fields, etc. (this page) |
muiTheme | MUI theme object for the appearance (PRO, see Styling) |
fcConfig | FullCalendar options – only relevant when calendarFrontend is set to fullCalendar (see below) |
Referencing options
| Option | Type | Description |
|---|---|---|
ref | string | string[] | Reference to the resource(s). Required field (or tslRefs) |
tslRefs | string | string[] | References to specific appointments |
prdRefs | string | string[] | References to specific products, for filtering |
channelKey | string | Channel type (RESOURCE_PUBLIC, RESOURCE_EXCLUSIVE, etc.) |
platform | string | Platform part of the reference (hardcoded) |
prvUuid | string | Provider UUID part of the reference (hardcoded) |
Display options
| Option | Type | Description |
|---|---|---|
height | string | Height of the widget (default: 500px) |
calendarFrontend | string | Display mode (see below) |
culture | string | Language (de, en, fr, es, it) |
allResourcesOption | boolean | "All resources" option for multi-resource |
calendarFrontend values
fullCalendar- FullCalendar viewdetailsFullCalendar- FullCalendar with resource detailspureListView- Pure list viewdetailsListView- List view with detailscondensedView- Condensed viewdetailsCondensedView- Condensed view with details
Details variants:
Behavior options
| Option | Type | Description |
|---|---|---|
host | string | Server URL (https://www.timum.de or https://staging.timum.de) |
allowCloseOnBooking | boolean | Confirmation view can be closed after a successful booking |
allowCloseOnCancel | boolean | Cancellation view can be closed |
constrainDialogsToContainer | boolean | Constrain dialogs to the container (instead of fullscreen) |
hideTimumFooter | boolean | Hide "Powered by timum" (PRO) |
hiddenForAnonymous | boolean | Hide widget when there is no customer ID |
sendCustomValuesInMessage | boolean | Send custom fields as a message |
Customer identification
| Option | Type | Description |
|---|---|---|
pData | object | Customer identification (platform, personId) |
Advanced options
| Option | Type | Description |
|---|---|---|
callbacks | object | Event callbacks (see the Callbacks page) |
postMessageTarget | string | URL for postMessage events (iframe scenario) |
fields | object | Form field configuration (PRO) |
localization | object | Text customizations (PRO) |
fcConfig: FullCalendar options
If you use fullCalendar or detailsFullCalendar as calendarFrontend, configure FullCalendar via the third init() argument. In addition to the official FullCalendar options, the following BookingJs-specific options are available:
| Option | Type | Description |
|---|---|---|
largeView | string | View for screen widths above 601px |
smallView | string | View for screen widths below 601px |
useCustomTimumCss | boolean | Set to false to disable timum's FullCalendar CSS overrides |
timum.init(
{
ref: 'ihre-ressourcen-referenz',
calendarFrontend: 'fullCalendar',
},
undefined,
// Third argument: FullCalendar options
{
largeView: 'dayGridMonth',
smallView: 'listWeek',
}
);
Note:
Global configuration: window.timumBookingConfig
In addition to the objects passed directly to init(), BookingJs reads an optional global configuration from the host page: window.timumBookingConfig. This lets you customize BookingJs without changing the embed code itself – ideal when the snippet is generated by a CMS plugin or backend, but you control the surrounding HTML.
Resolution order
Configurations are resolved in this order – later sources override earlier ones, via a deep merge at the key level:
- BookingJs default values
- appConfig / muiTheme / fcConfig, passed directly to init()
- window.timumBookingConfig.appConfig / .muiTheme / .fcConfig – applies to all instances on the page
- window.timumBookingConfig[rootElId] – applies only to the instance with the matching appConfig.rootElId
- URL parameters (highest priority)
window.timumBookingConfig = {
// Applies to every BookingJs instance on the page
appConfig: { culture: 'de' },
muiTheme: { palette: { primary: { main: '#337ab7' } } },
// Only for the instance with this rootElId (e.g. a provider channel snippet)
'bookingjs-dd8d32cc-b53b-4ab4-af52-41325000592b': {
appConfig: { height: 700 },
muiTheme: { palette: { primary: { main: '#ff5722' } } },
},
};
Configuring provider channel snippets individually
Every snippet generated in the timum interface represents a provider channel and already carries rootElId: "bookingjs-<provider-channel-uuid>" in its init() call. Use exactly this key in window.timumBookingConfig to configure a single snippet without touching the generated code.
Timing:
React component:
Complete example
timum.init({
// Referencing
ref: 'ihre-ressourcen-referenz',
prdRefs: ['besichtigung', 'beratung'],
channelKey: 'RESOURCE_PUBLIC',
// Display
height: '600px',
calendarFrontend: 'detailsListView',
culture: 'de',
// Behavior
allowCloseOnBooking: true,
constrainDialogsToContainer: true,
hideTimumFooter: true,
// Customer identification
pData: {
platform: 'onoffice',
personId: '12345'
},
// Callbacks
callbacks: {
createBookingSuccessful: ({ timeslot, data }) => {
console.log('Buchung erfolgreich:', timeslot);
// Analytics, redirect, etc.
},
fetchingBookablesSucceeded: ({ bookables }) => {
console.log('Termine geladen:', bookables);
}
}
});
