Handoff tool not pass custom parameter to server
# support
d
We are trying to build a dynamic agent that will first verify the user identity by a OTP, then it will route to another transient assistant that will change the settings based on the inputs from the handoff tool. The issue is that the handoff tool is called, the OTP parameter is not sent to the sever.
Copy code
{
  "type": "handoff",
  "destinations": [
    {
      "type": "dynamic"
    }
  ],
  "function": {
    "name": "handoff",
    "description": "Call this function when the customer is ready to be handed off to the next assistant",
    "parameters": {
      "type": "object",
      "properties": {
        "destination": {
          "type": "string",
          "description": "Use dynamic when customer is ready to be handed off to the next assistant",
          "enum": [
            "dynamic"
          ]
        },
        "otp": {
          "type": "number",
          "description": "The OTP provided by the customer"
        }
      }
    }
  }
}
The call ID is e156ad94-175b-496e-8e13-f285cdfe3523 Thanks,
v
To ensure your OTP parameter is sent to the server, consider defining a custom tool instead of using the built-in handoff/transfer tool. Here’s a sample custom tool payload that will pass the OTP to your server:
Copy code
json
{
  "type": "function",
  "function": {
    "name": "handoffWithOtp",
    "parameters": {
      "type": "object",
      "properties": {
        "destination": { "type": "string" },
        "otp": { "type": "number" }
      }
    }
  },
  "server": { "url": "https://your-server.com/handoff" }
}
Update your assistant to use this tool, and your server will receive the OTP in the payload. For more, see the [custom tools guide](https://docs.vapi.ai/tools/custom-tools). Source: - [Custom Tools](https://docs.vapi.ai/tools/custom-tools)
c
Hi Duong, To configure the handoff tool and pass custom parameters to a server, you can set up dynamic handoff routing. This feature allows you to tailor the routing logic based on parameters such as customer intent, sentiment, or area code. Here’s a quick summary of the steps: 1. Assistant Model Configuration - Use the handoff tool in your assistant's model configuration to specify
type: "handoff"
with custom parameters. 2. Webhook Integration - Set up a webhook on your server that can accept these parameters and determine the destination assistant in real time. 3. Configure Parameters - In the tool configuration, specify which custom parameters you want to include in the webhook for routing logic. 4. Monitoring - Review the message metadata and adjust the routing logic as needed to ensure the parameters are being interpreted and utilized correctly. For more details, you can refer to [August 2025 Changelog](https://docs.vapi.ai/changelog/2025/8/14) for updates regarding configuring the handoff tool with custom parameters.
d
Hi Aniah, I can now have to OTP sent to my webhook. I must set
required: ['destination', 'otp']
property to make it work. Thank you!
c
Thanks for getting back to us. We are delighted to know your issue has been resolved. Please do let us know if you need further assistance. We will be closing this for now and have a great day ahead!
4 Views