rival-black
rival-black5h ago

Dynamic Transfer Tool in Squad for Transfer to Agent Issue

I have two agents leasing and maintenance and one dynamic transfer tool (no destinations) with webhook setup to get the destinations from our backend. The webhook is working fine, but I am unable to get the name of the agent the tool is transferring to in the "argument" param.
1 Reply
Vapi
Vapi5h ago
To include the agent's name in the transfer tool's arguments, ensure your webhook response adds a custom field (e.g., agentName) to the destination object. For example:
{
"destination": {
"type": "assistant",
"assistantName": "LeasingAgent",
"description": "Leasing department agent",
"agentName": "LeasingAgent"
}
}
{
"destination": {
"type": "assistant",
"assistantName": "LeasingAgent",
"description": "Leasing department agent",
"agentName": "LeasingAgent"
}
}
Your assistant or downstream logic can then extract agentName from the destination object. Adjust your webhook to include this field as needed for your use case.
Reference: See Dynamic call transfers - webhook response example. Source: - Dynamic call transfers
⤵️ Mention @Vapi Support Bot for follow-ups 🐥

Did you find this page helpful?