Conflict Rules
This feature is new and will replace the existing conflict checking configuration on dimension in the future.
Overview
Conflict Rules allow you to implement your business rules for reservations, by allowing you restrict your reservations based on rules.
You can create easy rules and more complex rules, using below described operators and functions. You can use fields on the reservation and fields of the related dimension record if you link your rule to a dimension.
The formula itself is where you define the condition for the rule. If the formula evaluates to true, it will result in a conflict. You can use various logical operators such as == (equal), != (not equal), > (greater than), >= (greater than or equal to), < (less than), <= (less than or equal to), CONTAINS, LIKE, NOT, and ISBLANK, STARTSWITH.
Additionally, there are functions available for performing calculations and filtering lists. When linked to a dimension, you can access special variables like overlappingReservations and matchingAvailabilities to further rules for availability checking or double bookings.
You can choose between hard and soft conflicts, where a hard conflict will block the reservation, and a soft conflict will only display a warning. The validation message you provide will be shown to the user to explain why the reservation is not allowed.
By combining operators, functions, and variables, you can create simple or advanced rules to handle conflicts based on specific criteria, such as resource availability, overlapping reservations, and more.
Getting started
As it’s in a first version, you first need to install our latest version 5.9 or later https://gomeddo.atlassian.net/wiki/spaces/BPD/pages/1317240946
Navigate to GoMeddo settings, and enable the setting to enable this new way of conflict checking

After doing so, all conflict checking configured on the dimension itself, are disabled and only the rules will be used from now on.
If you want to limit the number of reservations to which your rules are applied, take a look at Rulesets, Rulesets allow you to group Conflict Rules and filter to which reservations these Conflict Rules are applied.
Creating and editing rules
Go to the "Conflict Rule" tab and click on "New Rule” or select an existing rule from the list.
Please provide a name for this rule. Optionally, link it to a dimension. Mark it as active or inactive. If inactive, the rule will not work or be validated upon save.
Type the formula itself here, using the function and operators in the formula editor.
If the formula is true, it will cause a conflict. You can use the syntax checker to validate your rule.Specify the conflict type: Is it a blocking (hard) conflict or a warning (soft) conflict?
Enter the validation message. This will be shown to the user as the reason why it’s not allowed. If you want to translate the message custom labels can be used in the form of $Label.labelApiName.
Save the rule. If the rule is marked as active, it will be checked for syntax and referenced fields again.
Important is that when the result is true, the reservation will be blocked. This is why we call the rules “Conflict Rules”.

