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:

ArgumentDescription
appConfigObject with all behavior options: references, callbacks, localization, form fields, etc. (this page)
muiThemeMUI theme object for the appearance (PRO, see Styling)
fcConfigFullCalendar options – only relevant when calendarFrontend is set to fullCalendar (see below)

Referencing options

OptionTypeDescription
refstring | string[]Reference to the resource(s). Required field (or tslRefs)
tslRefsstring | string[]References to specific appointments
prdRefsstring | string[]References to specific products, for filtering
channelKeystringChannel type (RESOURCE_PUBLIC, RESOURCE_EXCLUSIVE, etc.)
platformstringPlatform part of the reference (hardcoded)
prvUuidstringProvider UUID part of the reference (hardcoded)

Display options

OptionTypeDescription
heightstringHeight of the widget (default: 500px)
calendarFrontendstringDisplay mode (see below)
culturestringLanguage (de, en, fr, es, it)
allResourcesOptionboolean"All resources" option for multi-resource

calendarFrontend values

  • fullCalendar - FullCalendar view
  • detailsFullCalendar - FullCalendar with resource details
  • pureListView - Pure list view
  • detailsListView - List view with details
  • condensedView - Condensed view
  • detailsCondensedView - Condensed view with details

Details variants:

The details variants show additional information about the resource, such as description, external URL, and public consultant information (if the channel allows it).

Behavior options

OptionTypeDescription
hoststringServer URL (https://www.timum.de or https://staging.timum.de)
allowCloseOnBookingbooleanConfirmation view can be closed after a successful booking
allowCloseOnCancelbooleanCancellation view can be closed
constrainDialogsToContainerbooleanConstrain dialogs to the container (instead of fullscreen)
hideTimumFooterbooleanHide "Powered by timum" (PRO)
hiddenForAnonymousbooleanHide widget when there is no customer ID
sendCustomValuesInMessagebooleanSend custom fields as a message

Customer identification

OptionTypeDescription
pDataobjectCustomer identification (platform, personId)

Advanced options

OptionTypeDescription
callbacksobjectEvent callbacks (see the Callbacks page)
postMessageTargetstringURL for postMessage events (iframe scenario)
fieldsobjectForm field configuration (PRO)
localizationobjectText 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:

OptionTypeDescription
largeViewstringView for screen widths above 601px
smallViewstringView for screen widths below 601px
useCustomTimumCssbooleanSet to false to disable timum's FullCalendar CSS overrides
Configure FullCalendar
timum.init(
  {
    ref: 'ihre-ressourcen-referenz',
    calendarFrontend: 'fullCalendar',
  },
  undefined,
  // Third argument: FullCalendar options
  {
    largeView: 'dayGridMonth',
    smallView: 'listWeek',
  }
);

Note:

FullCalendar is not based on MUI and therefore ignores the muiTheme object.

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:

  1. BookingJs default values
  2. appConfig / muiTheme / fcConfig, passed directly to init()
  3. window.timumBookingConfig.appConfig / .muiTheme / .fcConfig – applies to all instances on the page
  4. window.timumBookingConfig[rootElId] – applies only to the instance with the matching appConfig.rootElId
  5. URL parameters (highest priority)
Global configuration
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:

window.timumBookingConfig must be set before BookingJs initializes – later changes are not picked up. The keys appConfig, muiTheme, and fcConfig are reserved and must not be used as rootElId.

React component:

The React component TimumBooking deliberately ignores window.timumBookingConfig – React users pass appConfig, muiTheme, and fcConfig directly as props.

Complete example

Extensive configuration
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);
    }
  }
});

Related topics