Context: Resources in Calpendo can be setup with predefined slots. If they apply, when a booker makes a booking within a predefined slot, the booking form times will change to match the predefined slot. However, the user can still override that and choose their own time. If you add a Calpendo rule called the 'Predefined slots' rule, you can take it a step further and reject the booking if they attempt to use a time period other than what the predefined slot allows. But what if you have the following situation where you want to allow users to set their own times within a predefined slot, known as a partial slot, but you want to warn them that they should be using the full slot?
Suitable for: Users with admin level access. This recipe is one which could also be adapted for other eventualities.
Objective: We will be adding predefined slots to a resource and then customising a Predefined slots rule in order to warn a user they should be using the full slot and there may be consequences!
Steps:
- Let's start with a resource to which we wish to add predefined slots. In the Admin menu select Resource Editor and then click open up the list of resources and click on the required resource
- Select Edit and then next to Enable pre-defined time slots tick the check box
- A new tab, called Time Slots, will appear below the main attributes for the resource
- Click on the first day for which you want to apply a time slot and change the 'Any times allowed' drop down box to 'Specify times' and enter the first time slot you would like to add, finally click the Add button
- Calpendo will then suggest the next time slot you can add based on the first one but this can be amended as well, if you want to use this just click the Add button again and so on.
- Carry on adding time slots until you are finished for the day
- Move onto the next day you need to apply time slots for and this time when you click on the drop down box for 'Any times allowed' you will see an additional option to copy the slots through from the previous day where you set them up. This will allow you to speed through creating the rest of the slots
- Continue through the days either adding time slots or using those created for a previous day.
- Save the resource. At this point when a user makes a booking it will pre-fill to the extent of the predefined slot but this can be overridden
- Now click on Admin and go to Rule Editor
- Click Create and with the drop down box select 'Predefined Slots Rule'
- Supply a name for the rule such as 'Warn if not using full pre-defined slots'
- Under the Rule tab below change the Reject or warn when exceeded to 'Warn'
- Change Allow partial slot usage to 'true'
- In Message to show add a warning message such as 'Bookings should preferably be for the full predefined slot - an administrator may speak with you'
- Use the Applies To, and Does Not Apply To, to specify who this rule will and will not apply to.
Modifications: Depending on how your costing formulas are created within your Calpendo, it could also be possible to warn but allow that partial slot usage, but still charge the user for the full predefined slot