Operators
We will support the following logical operators:
Operation | Description | Example |
|---|---|---|
== | Checks if two values are equal. Returns true if they are, false otherwise. |
|
!= | Checks if two values are not equal. Returns true if they are not, false otherwise. |
|
> | Checks if the left value is greater than the right value. Returns true if it is, false otherwise. |
|
>= | Checks if the left value is greater than or equal to the right value. Returns true if it is, false otherwise. |
|
< | Checks if the left value is less than the right value. Returns true if it is, false otherwise. |
|
<= | Checks if the left value is less than or equal to the right value. Returns true if it is, false otherwise. |
|
- | Subtracts two numbers. Can also be used to subtract a number of days from a Date/Datetime, And to subtract two Dates/Datetimes to get the number of days between them. |
Getting the duration of the reservation
|
+ | Adds two numbers. Can also be used to add a number of days to a Date/Datetime. |
|
/ | Divides two numbers. |
|
* | Multiplies two numbers. |
|
<Text> CONTAINS <Text> | Checks if a text value contains a different bit of text. Returns true if it does, false otherwise. |
|
<List> CONTAINS <Value> | Checks if a list contains a value. Returns true if it does, false otherwise. |
|
<List> CONTAINS <List> | Checks if a list contains all the entries in the second list. Returns true if it does, false otherwise. |
|
STARTSWITH | Checks if a text value starts with the specified substring. Returns true if it does, false otherwise. |
|
LIKE | Performs a pattern matching comparison (RegEx) between a text value and a specified pattern. Returns true if the pattern matches, false otherwise. |
Also see: https://help.salesforce.com/s/articleView?id=sf.customize_functions_regex.htm&type=5 |
NOT | Negates the Boolean value of an expression. Returns true if the expression is false, false if it is true. |
|
ISBLANK | Checks if a field or expression is blank (empty) or null. Returns true if it is blank, false otherwise |
|
[index] | Array index operator. Returns the element at the specified index in a list (starting with zero). For example |
|
Functions
Rules serve different functions, with some of them returning numerical values that you can use in your formula.
Function | Description | Example |
|---|---|---|
COUNT(list) | Counts the number of items in the list and returns it as a number |
|
FILTER(list AS variableName, condition) | Loops over a list and returns only the items that pass the condition as a new list. You can reference the element being processed with variableName. |
|
FOREACH(list AS variableName, expression) | Loops over a list and returns a list of the result of the expression for each entry in the original list. |
|
IF(condition, then, else) | When the value of the condition is true, return the value of then, otherwise return the value of else. |
|
SUM(listofnumbers) | Returns the sum of all the numbers in the list. |
|
SUM(listofrecords, numberfield) | Returns the sum of all the number fields values. |
|
MIN(listofnumbers) | Returns the lowest number in the list. |
|
MIN(listofrecords, numberfield) | Returns the lowest of all the number fields values. |
|
MAX(listofnumbers) | Returns the highest number in the list. |
|
MAX(listofrecords, numberfield) | Returns the highest of all the number fields values. |
|
SPLIT(textToSplit) | Returns a list of the text split by semicolons so test;test1 to [test, test1] |
|
SPLIT(textToSplit, seperator) | Returns a list of the text split by the given seperator |
|
NOW() | Returns the current datetime. |
|
TODAY() | Returns the current date |
|
IsNotAvailable() | Returns true if in basic availability checking the dimension is not available. Taking into account inheritance and unavailabilities. It is the equivalent of |
|
You can combine the functions to create more in-depth rules.
COUNT(FILTER(records AS record, record.number_field__c > 5)) > 0-> returns TRUE if at least one record has a value higher than 5
Rule linked to dimension
When you link your rule to a dimension, two special variables will become available for use in the formula.
overlappingReservations
overlapping reservations with the reservation being checkedCOUNT(overlappingReservations) > 0
This rule would make sure that no overlapping reservation are allowedmatchingAvailablilities
Allowing you to use the availability or unavailability of the related dimension in your formula.
This list ofB25__Availability__crecords is ordered from most important to least important.COUNT(matchingAvailabilities) == 0
Reservation not allowed when there is no availability or if there are unavailabilities.overlappingSiblings
overlapping reservations from reservations which are under the same parent resource are being checkedCOUNT(overlappingSiblings) > 0
This rule would make sure that no overlapping reservation are allowed in other resources belonging to the same parent resource.
(currently only resources have a hierarchy, so only works for the resources dimension)dimensionElement
Will contain the name of the dimensionField/dimensionJunction that was used to link the reservation to the dimensionRecord the rule is currently running on. For example if you have a reservation with both the contact field filled in and a contact junction filled in the rule will be evaluated for both the contact linked through the field and for the contact linked through the junction. During the evaluation for the field this will have the value B25__Contact__c and then when being evaluated for the contact linked through the junction it will have the value B25__Reservation_Contact__c. This variable can also be accessed on overlapping reservations to see how they are linked to this record.junctionIndex
If the link to the dimension record is through a junction this variable will contain the index of the junction that is currently being evaluated. so junctionRelationshipName[junctionIdex] will get you that junction. This can be used to get for example a checkbox field on that junction to determine if that junction is relevant for conflict checking. This variable can also be accessed on each overlapping reservation for the same purpose.
Use custom permission in a rule
You can also reference and check the permissions of the running user in your rule.
By adding: $Permission.Custom_Permission_NameCOUNT(overlappingReservations) > 0 and $Permission.B25__ALLOW_DOUBLE_BOOKING == false
Comments
Rule formulas allow for limited comments. Any line that starts with // will be ignored.
Example rules
Take a look at our example Conflict Rules
Features not supported by Conflict Rules
Rules cannot use the Start and end date time fields in time slot generation as of now, we’re looking into if we can add support. For now we recommend running different rules for these scenarios.
“Unshared conflict checking” Shared vs Unshared Conflict Checking
Timeslot picker Time Slot Picker (for record pages)