Hospitality & Travel

Reservation Confirmation & Upsell

Confirm upcoming reservations with guests, capture special requests, and offer relevant upgrades to increase revenue per booking.

Why this matters

Deliver white-glove guest experiences at scale with automated reservation management, upsells, and disruption handling. This example shows you how to automate reservation confirmation & upsell calls end-to-end with Guava's SDK — no telephony plumbing, no prompt engineering, just Python.

How to set persona & task
Working with Fields and Say items
Handling callbacks
Running the agent
Step 01

Installation

Install from Guava's private PyPI index. A public package is coming soon — the install command will simplify to pip install guava.

terminal
# Step 1: Install Guava
pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com

# Public PyPI package coming soon — the install command will simplify to:
# pip install guava

# Step 2: Set your credentials
export GUAVA_API_KEY="..."
export GUAVA_AGENT_NUMBER="..."
Step 02

How it's built

Every Guava agent is a Python class. Walk through the key sections below, then grab the complete file at the end.

01

Imports

Import the Guava SDK and any helpers you need. guava.CallController is the base class for every voice agent.

example.py
# Install: pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com
import guava
import os
02

Agent setup

set_persona() defines how the agent presents itself. set_task() gives it its mission in plain English. The checklist drives the conversation — Guava works through it top-to-bottom, collecting Field values and speaking Say items as it goes.

example.py
class ReservationConfirmationBot(guava.CallController):
    def __init__(self, guest_name: str, hotel: str, check_in: str, check_out: str, room_type: str):
        super().__init__()
        self.set_persona(
            organization_name=hotel,
            agent_name="Victoria",
        )
        self.set_task(
            objective=f"Confirm reservation for {guest_name} at {hotel}, {check_in} to {check_out}, and offer upgrades",
            checklist=[
                f"Welcome {guest_name} and confirm their reservation: {room_type}, {check_in}–{check_out}.",
                guava.Field(
                    key="confirmed",
                    field_type="bool",
                    description="Does the guest confirm their reservation?",
                ),
                guava.Field(
                    key="special_requests",
                    field_type="text",
                    description="Any special requests or accessibility needs?",
                    required=False,
                ),
                guava.Field(
                    key="wants_upgrade",
                    field_type="bool",
                    description="Interested in a suite upgrade for $89/night?",
                ),
                guava.Field(
                    key="wants_breakfast",
                    field_type="bool",
                    description="Interested in adding breakfast for $28/person per day?",
                ),
                guava.Field(
                    key="arrival_time",
                    field_type="text",
                    description="Estimated arrival time for room preparation",
                ),
                "Confirm everything and mention early check-in availability.",
            ],
            on_complete=lambda fields: print(f"Reservation confirmed for {guest_name}: {fields}"),
        )

guava.dial(
    controller=ReservationConfirmationBot,
    controller_args={"guest_name": "Mr. and Mrs. Patel", "hotel": "The Mayfair Grand",
                     "check_in": "Friday March 14", "check_out": "Sunday March 16",
                     "room_type": "Deluxe King"},
    to=os.environ["GUEST_PHONE"],
    agent_number=os.environ["GUAVA_AGENT_NUMBER"],
    api_key=os.environ["GUAVA_API_KEY"],
)

Platform performance

<1s

Response time

99.99%

Uptime SLA

13+

Industries served

Step 03

Full example

The complete file — copy it, save it as example.py, and run it.

example.py
# Install: pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com
import guava
import os

class ReservationConfirmationBot(guava.CallController):
    def __init__(self, guest_name: str, hotel: str, check_in: str, check_out: str, room_type: str):
        super().__init__()
        self.set_persona(
            organization_name=hotel,
            agent_name="Victoria",
        )
        self.set_task(
            objective=f"Confirm reservation for {guest_name} at {hotel}, {check_in} to {check_out}, and offer upgrades",
            checklist=[
                f"Welcome {guest_name} and confirm their reservation: {room_type}, {check_in}–{check_out}.",
                guava.Field(
                    key="confirmed",
                    field_type="bool",
                    description="Does the guest confirm their reservation?",
                ),
                guava.Field(
                    key="special_requests",
                    field_type="text",
                    description="Any special requests or accessibility needs?",
                    required=False,
                ),
                guava.Field(
                    key="wants_upgrade",
                    field_type="bool",
                    description="Interested in a suite upgrade for $89/night?",
                ),
                guava.Field(
                    key="wants_breakfast",
                    field_type="bool",
                    description="Interested in adding breakfast for $28/person per day?",
                ),
                guava.Field(
                    key="arrival_time",
                    field_type="text",
                    description="Estimated arrival time for room preparation",
                ),
                "Confirm everything and mention early check-in availability.",
            ],
            on_complete=lambda fields: print(f"Reservation confirmed for {guest_name}: {fields}"),
        )

guava.dial(
    controller=ReservationConfirmationBot,
    controller_args={"guest_name": "Mr. and Mrs. Patel", "hotel": "The Mayfair Grand",
                     "check_in": "Friday March 14", "check_out": "Sunday March 16",
                     "room_type": "Deluxe King"},
    to=os.environ["GUEST_PHONE"],
    agent_number=os.environ["GUAVA_AGENT_NUMBER"],
    api_key=os.environ["GUAVA_API_KEY"],
)
Step 04

Run it

Start the agent. It will connect to Guava's infrastructure and begin accepting calls on your assigned number.

terminal
python example.py
Get Started