# List of variables

Here is a **list of variables** that can be used for **emails templates**, **documents templates** or for the content of the iCal export. You will see the list of variables below :

- the email templates table in [HBook > Emails](../hbook-documentation/email-settings.md)
- the document templates table in [HBook > Documents](../hbook-documentation/documents.md)
- the settings for the iCal export calendar in [HBook > ICal synchronization > Export settings](../hbook-documentation/ical-import-export-and-synchronization.md#ical-export-settings)

For any new field you add for the [customer and booking details form](../hbook-documentation/forms-customization/customer-and-booking-details-form.md), you will see a new variable.

- Any variable associated to the **Reservation** starts with "\[resa\_...\]"
- Any variable associated to the **Customer** starts with "\[customer\_...\]”

* * *

<a id="variables-for-the-reservation-details"></a>

## Variables for the reservation details

Here are some information about the **reservation variables** you can use:

- **\[resa\_id\]**: the ID of the reservation
- **\[resa\_ids\]**: for multiple accommodation bookings, this is the list of ids of the individual reservations
- **\[resa\_alphanum\_id\]**: the random alphanumeric reservation number of the reservation
- **\[resa\_invoice\_id\]**: the invoice id of the reservation
- **\[resa\_check\_in\]**: the check-in date of the reservation
- **\[resa\_check\_out\]**: the check-out date of the reservation
- **\[resa\_number\_of\_nights\]**: the number of nights of the reservation
- **\[resa\_accommodation\]**: the name of the type of accommodation booked (ex : "Double room")
- **\[resa\_accommodation\_num\]**: the number/name of the accommodation booked(ex: "201" if it is the Double Room 201)
- **\[resa\_adults\]**: the number of adults
- **\[resa\_children\]**: the number of children
- **\[resa\_persons\]**: the number of persons
- **\[resa\_admin\_comment\]**: the content of the content displayed in "Comment" section of the **Reservations**
- **\[resa\_extras\]**: the list of extras selected
- **\[resa\_coupon\_code\]**: the coupon code validated
- **\[resa\_coupon\_amount\]**: the amount of the coupon validated
- **\[resa\_invoice\_table\]**: displays an invoice table with all price breakdown. Please note that it can be used only with **HTML** emails or documents.
- **\[resa\_price\]**: the total price of the reservation
- **\[resa\_accom\_list\_price\]**: the accommodation list price. It is the price before any discounts or fees applied to the accommodation price.
- **\[resa\_accom\_list\_price\_per\_night\]**: the accommodation list price, divided by the number of nights. It is the price before any discounts or fees applied to the accommodation price that is then divided by the number of nights.
- **\[resa\_deposit\]**: the deposit amount as set in [Deposit settings](../hbook-documentation/payment-settings.md#deposit-settings)
- **\[resa\_price\_minus\_deposit\]**: the price of the reservation once the deposit is deducted
- **\[resa\_paid\]**: the amount already paid
- **\[resa\_payments\_history\_table\]**: displays a table with the payments' history. Please note that it can be used only with **HTML** emails.
- **\[resa\_remaining\_balance\]**: the outstanding amount that has not been paid yet
- **\[resa\_bond\]**: the security bond amount as set in [Security bond settings](../hbook-documentation/payment-settings.md#security-bond)
- **\[resa\_price\_including\_bond\]**: the price of the reservation with security bond included
- **\[resa\_deposit\_including\_bond\]**: the deposit amount, to which is added the security bond amount
- **\[resa\_remaining\_balance\_including\_bond\]**: the remaining amount to be paid, to which is added the security bond amount
- **\[resa\_payment\_gateway\]**: the payment gateway used for the payment (Stripe, PayPal…)
- **\[resa\_origin\]**: the origin of the reservation (website, iCal calendar name)
- **\[resa\_ical\_origin\_url\]**: the URL of the reservation details in the origin platform (available only for platforms that share this URL, as AirBnb, TripAdvisor, Campsites.co.uk, etc.)
- **\[resa\_received\_on\_date\]**: the date of reception of the reservation
- **\[resa\_received\_on\]**: the date and time of reception of the reservation
- **\[resa\_x\_days\_before\_check\_in\]**: the date corresponding to "x" days before the check-in date. You would replace "x" with the number of days. For example \[resa\_21\_days\_before\_check\_in\]
- **\[resa\_x\_days\_after\_check\_in\]**: the date corresponding to "x" days after the check-in date. You would replace "x" with the number of days. For example \[resa\_2\_days\_after\_check\_in\]
- **\[resa\_x\_days\_before\_check\_out\]**: the date corresponding to "x" days before the check-out date. You would replace "x" with the number of days. For example \[resa\_1\_days\_before\_check\_out\]
- **\[resa\_x\_days\_after\_check\_out\]**: the date corresponding to "x" days after the check-out date. You would replace "x" with the number of days. For example \[resa\_14\_days\_after\_check\_out\]
- **\[today\_date\]**: the date of the current day

<a id="variables-for-the-customer-details"></a>

## Variables for the customer details

Variables are usually straightforward, for example :

- **\[customer\_id\]** : id of the customer
- **\[customer\_first\_name\]** : first name of the customer
- **\[customer\_last\_name\]** : last name of the customer
- **\[customer\_email\]** : email of the customer
- ...

<a id="variables-for-payment-links"></a>

## Variables for payment links

- **\[payment\_link\_total\_price\]** : a payment link with the total price as amount to pay
- **\[payment\_link\_total\_price\_including\_bond\]** : a payment link with the total price as amount to pay, including the security bond as set in [Security bond settings](../hbook-documentation/payment-settings.md#security-bond)
- **\[payment\_link\_deposit\]** : a payment link with the deposit amount to pay, as set in [Deposit Settings](../hbook-documentation/payment-settings.md#deposit-settings)
- **\[payment\_link\_deposit\_including\_bond\]** : a payment link with the deposit amount to pay, including the security bond
- **\[payment\_link\_remaining\_balance\]** : a payment link with the outstanding amount that has not been paid yet, as amount to pay
- **\[payment\_link\_remaining\_balance\_including\_bond\]** : a payment link with the outstanding amount that has not been paid yet, including the amount of the security bond, as amount to pay
- **\[payment\_link\_bond\]** : a payment link with the security bond amount to pay, as set in [Security bond settings](../hbook-documentation/payment-settings.md#security-bond)
- **\[payment\_link\_custom\_amount-xx.xx\]** : a payment link with a custom amount to pay
- \[**payment\_link\_no\_payments\]** : a payment link for updating/providing a payment method. No charge is done. This is only available with Stripe payment gateway.