What are Functions?
Functions give your AI agent the ability to perform actions during calls. They enable real-time capabilities like transferring calls, ending conversations, booking appointments, and executing custom logic. Two Categories:- Built-in Functions - Pre-configured actions (transfer, end call, scheduling)
- Custom Functions - Your own logic (API calls, custom code)
Built-in Functions
Ready-to-use functions for common call management and scheduling tasks.Call Management
Control call flow and routing.Transfer Call
Transfer calls to phone numbers with warm transfer support
End Call
Gracefully end conversations when appropriate
Scheduling (Cal.com)
Book appointments and check availability using Cal.com integration.Check Availability
Query available time slots from Cal.com
Book a Meeting
Schedule appointments directly in Cal.com
Custom Functions
Create your own functions with API integrations or custom code.Three Types
Pre-Call
Modify system prompt and metadata before calls start
In-Call
Execute actions during active calls with AI triggers
Post-Call
Process call data and execute logic after calls end
Modes
Basic Mode - API integration without code- Configure API endpoints
- Map variables to parameters
- Perfect for existing APIs
- Python (pre-call, in-call)
- JavaScript (post-call)
- AI-powered code generation
Custom Functions Guide
Complete guide to creating custom functions
How Functions Work
Built-in Functions
- Add Function - Configure in agent settings
- Set Parameters - Phone numbers, descriptions, Cal.com details
- AI Triggers - AI decides when to call based on description
- Action Executes - Function runs automatically
Custom Functions
Pre-Call:Common Use Cases
Built-in Functions
- Transfer: Route to human agents, specialists, departments
- End Call: Complete resolved conversations gracefully
- Scheduling: Book appointments, check calendars
Custom Functions
Pre-Call:- Fetch user preferences from database
- Customize greeting based on region
- Load context from CRM
- Check product availability
- Validate customer data
- Query databases
- Call external APIs
- Calculate next date of action (NDOA)
- Update CRM with call results
- Send follow-up emails
- Generate reports
Quick Start
1
Choose Function Type
Built-in for common tasks, custom for specific needs
2
Configure Function
Set parameters (built-in) or create logic (custom)
3
Add Description
Tell AI when to trigger the function
4
Test
Make test calls to verify function behavior
Best Practices
- Clear descriptions - Be specific about when AI should call functions
- Test thoroughly - Verify functions work in different scenarios
- Error handling - Handle failures gracefully in custom functions
- Keep focused - One function, one purpose
- Monitor usage - Review function calls in analytics