Automotive

Financing Pre-Qualification

Screen prospective buyers for financing eligibility before they visit the showroom, improving deal quality and reducing time on the lot.

Why this matters

Automate service scheduling, recall notifications, lease-end outreach, and financing workflows across your dealership network. This example shows you how to automate financing pre-qualification 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 FinancingPreQualBot(guava.CallController):
    def __init__(self, prospect_name: str, vehicle_of_interest: str, dealership: str):
        super().__init__()
        self.set_persona(
            organization_name=f"{dealership} Finance",
            agent_name="Riley",
        )
        self.set_task(
            objective=f"Pre-qualify {prospect_name} for financing on a {vehicle_of_interest}",
            checklist=[
                f"Greet {prospect_name} and explain this pre-qualification won't affect their credit score.",
                guava.Field(
                    key="annual_income",
                    field_type="currency",
                    description="Annual gross income",
                ),
                guava.Field(
                    key="employment_status",
                    field_type="choice",
                    description="Employment status",
                    choices=["full-time employed", "self-employed", "part-time", "retired", "other"],
                ),
                guava.Field(
                    key="down_payment_available",
                    field_type="currency",
                    description="Available down payment amount",
                ),
                guava.Field(
                    key="trade_in",
                    field_type="bool",
                    description="Do they have a trade-in vehicle?",
                ),
                guava.Field(
                    key="monthly_budget",
                    field_type="currency",
                    description="Comfortable monthly payment budget",
                ),
                guava.Field(
                    key="consents_to_soft_pull",
                    field_type="bool",
                    description="Consent to a soft credit inquiry (does not affect credit score)?",
                ),
                "Provide pre-qualification range and invite to showroom with dedicated finance manager.",
            ],
            on_complete=lambda fields: print(f"Pre-qual complete for {prospect_name}: {fields}"),
        )

guava.dial(
    controller=FinancingPreQualBot,
    controller_args={"prospect_name": "Anthony Davis", "vehicle_of_interest": "2024 Ford F-150",
                     "dealership": "Riverside Ford"},
    to=os.environ["PROSPECT_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 FinancingPreQualBot(guava.CallController):
    def __init__(self, prospect_name: str, vehicle_of_interest: str, dealership: str):
        super().__init__()
        self.set_persona(
            organization_name=f"{dealership} Finance",
            agent_name="Riley",
        )
        self.set_task(
            objective=f"Pre-qualify {prospect_name} for financing on a {vehicle_of_interest}",
            checklist=[
                f"Greet {prospect_name} and explain this pre-qualification won't affect their credit score.",
                guava.Field(
                    key="annual_income",
                    field_type="currency",
                    description="Annual gross income",
                ),
                guava.Field(
                    key="employment_status",
                    field_type="choice",
                    description="Employment status",
                    choices=["full-time employed", "self-employed", "part-time", "retired", "other"],
                ),
                guava.Field(
                    key="down_payment_available",
                    field_type="currency",
                    description="Available down payment amount",
                ),
                guava.Field(
                    key="trade_in",
                    field_type="bool",
                    description="Do they have a trade-in vehicle?",
                ),
                guava.Field(
                    key="monthly_budget",
                    field_type="currency",
                    description="Comfortable monthly payment budget",
                ),
                guava.Field(
                    key="consents_to_soft_pull",
                    field_type="bool",
                    description="Consent to a soft credit inquiry (does not affect credit score)?",
                ),
                "Provide pre-qualification range and invite to showroom with dedicated finance manager.",
            ],
            on_complete=lambda fields: print(f"Pre-qual complete for {prospect_name}: {fields}"),
        )

guava.dial(
    controller=FinancingPreQualBot,
    controller_args={"prospect_name": "Anthony Davis", "vehicle_of_interest": "2024 Ford F-150",
                     "dealership": "Riverside Ford"},
    to=os.environ["PROSPECT_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