Urgent: send custom parameters to dynamic transfer...
# support
n
If I use parameters that I need to receive at my webhook when creating my dynamicTransfer function, the “transfer-destination-request” is not executed. { "id": "dfba02bd-765a-4d1f-8e8a-97e9785ac369", "createdAt": "2025-08-19T12:14:02.599Z", "updatedAt": "2025-08-19T12:18:59.918Z", "type": "transferCall", "function": { "name": "dynamicTransfer", "description": "dynamic transfer call", "parameters": { "type": "object", "properties": { "reason": { "type": "string", "enum": [ "accounting", "commercial", "general", "incident_urgency" ] }, "postal_code": { "description": "5-digit postal code (ZIP code) ", "type": "string" } }, "required": [] } }, "messages": [ { "type": "request-start", "blocking": true } ], "orgId": "************" } If I don't use parameters and leave everything blank, the “transfer-destination-request” is executed, but I can't receive the variables I need. { "id": "4f3132bb-a995-4cea-9fba-45e7dc53d528", "createdAt": "2025-08-19T09:33:37.189Z", "updatedAt": "2025-08-19T09:36:29.338Z", "type": "transferCall", "function": { "name": "dynamicTransfer", "description": "dynamic transfer call", "parameters": { "type": "object", "properties": {}, "required": [] } }, "messages": [ { "type": "request-start", "blocking": true } ], "orgId": ********" }
c
Hi Ignacio, To ensure that the
transfer-destination-request
webhook is triggered correctly when using parameters in your
dynamicTransfer
function, make sure that the destination is not predetermined and that your webhook URL is configured to handle these requests properly. Here’s a brief guide on setting up dynamic call transfers with parameters: Example webhook logic:
Copy code
javascript
app.post('/webhook', (req, res) => {
  // Verify signature and process request
  const { type, callContext, parameters } = req.body;

  if (type !== 'transfer-destination-request') {
    return res.status(200).send({ received: true });
  }

  // Determine routing based on parameters
  const { reason } = parameters;
  let destination;

  if (reason === 'urgent') {
    destination = { number: "+1234567890", message: "Urgent support requested." };
  } else {
    destination = { number: "+0987654321", message: "General support." };
  }

  res.json({ destination });
});
Following this approach should help in successfully triggering the webhook and processing transfers dynamically using parameters. For more detailed guidance, refer to [Vapi's dynamic call transfers documentation](https://docs.vapi.ai/calls/call-dynamic-transfers). /simple and bit short
n
This is also not working for us following that same documentation
c
What problem are you facing? Can you provide more details?
n
We setup a transferCall function for a dynamic routing. But our webhook that we have setup never sees request come in for that transfer.
c
Hey, can you send me a screen recording video that walks through the issue you are facing? It would be easier for me to understand your issue and help you out with it.