Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
minLevel1
maxLevel3
outlinefalse
typelist
printablefalse

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.

...

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 beta, you first need to install our latest version 5.6 or later Install the latest version
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.

Creating and editing rules

Go to the "Booking Restriction Rule" tab and click on "New Rule” or select an existing rule from the list.

...

Note

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

==

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.

CONTAINS

Checks if a text value contains a specified substring. Returns true if it does, false otherwise.

LIKE

Performs a pattern matching comparison between a text value and a specified pattern. Returns true if the pattern matches, false otherwise.

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.

Functions

Rules serve different functions, with some of them returning numerical values that you can use in your formula.

...

  • 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.

  • overlapping_reservations
    overlapping reservations with the reservation being checked
    COUNT(overlappingReservations) > 0
    This rule would make sure that no overlapping reservation are allowed

  • matchingAvailablilities
    Allowing you to use the availability or unavailability of the related dimension in your formula.
    COUNT(matchingAvailabilities) == 0
    Reservation not allowed when there is no availability or if there are unavailabilities.

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_Name
COUNT(overlapping_reservations) > 0 and $Permission.B25__ALLOW_DOUBLE_BOOKING == false

Examples rules:

Note

Important is that when the result is true, the reservation will be blocked. This is why we call the rules “Conflict Rules”.

Basic rules

Reservation not allowed when title matches invalid.

...

COUNT(matchingAvailabilities) == 0

More advanced rules

  • Reservation not allowed when overlapping with other reservations, not taking into account reservation with status “Canceled” AND status “Temporary”

...

COUNT(overlapping_reservations) > 0 and $Permission.B25__ALLOW_DOUBLE_BOOKING == false

Not supported in this beta: