Product Recall Notification
Rapidly notify all affected customers about a product recall, confirm receipt, and guide them through the return or replacement process.
Why this matters
Drive revenue and retention with voice automation for order updates, cart recovery, loyalty enrollment, and post-purchase engagement. This example shows you how to automate product recall notification 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 ProductRecallBot(guava.CallController):
def __init__(self, customer_name: str, product_name: str, order_id: str, recall_reason: str):
super().__init__()
self.set_persona(
organization_name="Pinnacle Commerce Safety Team",
agent_name="Sam",
)
self.set_task(
objective=f"Notify {customer_name} of urgent recall for {product_name} from order {order_id}",
checklist=[
f"Introduce yourself and stress this is an important safety notification for {customer_name}.",
guava.Say(f"{product_name} from order {order_id} is subject to a voluntary recall due to: {recall_reason}."),
guava.Say("Advise to stop using the product immediately and not return it to stores."),
guava.Field(
key="has_product",
field_type="bool",
description="Does the customer still have the product?",
),
guava.Field(
key="resolution_preference",
field_type="choice",
description="Preferred resolution",
choices=["full refund", "replacement product", "store credit"],
),
guava.Field(
key="return_label_email",
field_type="email",
description="Email to send prepaid return label",
),
"Confirm resolution, provide case number, and advise on safe disposal if applicable.",
],
on_complete=lambda fields: print(f"Recall notification complete for {customer_name}: {fields}"),
)
guava.dial(
controller=ProductRecallBot,
controller_args={"customer_name": "Paul Garrett", "product_name": "SmartBlend Pro Blender",
"order_id": "ORD-558102",
"recall_reason": "potential blade detachment risk"},
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 ProductRecallBot(guava.CallController):
def __init__(self, customer_name: str, product_name: str, order_id: str, recall_reason: str):
super().__init__()
self.set_persona(
organization_name="Pinnacle Commerce Safety Team",
agent_name="Sam",
)
self.set_task(
objective=f"Notify {customer_name} of urgent recall for {product_name} from order {order_id}",
checklist=[
f"Introduce yourself and stress this is an important safety notification for {customer_name}.",
guava.Say(f"{product_name} from order {order_id} is subject to a voluntary recall due to: {recall_reason}."),
guava.Say("Advise to stop using the product immediately and not return it to stores."),
guava.Field(
key="has_product",
field_type="bool",
description="Does the customer still have the product?",
),
guava.Field(
key="resolution_preference",
field_type="choice",
description="Preferred resolution",
choices=["full refund", "replacement product", "store credit"],
),
guava.Field(
key="return_label_email",
field_type="email",
description="Email to send prepaid return label",
),
"Confirm resolution, provide case number, and advise on safe disposal if applicable.",
],
on_complete=lambda fields: print(f"Recall notification complete for {customer_name}: {fields}"),
)
guava.dial(
controller=ProductRecallBot,
controller_args={"customer_name": "Paul Garrett", "product_name": "SmartBlend Pro Blender",
"order_id": "ORD-558102",
"recall_reason": "potential blade detachment risk"},
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