# Metafields

***

### Metafields and their use

Metafields are dynamic fields that can be used through the guest journey. In example, do you have a doorlock with a changing door code? A metafield would come in handy. Set a door code metafield on the reservation and adjust this on the reservation to show the correct code.&#x20;

### Connected objects

A metafield is always connected to a object / resource. Our metafields are connected to:&#x20;

* **Listings** - Are you in need for specific data that varies per listing? Metafields come into play. Example use cases:&#x20;
  * Different weather URL's per listing
  * Different Whatsapp URL's per listing
* **Reservations** - Are you in need for reservation sepcific data? Metafields come into play. Example use cases for reservations are:&#x20;
  * CheckIn codes
  * External Checkin URL
  * Booking URL's on external platforms.&#x20;

The above-mentioned use cases are examples, ofcourse the HolidayHero application supports more use-cases.&#x20;

### Apply on Create

Metafields can be very handy within reservations and listings, if you deal with a large amount of reservations or listings, it can become a bit of work. To reduce your workload, metafields can be added automatically, with the *Apply on Create* setting.&#x20;

<figure><img src="/files/q8S7BngY74P0bmbzC6bh" alt=""><figcaption></figcaption></figure>

When activated, the metafield will automatically be added to new reservations and listings. **Only new reservations and listings.**&#x20;

### Metafields usage

Metafields can be used throughout the application in all guest facing communcation. From touchpoints to the guest application itself. When creating guest-facing content you can insert metafieds by using the `Insert field code` button. From here you can select a manual created metafield or a default metafield.&#x20;

**Insert field code button:**

<figure><img src="/files/zFt0ustb5yC6KHBpyuoC" alt=""><figcaption></figcaption></figure>

**Insert Field code Modal:**

<figure><img src="/files/keJltyEllxhrZHQvJvbS" alt=""><figcaption></figcaption></figure>

#### Default Metafields

By default we offer a few metafields that can help you personalize the stay. Below an overview of the default metafields and their availability.&#x20;

<table><thead><tr><th width="214">Field</th><th width="330">Field Code</th><th>Availability</th></tr></thead><tbody><tr><td>Reservation Number</td><td><code>{{ reservation.number }}</code> </td><td>Private stages only</td></tr><tr><td>Reservation Check-in Date</td><td><code>{{ reservation.checkInDate }}</code></td><td>Private stages only</td></tr><tr><td>Reservation Check-Out Date</td><td><code>{{ reservation.checkOutDate }}</code></td><td>Private stages only</td></tr><tr><td>Reservation Check-in Time</td><td><code>{{ reservation.checkInTime }}</code></td><td>Private stages only</td></tr><tr><td>Reservation Check-Out Time</td><td><code>{{ reservation.checkOutTime }}</code></td><td>Private stages only</td></tr><tr><td>Listing name</td><td><code>{{ listing.name }}</code></td><td>Private / Public stages</td></tr><tr><td>Listing Address Line 1</td><td><code>{{ listing.address.line1 }}</code></td><td>Private / Public stages</td></tr><tr><td>Listing Address Line 2</td><td><code>{{ listing.address.line2 }}</code></td><td>Private / Public stages</td></tr><tr><td>Listing Address Zipcode</td><td><code>{{ listing.address.zipcode }}</code></td><td>Private / Public stages</td></tr><tr><td>Listing Address City</td><td><code>{{ listing.address.city }}</code></td><td>Private / Public stages</td></tr><tr><td>Listing Address  Region</td><td><code>{{ listing.address.region }}</code></td><td>Private / Public stages</td></tr><tr><td>Listing Address Country</td><td><code>{{ listing.address.country }}</code></td><td>Private / Public stages</td></tr><tr><td>Listing Address Latitude</td><td><code>{{ listing.address.latitude }}</code></td><td>Private / Public stages</td></tr><tr><td>Listing Address Longitude</td><td><code>{{ listing.address.longitude }}</code></td><td>Private / Public stages</td></tr><tr><td>Listing Wifi network</td><td><code>{{ listing.wifi.network }}</code></td><td>Private / Public stages</td></tr><tr><td>Listing Wifi password</td><td><code>{{ listing.wifi.password }}</code></td><td>Private / Public stages</td></tr><tr><td>User First name</td><td><code>{{ user.firstName }}</code></td><td>Private stages only</td></tr><tr><td>User Last  name</td><td><code>{{ user.lastName }}</code></td><td>Private stages only</td></tr><tr><td>User Email</td><td><code>{{ user.email }}</code></td><td>Private stages only</td></tr><tr><td>User Phone</td><td><code>{{ user.phone }}</code></td><td>Private stages only</td></tr><tr><td>Brand name </td><td><code>{{ brand.name }}</code></td><td>Private / Public stages</td></tr><tr><td>Brand website</td><td><code>{{ brand.website }}</code></td><td>Private / Public stages</td></tr></tbody></table>

#### Custom Metafields

It is possible to add custom metafields. A metafield has a name, type and a default value. The type determines what kind of default value you would need. See an overview of default values below:&#x20;

<table><thead><tr><th width="150">Type</th><th>Description </th></tr></thead><tbody><tr><td><code>Boolean</code></td><td>A <code>true/false</code>comination. </td></tr><tr><td><code>Date</code></td><td>A date in time</td></tr><tr><td><code>Number</code></td><td>A numeric input</td></tr><tr><td><code>Text</code></td><td>A textual input</td></tr><tr><td><code>Time</code></td><td>A time input</td></tr></tbody></table>

See t[his FAQ](#how-can-i-create-a-custom-metafield) on how to create metafields.

***

### Frequently Asked questions:

<details>

<summary>How can I create a custom metafield?</summary>

1. In the menu click on metafields
2. Then click on Create Metafield
3. Give the metafield a name, this name will be used as a shortcode
4. Select the resource / object the metafield should be tied to
5. Select the type of the metafield and the default value.&#x20;

</details>

<details>

<summary>What appens to non filled metafields? </summary>

It can happend that a metafield value is not overwritten on a resource or listing, simply because you forgot to set it. If a guest access the app or receives communication with metafields in it. The text will default to the default value.&#x20;

</details>

<details>

<summary>How to overwrite a metafield in reservations?</summary>

If you wish to overwrite a metafield in the reservation, follow the following steps:&#x20;

1. In the menu click on reservations
2. Then click on the desired reservation
3. Click on the metafields tab.&#x20;
   1. If no metafields are listed, the metafields default values will be used .
   2. If not, existing metafields will be displayed there.&#x20;
4. Click on the `Add metafield` button.&#x20;
   1. A modal will be displayed to select an existing metafield, select one
5. The metafield is added to the reservation, now you need to adjust it.&#x20;
6. Click edit in the reservation metafields overview.&#x20;
7. Provide a new value of this metafield.&#x20;
8. Save the value

</details>

<details>

<summary>How to overwrite a metafield in a listing?</summary>

If you wish to overwrite a metafield in the reservation, follow the following steps:&#x20;

1. In the menu click on listings
2. Then click on the desired lsiting
3. Click on the metafields tab.&#x20;
   1. If no metafields are listed, the metafields default values will be used .
   2. If not, existing metafields will be displayed there.&#x20;
4. Click on the `Add metafield` button.&#x20;
   1. A modal will be displayed to select an existing metafield, select one
5. The metafield is added to the reservation, now you need to adjust it.&#x20;
6. Click edit in the reservation metafields overview.&#x20;
7. Provide a new value of this metafield.&#x20;
8. Save the value

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.holidayhero.com/the-basics/metafields.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
