Entity Referencing

This page explains how to reference BookingJs, the timum booking widget, with resources and channels – via channel, resource, or product reference.

Overview

There are three different types of references you can pass to the widget. Each has different effects on the appointments displayed.

Channel Reference

Resource Channels are entities in timum, each of which stores a configuration that changes the booking experience for customers. Each individual resource has four channels that users can distribute to their customers via a link.

Channel Reference
timum.init({ ref: 'channel-reference@provider' });

Resource Reference

A reference that points to a resource where the channel is unknown. The default channel (and its corresponding configuration) is used.

Resource Reference
timum.init({ ref: 'resource-reference@provider' });

Resource Reference with channelKey

If you don't have a channel reference but want to use a channel other than the default, you can specify a combination of resource reference and channelKey.

With channelKey
timum.init({
  ref: 'resource-reference@provider',
  channelKey: 'RESOURCE_EXCLUSIVE'
});

Available channelKey values

channelKeyDescription
RESOURCE_PUBLICPublic booking link (default)
RESOURCE_EXCLUSIVEExclusive booking access
RESOURCE_REFERENCEEmbedded booking calendar
CALENDAR_PUBLICWebsite plugin views and overall calendar

Reference Priorities

The following table shows how BookingJs handles different combinations of references:

URL refinit() refchannelKeyBehavior
--ignoredWidget hidden
ResourceRefignoredYESWidget for channelKey
ResourceRefignored-Default channel
-ResourceRef-Default channel
-ResourceRefYESWidget for channelKey
ChannelRefignoredignoredShow channel

Product References (prdRefs)

With prdRefs, you can specify which products (appointment types) are available for the customer to choose from.

With product filter
timum.init({
  ref: 'resource-reference@provider',
  prdRefs: 'besichtigung' // Only show this product
});

// Or multiple products
timum.init({
  ref: 'resource-reference@provider',
  prdRefs: ['besichtigung', 'beratung']
});

Timeslot References (tslRefs)

For scenarios where only specific appointments should be shared, you can use tslRefs.

Specific appointments
timum.init({
  tslRefs: ['timeslot-uuid-1', 'timeslot-uuid-2']
});

Note:

If tslRefs and prdRefs are used together, tslRefs takes priority to ensure that all referenced appointments are bookable.

Multi-Resource Widget

You can also offer multiple resources in a single widget:

Multiple resources
timum.init({
  ref: ['resource-1@provider', 'resource-2@provider', 'resource-3@provider'],
  allResourcesOption: true // Show "All" option
});

For Users

Related Topics