- They run while the customer is on the call, so they can interact with the customer.
- They are triggered by customer intent.
- They perform actions immediately.
- Their responses should sound natural.
- You can add messages for the agent to say while the action runs.
Types of In-Call Functions
- Keep Call on Hold: puts the call on hold; the agent stays silent for that time. Use it as keep_call_on_hold in the system prompt. It needs a Description (when to put the call on hold) and a Hold Duration (how long, in seconds, to stay silent). Use case: if the customer says “2 min dijiye abhi dekh kar batata hu,” then instead of saying a Silence Message, the call should automatically go on hold.
- Transfer Call: transfers the call to a human agent or executive. Use it as transfer_call in the system prompt. A Cold Transfer hands the call over without sharing any conversation context. A Warm Transfer first gives the human full context — the customer’s issue, actions taken, and what is still needed — and hands over once the human gives a go-ahead.
- End Call: ends or hangs up the call from the agent’s side once its task is done. Write a short description telling the agent when to end the call. Example: “Execute this function to end the call when the data is collected for loan profiling, or when the customer asks you to end the call.”
- Check for Availabilities (cal.com): lets the agent check available time slots for a meeting on cal.com. Required inputs: an API key and an Event Id.
- Book a Meet (cal.com): lets the agent book a calendar slot or schedule a meeting on cal.com. Required inputs: an API key and an Event Id.
- Custom Function: comes in two types. Basic is for hitting an API during the call to perform an action — like fetching inventory, listings, or product details. Advanced overcomes the limits of basic custom functions, giving almost unlimited flexibility to build any in-call function from scratch, including custom code to check inputs and modify or format the API’s output before returning it to the agent.
- Formatting: hit an API that returns ISO date-time slots, then reformat those slots into a human-readable format.
- Calculation: compute variable values in real time from customer-specific data — like working out a personalised loan interest rate from the customer’s CIBIL score and monthly salary captured live on the call.
- Dummy Manager Interaction: a simulated hold where the agent tells the customer it needs to consult a senior. During the hold, custom music can play to build trust, and after some time the calculated result is returned — as if a manager was involved.
Audit function behavior
Review Audit Results
Use Function Accuracy and Function Call Issues to compare expected and actual function behavior.