Telecommunications

Plan Upgrade & Upsell

Identify customers on legacy plans and proactively offer modern plan upgrades that provide more value, driving ARPU without expensive sales headcount.

Why this matters

Reduce churn, drive upgrades, and streamline support with voice automation tailored for wireless and broadband providers. This example shows you how to automate plan upgrade & 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 PlanUpgradeBot(guava.CallController):
    def __init__(self, customer_name: str, current_plan: str, current_price: float,
                 upgrade_plan: str, upgrade_price: float, upgrade_benefits: list[str]):
        super().__init__()
        self.set_persona(
            organization_name="Nexus Mobile",
            agent_name="Quinn",
        )
        self.set_task(
            objective=f"Offer {customer_name} an upgrade from {current_plan} to {upgrade_plan}",
            checklist=[
                f"Greet {customer_name} and mention you're calling with a personalized plan recommendation.",
                guava.Say(f"Current plan: {current_plan} at ${current_price:.2f}/mo."),
                guava.Say(f"Recommended: {upgrade_plan} at ${upgrade_price:.2f}/mo — benefits: {', '.join(upgrade_benefits)}."),
                guava.Field(
                    key="interested_in_upgrade",
                    field_type="bool",
                    description="Is the customer interested in the upgrade?",
                ),
                guava.Field(
                    key="objection",
                    field_type="choice",
                    description="If not, main objection",
                    choices=["price increase", "don't need the extras", "already planning to switch",
                             "want to compare options", "satisfied with current plan"],
                    required=False,
                ),
                guava.Field(
                    key="upgrade_effective_date",
                    field_type="choice",
                    description="When to activate the upgrade",
                    choices=["today — prorate current cycle", "next billing cycle"],
                    required=False,
                ),
                "Confirm upgrade or note objection for future outreach timing.",
            ],
            on_complete=lambda fields: print(f"Plan upgrade call: {customer_name} — accepted: {fields.get('interested_in_upgrade')}"),
        )

guava.dial(
    controller=PlanUpgradeBot,
    controller_args={"customer_name": "Deborah Stern", "current_plan": "Legacy 5GB Plan",
                     "current_price": 55.00, "upgrade_plan": "Unlimited Starter",
                     "upgrade_price": 65.00,
                     "upgrade_benefits": ["unlimited data", "HD streaming", "mobile hotspot 15GB",
                                          "international texting"]},
    to=os.environ["CUSTOMER_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 PlanUpgradeBot(guava.CallController):
    def __init__(self, customer_name: str, current_plan: str, current_price: float,
                 upgrade_plan: str, upgrade_price: float, upgrade_benefits: list[str]):
        super().__init__()
        self.set_persona(
            organization_name="Nexus Mobile",
            agent_name="Quinn",
        )
        self.set_task(
            objective=f"Offer {customer_name} an upgrade from {current_plan} to {upgrade_plan}",
            checklist=[
                f"Greet {customer_name} and mention you're calling with a personalized plan recommendation.",
                guava.Say(f"Current plan: {current_plan} at ${current_price:.2f}/mo."),
                guava.Say(f"Recommended: {upgrade_plan} at ${upgrade_price:.2f}/mo — benefits: {', '.join(upgrade_benefits)}."),
                guava.Field(
                    key="interested_in_upgrade",
                    field_type="bool",
                    description="Is the customer interested in the upgrade?",
                ),
                guava.Field(
                    key="objection",
                    field_type="choice",
                    description="If not, main objection",
                    choices=["price increase", "don't need the extras", "already planning to switch",
                             "want to compare options", "satisfied with current plan"],
                    required=False,
                ),
                guava.Field(
                    key="upgrade_effective_date",
                    field_type="choice",
                    description="When to activate the upgrade",
                    choices=["today — prorate current cycle", "next billing cycle"],
                    required=False,
                ),
                "Confirm upgrade or note objection for future outreach timing.",
            ],
            on_complete=lambda fields: print(f"Plan upgrade call: {customer_name} — accepted: {fields.get('interested_in_upgrade')}"),
        )

guava.dial(
    controller=PlanUpgradeBot,
    controller_args={"customer_name": "Deborah Stern", "current_plan": "Legacy 5GB Plan",
                     "current_price": 55.00, "upgrade_plan": "Unlimited Starter",
                     "upgrade_price": 65.00,
                     "upgrade_benefits": ["unlimited data", "HD streaming", "mobile hotspot 15GB",
                                          "international texting"]},
    to=os.environ["CUSTOMER_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