Function Calling / Custom Tools
Function calling lets your bot perform actions beyond answering questions — check order status, look up inventory, create tickets, or call any API endpoint. Define your tools once, and the AI decides when to use them based on the conversation.
How It Works
- 1Define a tool with a name, description, HTTP endpoint, and parameters. The description tells the AI when the tool is relevant.
- 2The AI decides when to call the tool based on the user's question and the tool's description. No manual triggers needed.
- 3Voquii makes the HTTP request to your endpoint with the parameters extracted from the conversation.
- 4The response is incorporated into the bot's answer. The AI uses the data returned by your API to craft a natural-language reply.
Creating a Tool
Go to Dashboard → Bot Settings → Tools to create and manage your custom tools.
Tool Configuration Fields
| Field | Description |
|---|---|
| Name | Function-style identifier (e.g., check_order_status, get_inventory) |
| Description | Tells the AI when to use this tool (e.g., "Check the status of a customer order by order number") |
| Endpoint URL | Your API endpoint that handles the action |
| HTTP Method | GET, POST, PUT, or DELETE |
| Parameters | JSON Schema defining the expected input |
| Custom Headers | Authorization headers (Bearer tokens, API keys) |
| Timeout | How long to wait for a response (1–30 seconds) |
Example Tools
Order Lookup
Name: check_order
Description: Check the status of a customer order by order number
Endpoint: https://api.yourstore.com/orders/{id}
Method: GET
Parameters: { "id": { "type": "string", "description": "The order ID" } }
Headers: { "Authorization": "Bearer sk_live_..." }Appointment Availability
Name: check_availability
Description: Check available appointment slots for a given date
Endpoint: https://api.yourbiz.com/slots
Method: POST
Parameters: {
"date": { "type": "string", "description": "Date in YYYY-MM-DD format" },
"service": { "type": "string", "description": "Type of service requested" }
}Support Ticket
Name: create_ticket
Description: Create a support ticket when the customer has an issue that needs follow-up
Endpoint: https://api.helpdesk.com/tickets
Method: POST
Parameters: {
"subject": { "type": "string", "description": "Brief summary of the issue" },
"description": { "type": "string", "description": "Detailed description" },
"priority": { "type": "string", "enum": ["low", "medium", "high"] }
}Tool Execution
How parameters are sent depends on the HTTP method:
| Method | Parameter Handling |
|---|---|
| GET / DELETE | Parameters become URL query params |
| POST / PUT | Parameters become JSON request body |
Enable / Disable
Each tool has an active toggle. Disabled tools are not offered to the AI and will never be called. This lets you temporarily turn off a tool without deleting its configuration — useful for maintenance windows or when debugging your API endpoint.
Tips
Write clear descriptions
The AI uses the description to decide when to call the tool. Be specific about what the tool does and when it should be used. A vague description leads to incorrect tool usage.
Keep parameter schemas simple
Stick to flat objects with clear field names and descriptions. Deeply nested schemas are harder for the AI to populate correctly.
Return clear, concise responses
Your endpoint should return data that the AI can easily relay to users. Avoid returning raw database rows or internal error codes. Structure your response with user-friendly fields.
Set appropriate timeouts
The default timeout works for most fast APIs. If your endpoint takes longer than 5 seconds (e.g., querying external systems), increase the timeout value accordingly. The maximum is 30 seconds.
Example: Full Conversation Flow
Customer: "Where is my order #ORD-4821?"
[AI recognizes this matches the check_order tool]
[Voquii calls: GET https://api.yourstore.com/orders/ORD-4821]
[Your API returns: { "status": "shipped", "tracking": "1Z999AA10123456784",
"carrier": "UPS", "eta": "2026-02-15" }]
Bot: "Your order #ORD-4821 has been shipped via UPS! Your tracking
number is 1Z999AA10123456784 and the estimated delivery date
is February 15th. Is there anything else I can help with?"