# Booking rules

You will find the page of the **Booking rules** in the menu **HBook > Booking rules.** Booking rules are optionals. There are 5 types of Booking rules.

![booking-rules.jpg](./attachments/booking-rules.jpg)

1. [Check-in days](#allowed-check-in-out): define on which days customers are allowed to check-in.
2. [Check-out days](#allowed-check-in-out): define on which days customers are allowed to check-out.
3. [Minimum stays](#minimum-maximum-stay): define the minimum length of a stay.
4. [Maximum stays](#minimum-maximum-stay): define the maximum length of a stay.
5. [Advanced booking rules](#advanced-booking-rules): define advanced rules to create compulsory settings for stays, special rates, discounts or coupons.

* * *

<a id="allowed-check-in-and-check-out-days"></a>

## Allowed check-in and check-out days

With the **Allowed check-in days** and **Allowed check-out days**, you can indicate on which days your customers can arrive and leave. It can be set according to season and accommodation.

![booking-rules-changeover.png](./attachments/booking-rules-changeover.png)

**Examples of set-up for the allowed check-in and checkout days**

> [!NOTE]
> **Example 1 - Changeover day on Saturday all year round for all accommodation types**
> ![rules-example1.png](./attachments/rules-example1.png)

> [!NOTE]
> **Example 2 - Different check-in and check-out days depending on seasons**
> ![rules-example2.png](./attachments/rules-example2.png)

* * *

<a id="minimum-and-maximum-stay"></a>

## Minimum and maximum stay

With the **Minimum stay** and **Maximum stay**, you can indicate the minimum number of nights and the maximum number of nights allowed. It can be set according to season and accommodation.

![booking-rules-length.png](./attachments/booking-rules-length.png)

![booking-rules-max-length.png](./attachments/booking-rules-max-length.png)

**Examples of set-up for minimum and maximum stays**

> [!NOTE]
> **Example 1 - Seasonal minimum stays**  
> Different minimum stays depending on the season (7 nights minimum stay on "Summer" season and 2 nights the rest of the year)
> ![rules-example3.png](./attachments/rules-example3.png)

> [!NOTE]
> **Example 2 - Different minimum stays according to accommodation type**
> Minimum stay depending on accommodation type and season
> ![rules-example4.png](./attachments/rules-example4.png)

> [!NOTE]
> **Example 3 - Maximum stays**
> ![rules-example5.png](./attachments/rules-example5.png)

* * *

<a id="advanced-booking-rules"></a>

## Advanced booking rules

This is a powerful feature that will enable you to define settings conditionally. It has two different aims.

- to define the conditions for various booking situation that can not be set using only the settings above
- to define the conditions of discounts and coupons

There are 5 types of advanced rules:

1. **Compulsory:** if the booking request has a check-in day that falls in one of the check-in days set in the rule, then the booking request must comply with the rule.
2. **Special rate:** if the booking request follows the rule, a **special rate** is applied. You will indicate the rate for that rule in the **Rates** page
3. **Compulsory and special rate:** this rule is **both** a compulsory rule and a special rate rule.
4. **Discount:** if the booking request follows the rule, then a **discount** is applied. You will indicate the type of discount (percentage or fixed amount) and its value in [**HBook > Rates > Discount**](../pricing-settings/rates.md#discounts).
5. **Coupon :** if the booking request follows the rule and the customer enter a valid coupon, a discount is applied. You will indicate the type of discount (percentage or fixed amount) and its value in [**HBook > Rates > Coupons**](../pricing-settings/rates.md#coupons).

<a id="step-1-create-an-advanced-booking-rule"></a>

#### Step 1: Create an advanced booking rule

To create an advanced rule, click on **Add rule**.

![create-booking-rules.png](./attachments/create-booking-rules.png)

<a id="step-2-set-the-attributes-of-the-new-rule"></a>

#### Step 2: Set the attributes of the new rule

![advanced-rule-1.png](./attachments/advanced-rule-1.png)

1. Enter the **name** of the rule
2. Select the **rule type**
3. Select one or several **check-in** day(s)
4. Select one or several **check-out** day(s)
5. Enter a **minimum stay** if applicable
6. Enter a **maximum stay** if applicable
7. Select for which **accommodation type** this rule is for. This parameter will be displayed only for the advanced booking rules of type “Compulsory” and “Compulsory and Special rate”. For the other rule types, the seasons, and accommodation types are selected directly when entering the rates in the **Rates** page.
8. Select for which **season** this rule is for. This parameter will be displayed only for the advanced booking rules of type “Compulsory” and “Compulsory and Special rate”. For the other rule types, the seasons, and accommodation types are selected directly when entering the rates in the **Rates** page.
9. Click **Save**

**Examples of advanced booking rules**

> [!NOTE]
> **Example 1 - Fixed length stay for specific check-in day (Compulsory check-out on following Friday if check-in on Monday)**
> ![rules-example6.png](./attachments/rules-example6.png)

> [!NOTE]
> **Example 2 - Discounts for more than 10-night stays and for more than 30-night stays**
> ![rules-example7.png](./attachments/rules-example7.png)

> [!NOTE]
> **Example 3 - Coupons with conditions: only valid for stays between 3 and 7 nights**
> ![rules-example8.png](./attachments/rules-example8.png)