Custom Mid-Call Tools
Custom tools allow your assistant to communicate with the outside world in real-time. By configuring a custom tool, you can enable your assistant to push data to your CRM, retrieve order statuses, or trigger workflows in automation platforms like Make or Zapier.
The Configuration Structure
To create a custom tool, go to the Tools tab in your Assistant settings and select "Create Custom Tool." You will need to define the following:
1. Tool Definition
This tells the AI what the tool is and when to use it.
- Name: A unique identifier (e.g., `book_appointment`, `check_weather`).
- Description: A natural language explanation for the AI. Example: "Use this tool to submit the user's preferred date and time for an appointment."
2. API Configuration
This tells Caller AI where to send the data.
- Method: usually `POST` or `GET`.
- URL: The endpoint of your server or webhook (e.g., a Make.com webhook URL).
- Headers: Custom authentication headers if required (e.g., `Authorization: Bearer 12345`).
3. Parameters (The Payload)
You must define what data the AI needs to extract from the conversation to send to your tool. This is defined in JSON Schema format.
{
"type": "object",
"properties": {
"customer_name": {
"type": "string",
"description": "The name of the caller"
},
"appointment_date": {
"type": "string",
"description": "The date requested in YYYY-MM-DD format"
},
"appointment_time": {
"type": "string",
"description": "The time requested (e.g., 2pm)"
}
},
"required": ["customer_name", "appointment_date", "appointment_time"]
}
Handling the Response
When the tool executes, your server (or webhook) must send a response back. The AI will read this response to know what to say next.
The Response Cycle
- AI sends: `{"customer_name": "John", "appointment_date": "2024-10-10"}`
- Your Server processes: Checks database, books slot.
- Your Server responds: `{"status": "success", "message": "Appointment confirmed for October 10th."}`
- AI Speaks: "Great! I have confirmed your appointment for October 10th."
"When you use the book_appointment tool, wait for the confirmation message and read it back to the user clearly."
Common Use Cases
- CRM Updates: Send lead qualification details (Budget, Timeline, Authority) directly to HubSpot or Salesforce.
- Order Status: Take an Order ID from the user, query your database, and return the shipping status.
- Authentication: Ask for a PIN code, send it to your server for verification, and return "Authorized" or "Denied."