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.
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.
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.
timum.init({
ref: 'resource-reference@provider',
channelKey: 'RESOURCE_EXCLUSIVE'
});
Available channelKey values
| channelKey | Description |
|---|---|
RESOURCE_PUBLIC | Public booking link (default) |
RESOURCE_EXCLUSIVE | Exclusive booking access |
RESOURCE_REFERENCE | Embedded booking calendar |
CALENDAR_PUBLIC | Website plugin views and overall calendar |
Reference Priorities
The following table shows how BookingJs handles different combinations of references:
| URL ref | init() ref | channelKey | Behavior |
|---|---|---|---|
| - | - | ignored | Widget hidden |
| ResourceRef | ignored | YES | Widget for channelKey |
| ResourceRef | ignored | - | Default channel |
| - | ResourceRef | - | Default channel |
| - | ResourceRef | YES | Widget for channelKey |
| ChannelRef | ignored | ignored | Show channel |
Product References (prdRefs)
With prdRefs, you can specify which products (appointment types) are available for the customer to choose from.
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.
timum.init({
tslRefs: ['timeslot-uuid-1', 'timeslot-uuid-2']
});
Note:
Multi-Resource Widget
You can also offer multiple resources in a single widget:
timum.init({
ref: ['resource-1@provider', 'resource-2@provider', 'resource-3@provider'],
allResourcesOption: true // Show "All" option
});
