Fetch Context Before Every Call

Automate with AI3 min readUpdated 2026-03-14

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

  1. Go to Dashboard > AI Voice Agent and select your agent.
  2. Open the Knowledge tab (or the dedicated context configuration section).
  3. Enable Fetch Context Before Every Call.
  4. Provide your API endpoint URL.
  5. 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 caseContext to fetchHow the agent uses it
VIP routingCustomer tier, account valuePrioritize resolution, offer premium support
Account lookupAccount status, recent activityAnswer "What's my balance?" or "Where's my order?" without asking the caller to look it up
Ticket continuityOpen tickets, recent interactionsReference existing issues: "I see you have an open ticket about..."
Campaign personalizationLead score, campaign sourceAdjust qualification questions based on lead quality
Appointment prepUpcoming 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

Was this helpful?