agent.call_phone("+1...") / agent.callPhone("+1...") to place singular outbound calls, we recommend using Campaigns when calling multiple contacts.
Campaigns automatically manage missed-call retries, enforce calling windows, and control call concurrency.
Since they are persistent resources, you should create one Campaign for each distinct use case and continue adding contacts to it as needed.
While Campaigns are responsible for dispatching calls - you will still need to “attach” an Agent to handle the call itself - this is done using a unique “code” created for each Campaign.
Prefer to manage campaigns programmatically over HTTP? See the Campaigns API reference for the full set of REST endpoints — create, upload contacts, status, and more.
Before you start
You’ll need:- A Guava account — sign up at app.goguava.ai
- A phone number — from the Phone Numbers page
- Outbound permission — outbound dialing requires approval. See Outbound & SMS Compliance for the required registrations, then fill out the Outbound Dialing Permissions Request form on the Compliance page.
Create a campaign in the dashboard
Open the Campaigns page and click Create Campaign. Configure your campaign name, origin phone numbers, calling windows, and retry settings. Once created, take note of the campaign code — it starts withgcmp-....
Upload contacts
From the campaign’s detail page in the dashboard, upload your contact list. Each contact needs a phone number and any per-call data variables your agent will use (such as a patient name or appointment time). These variables will be accessible inside your agent callbacks viacall.get_variable() / call.getVariable().
Write your agent
Define anAgent and attach callbacks for each stage of the call.
Test your agent
- Python
- TypeScript
Before attaching to a campaign, test your agent using
agent.call_local() or agent.chat(). Pass a variables dict to simulate per-contact data:campaign.py
Attach and serve the campaign
- Python
- TypeScript
Next, run
agent.attach_campaign("gcmp-..."). This “attaches” your agent to the Campaign that we previously created.campaign.py