Fetch Context Before Every Call
Give your AI Voice Agent real-time context about every caller by fetching data from your systems before the conversation starts. The agent uses this context to personalize greetings, answer account-specific questions, and route calls intelligently.
Available on: All AI Voice Agent plans.
How It Works
When a call comes in (or an outbound call initiates), the agent makes an API request to your endpoint before answering. Your endpoint returns caller-specific data — account status, recent orders, open tickets, VIP status — and the agent incorporates it into the conversation.
The fetch happens in milliseconds, before the caller hears anything.
Setting Up Fetch Context
- Go to Dashboard > AI Voice Agent and select your agent.
- Open the Knowledge tab (or the dedicated context configuration section).
- Enable Fetch Context Before Every Call.
- Provide your API endpoint URL.
- Configure the request:
- Method — GET or POST
- Headers — authentication headers your endpoint requires
- Request body — for POST requests, define the payload (typically includes the caller's phone number)
What Your Endpoint Should Return
Return a JSON object with caller context. The agent reads all fields and incorporates them into its understanding:
{
"caller_name": "Sarah Chen",
"account_status": "Active",
"plan": "Enterprise",
"recent_ticket": "Billing discrepancy on March invoice — pending resolution",
"vip": true,
"preferred_language": "English",
"notes": "Prefers email follow-ups over SMS"
}
The agent uses this context across the entire call — for the greeting, for answering questions, and for deciding when to transfer.
Use Cases
| Use case | Context to fetch | How the agent uses it |
|---|---|---|
| VIP routing | Customer tier, account value | Prioritize resolution, offer premium support |
| Account lookup | Account status, recent activity | Answer "What's my balance?" or "Where's my order?" without asking the caller to look it up |
| Ticket continuity | Open tickets, recent interactions | Reference existing issues: "I see you have an open ticket about..." |
| Campaign personalization | Lead score, campaign source | Adjust qualification questions based on lead quality |
| Appointment prep | Upcoming appointments, provider notes | "I see you have an appointment with Dr. Patel on Thursday..." |
Timeout and Fallback
If your endpoint does not respond within the configured timeout (typically 2–3 seconds), the agent proceeds without context and falls back to a generic greeting.
Design your endpoint to respond fast:
- Keep lookups simple (single database query)
- Cache frequently accessed data
- Return a minimal payload — only what the agent needs
Security Considerations
- Use HTTPS for your endpoint
- Authenticate requests with API keys or tokens in headers
- Return only the data the agent needs — do not expose sensitive fields (SSN, credit card numbers)
- Log fetch requests on your side for auditing
Related Articles
- Dynamic Greetings — context-aware opening lines
- AI Voice Agent Actions — during-call and after-call actions
- AI Voice Agent Behavior — role, personality, and system prompts