> For the complete documentation index, see [llms.txt](https://docs.flip.to/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flip.to/docs/integrations/booking-engines/vendors/reztrip.md).

# RezTrip

Adding Flip.to to your RezTrip booking engine is done in just two steps.

{% hint style="warning" %}
**Before you begin:** you'll need your **Flip.to companyCode**, which you should have received by email. If not, ask our [Customer Success team](/docs/support/customer-success.md).
{% endhint %}

***

## Step 1: Booking engine snippet

This is the first of two snippets to add to your RezTrip booking engine.

* Copy and paste the snippet below into **\<head> tag** of the booking engine
* Replace **`XX`** with your **Flip.to** **companyCode** (be sure to keep the single quotes)
* Replace **`YY`** with your **RezTrip property code** (be sure to keep the single quotes)

```javascript
<!-- Flip.to - Booking Engine Integration -->
<script>
!function(b,e){(b[e]=b[e]||[]).push({flipto:{
bookingEngine: 'RezTrip',
companyCode: 'XX',
code: 'YY'
}})}(window,'fliptoDataLayer');
</script>
<script async src='https://integration.flip.to/K2X4KDP'></script>
<!-- Flip.to - End Booking Engine Integration -->
```

***

## Step 2: Confirmation page snippet

This snippet should be added only to your RezTrip confirmation page.

{% hint style="info" %}
Please note, the confirmation page will include both the booking engine snippet and the confirmation page snippet, and the order is unimportant.
{% endhint %}

* Copy and paste the snippet below into **\<head> tag** of the confirmation page
* Replace **`XX`** with your Flip.to **companyCode** (be sure to keep the single quotes)
* Replace **`YY`** with your **RezTrip property code** (be sure to keep the single quotes)

```javascript
<!-- Flip.to - Confirmation Page -->
<script>
var guestDetails = document.querySelectorAll('[headers=summary_reservation_guest_details]');
var fullNameAndEmail = guestDetails[0].innerText.split("\n");
!function(n,e,w){
w.eventData={category:'Booking_Engine',action:'Load',value:w.amount};
(n[e]=n[e]||[]).push({flipto:w,event:'flipto.confirmation.load'});
}(window,'fliptoDataLayer',
{
bookingEngine: 'RezTrip',
companyCode: 'XX',
code: 'YY',
confirmation: quoteList[0].confcode,
first: fullNameAndEmail[0].trim().split(" ")[0],
last: fullNameAndEmail[0].trim().split(" ")[1],
email: fullNameAndEmail[1].trim(),
startDate: quoteList[0].sd,
endDate: quoteList[0].ed,
type: quoteList[0]['rt'],
rateCode: quoteList[0]['rc'],
language: 'en',
currency: quoteList[0].cc,
amount: rtTOTALCOST,
addonAmount: rtADDONVALUE_0
});
</script>
<!-- Flip.to - End Confirmation Page -->
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.flip.to/docs/integrations/booking-engines/vendors/reztrip.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
