Example Conflict Rules
Basic Availability checking
For basic availability checking, you can use the built-in formula IsNotAvailable()
. This will return true
if the reservation is linked to any record (of the rule’s Dimension) that is not available at that time. For example, consider the following rule:
Dimension | Staff |
---|---|
Conflict Type | Hard |
Formula |
|
This rule will result in an error if the reservation is linked to a Staff record which is not available.
Soft/Hard conflicts based on user permissions
This example shows how to grant permissions to certain users, allowing them to make reservations outside of opening times with warnings (soft conflicts) instead of errors (hard conflicts).
If you are using the time slot picker keep in mind that it shows slots with soft conflicts, but not with hard conflicts. You can use these rules to show more options to employees than to customers for example.
For this example, we will use the ‘Allow Double Booking’ custom permission included in GoMeddo, but you can also create your own: https://help.salesforce.com/s/articleView?id=sf.custom_perms_overview.htm&type=5
Create a conflict rule with the Conflict Type set to HARD. Give it the following formula:
IsNotAvailable() AND $Permission.ALLOW_DOUBLE_BOOKING != true
Create a conflict rule with the Conflict Type set to SOFT. Give it the following formula:
IsNotAvailable() AND $Permission.ALLOW_DOUBLE_BOOKING == true