Number Porting Coordination
Guide customers through the number porting process, collect required account information from their previous carrier, and prevent failed port requests.
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 number porting coordination calls end-to-end with Guava's SDK — no telephony plumbing, no prompt engineering, just Python.
Installation
Install from Guava's private PyPI index. A public package is coming soon — the install command will simplify to pip install guava.
# 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="..."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.
Imports
Import the Guava SDK and any helpers you need. guava.CallController is the base class for every voice agent.
# Install: pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com
import guava
import osAgent 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.
class NumberPortingBot(guava.CallController):
def __init__(self, customer_name: str, new_account_number: str):
super().__init__()
self.set_persona(
organization_name="Nexus Mobile Porting Team",
agent_name="Tyler",
)
self.set_task(
objective=f"Collect number porting information from {customer_name} for account {new_account_number}",
checklist=[
f"Welcome {customer_name} to Nexus Mobile and explain the porting process takes 1-3 hours.",
guava.Field(
key="number_to_port",
field_type="phone",
description="The phone number to be ported from previous carrier",
),
guava.Field(
key="previous_carrier",
field_type="text",
description="Name of current/previous carrier",
),
guava.Field(
key="account_number_previous",
field_type="text",
description="Account number with previous carrier (required for porting)",
),
guava.Field(
key="account_pin_previous",
field_type="text",
description="Account PIN or password with previous carrier",
),
guava.Field(
key="billing_zip_previous",
field_type="text",
description="Billing ZIP code on previous carrier account",
),
guava.Field(
key="keep_old_service_active",
field_type="bool",
description="Are they keeping the old line active during the port window?",
),
"Confirm all information, submit port request, and advise on what to expect during the 1-3 hour window.",
],
on_complete=lambda fields: print(f"Port request submitted for {fields.get('number_to_port')} from {fields.get('previous_carrier')}"),
)
guava.dial(
controller=NumberPortingBot,
controller_args={"customer_name": "Claire Burton", "new_account_number": "NXM-992847"},
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
Full example
The complete file — copy it, save it as example.py, and run it.
# Install: pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com
import guava
import os
class NumberPortingBot(guava.CallController):
def __init__(self, customer_name: str, new_account_number: str):
super().__init__()
self.set_persona(
organization_name="Nexus Mobile Porting Team",
agent_name="Tyler",
)
self.set_task(
objective=f"Collect number porting information from {customer_name} for account {new_account_number}",
checklist=[
f"Welcome {customer_name} to Nexus Mobile and explain the porting process takes 1-3 hours.",
guava.Field(
key="number_to_port",
field_type="phone",
description="The phone number to be ported from previous carrier",
),
guava.Field(
key="previous_carrier",
field_type="text",
description="Name of current/previous carrier",
),
guava.Field(
key="account_number_previous",
field_type="text",
description="Account number with previous carrier (required for porting)",
),
guava.Field(
key="account_pin_previous",
field_type="text",
description="Account PIN or password with previous carrier",
),
guava.Field(
key="billing_zip_previous",
field_type="text",
description="Billing ZIP code on previous carrier account",
),
guava.Field(
key="keep_old_service_active",
field_type="bool",
description="Are they keeping the old line active during the port window?",
),
"Confirm all information, submit port request, and advise on what to expect during the 1-3 hour window.",
],
on_complete=lambda fields: print(f"Port request submitted for {fields.get('number_to_port')} from {fields.get('previous_carrier')}"),
)
guava.dial(
controller=NumberPortingBot,
controller_args={"customer_name": "Claire Burton", "new_account_number": "NXM-992847"},
to=os.environ["CUSTOMER_PHONE"],
agent_number=os.environ["GUAVA_AGENT_NUMBER"],
api_key=os.environ["GUAVA_API_KEY"],
)Run it
Start the agent. It will connect to Guava's infrastructure and begin accepting calls on your assigned number.
python example.py