# Cloudbeds (beta)

Connecting Flip.to with Cloudbeds takes a few clicks and configuring your booking engine requires adding just one snippet of code.

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

***

## How to sign up for Flip.to?

Visit <https://intro.flip.to/by/ed/cloudbeds-customers> and request a demo, or sign up to get started.

## How to connect Cloudbeds for the first time?

{% stepper %}
{% step %}
**Head over to Integrations**

Sign into [your Flip.to account](https://manage.flip.to/) and navigate to **Platform → Mission Control** or **Account Settings → Integrations**
{% endstep %}

{% step %}
**Click on Cloudbeds**

You'll find it in the **Booking Engines** section.
{% endstep %}

{% step %}
**Click Connect**

You'll be prompted to sign into your Cloudbeds account and you will then receive your API key.
{% endstep %}

{% step %}
**Next, sign in to your Cloudbeds account**

Open the profile menu found in the top-right corner and look for **Settings**.

<figure><img src="/files/Zi0d0GcwhknTkONpflWz" alt="" width="227"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Go to Settings**

Click on **Booking Engine** on the left, then the **Customize** tab.

<div data-full-width="true"><figure><img src="/files/zCjI4s1NPeN3GfiohXdL" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Add the Flip.to snippet**

Modify the following snippet to include your unique IDs for `COMPANY_CODE` and `PROPERTY_CODE` and paste it into the **Javascript** section.

```javascript
<!-- Flip.to - Booking Engine Integration -->
<script>
!function(w,f){
    var COMPANY_CODE = 'CHANGE_ME';
    var PROPERTY_CODE = 'CHANGE_ME';

    w.addEventListener("on-booking-engine-ready", bookingEngineReadyListener);            
    function bookingEngineReadyListener(e) {
        // Flipto Every Page Snippet
        (w[f]=w[f]||[]).push({flipto:{
            bookingEngine: 'cloudbeds',
            companyCode: COMPANY_CODE,
            code: PROPERTY_CODE,
            language: document.documentElement.lang
        }, event: 'flipto.configuration.load'});

        // Set up Confirmation Page handler
        if (e && e.detail && e.detail.eventSystem) {
            e.detail.eventSystem.addEventListener("reservation-created", reservationCreatedListener);
        }
    };

    function reservationCreatedListener(e) {
        // Flipto Confirmation Page Snippet
        (w[f]=w[f]||[]).push({flipto:{
            bookingEngine: 'cloudbeds',
            companyCode: COMPANY_CODE,
            code: PROPERTY_CODE,
            confirmation: e.booking_id,
            first: e.resRooms[0].guest_first_name,
            last: e.resRooms[0].guest_last_name,
            startDate: e.checkin_date,
            endDate: e.checkout_date,
            adults: e.resRooms.reduce((acc,room) => acc+(+room.adults), 0),
            children: e.resRooms.reduce((acc,room) => acc+(+room.kids), 0),
            type: e.resRooms[0].room_type_name,
            rateCode: e.resRooms[0].rate_id,
            language: document.documentElement.lang,
            currency: e.currency_code,
            amount: e.resRooms.reduce((acc,room) => acc+(+room.total), 0) + e.total_tax,
            addonAmount: e.booking_total - e.resRooms.reduce((acc,room) => acc+(+room.total), 0) - e.total_tax,
            dateFormat: 'yyyy-M-d',
            eventData: {
                category: 'Booking_Engine',
                action: 'Load',
                value: e.booking_total
            }
        },event:'flipto.confirmation.load'});
    }
}(window,'fliptoDataLayer')
</script>
<script async src='https://integration.flip.to/K2X4KDP'></script>
<!-- Flip.to - End Booking Engine Integration -->
```

{% endstep %}
{% endstepper %}

And you're all set! If we can be of any help, say hello to our [Customer Success team](https://docs.flip.to/support/customer-success).

***

## **Specific functionalities with Cloudbeds**

Flip.to is seamlessly integrated with Cloudbeds. With our Cloudbeds integration you have access to all our advanced functionalities :

* Advocacy can automatically reach and turn past guests into storytellers.
* Discovery can share the interests of your planners and upcoming guests.
* Spacetime receives more signals to improve your behavioral analytics.

## **How to disconnect**

Sign into [your Flip.to account](https://manage.flip.to/) and navigate to **Platform → Mission Control** or **Account Settings → Integrations.** Find Cloudbeds under Booking Engines and click Disconnect.

To disconnect on the Cloudbeds side, [refer to this article](https://myfrontdesk.cloudbeds.com/hc/en-us/articles/219774407-How-to-disconnect-an-app-from-Cloudbeds-PMS).


---

# 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://docs.flip.to/docs/integrations/booking-engines/vendors/cloudbeds-beta.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.
