What is Function Calling?
Function calling enables your AI agents to execute real-time actions during conversations by calling external APIs and triggering workflows.
Capabilities
How It Works
AI Reads Function
The AI understands what the function does from its description
Detects Trigger
Based on conversation, AI decides when to call the function
Extracts Parameters
AI collects required parameters from the conversation
Executes API Call
Dialgen makes the HTTP request to your endpoint
Returns Response
API response feeds back to AI for natural continuation
Quick Example
{
"name": "check_order_status",
"description": "Checks the customer's order status. Call this when the customer asks about their order, delivery, or tracking.",
"parameters": {
"type": "object",
"properties": {
"order_id": {
"type": "string",
"description": "The order number"
}
},
"required": ["order_id"]
},
"api_endpoint": "https://api.yourcompany.com/orders/status",
"http_method": "POST"
}
The description is critical. The AI relies on it to know when to trigger the function.
Use Cases
CRM Integration
Update customer records, add notes, change lead status.
Appointment Booking
Check availability and book appointments in real-time.
Order Management
Check order status, process returns, track shipments.
Payment Processing
Process payments, check balances, send invoices.
Data Retrieval
Fetch customer data, account information, product details.
Next Steps