How to refer to the arguments passed to transfer t...
# support
h
Hi, I am using transfer_tool_call to forward it to another assistant which has an associated phone number. This transfer_tool_call is accepting three parameters and the tool call request: { "role": "tool_calls", "time": 1748329288183, "message": "", "toolCalls": [ { "id": "1748329288181-xosij8fvh", "type": "function", "function": { "name": "transfer_call_tool", "arguments": "{\n \"zipcode\": \”47906\”,\n \"phone_number\": \”1234567890\”,\n \"date_of_birth\": \"1981-01-01\”\n}” } } ], "secondsFromStart": 95.977 } Now, after the call is transferred to the new assistant, can I refer to the arguments sent by this tool and use it in the prompt (like arguments.zipcode)? How do I do it?
k
Yes, after a transfer_call_tool in Vapi, the receiving assistant can access the passed arguments like zipcode by referencing them in its system prompt using placeholders like {{zipcode}}, {{phone_number}}, and {{date_of_birth}}.
v
You can reference dynamic variables in your transferred assistant's prompt using double curly braces. For example, if you want to use the
zipcode
argument, include it like this in your prompt:
Copy code
text
Hello, your zipcode is {{zipcode}}.
Note: The documentation confirms this syntax for dynamic variables, but does not guarantee that arguments from a transfer tool call are automatically available—ensure your integration passes these values as dynamic variables to the receiving assistant. Source: - [Vapi documentation: Dynamic Variables](https://docs.vapi.ai/assistants/dynamic-variables)
h
Hi, I tried this, but it is giving random values. It is not giving the values that were passed in the arguments of the transfer tool call
v
To ensure the transferred assistant receives the correct argument values, you must explicitly pass these as dynamic variables (e.g., via
assistantOverrides.variableValues
) when initiating the transfer.
If this is not done, placeholders like
{{zipcode}}
may show random or default values. Clarifying question: How are you currently passing the arguments from the transfer tool call to the receiving assistant—are you setting them as dynamic variables in your integration or API request? Sources: - [Vapi documentation: Dynamic Variables](https://docs.vapi.ai/assistants/dynamic-variables) - [Personalization with user information](https://docs.vapi.ai/assistants/personalization)
h
How do you set assistantOverrides.variableValues in the transfer tool ?
v
To clarify: Are you handling the call transfer via a custom server or integration, and do you have access to modify the API request that initiates the transfer? This will determine where and how you can set
assistantOverrides.variableValues
to pass your arguments to the receiving assistant. If you can share how you are triggering the transfer (e.g., via API, webhook, or dashboard), I can provide more specific guidance. Sources: - [Vapi documentation: Dynamic Variables](https://docs.vapi.ai/assistants/dynamic-variables) - [Vapi documentation: Personalization with user information](https://docs.vapi.ai/assistants/personalization)
h
I am triggering the transfer by calling the transfer tool from the sytem prompt of the assistant in the dashboard and passing the required parameters like zipcode, phone number and date of birth to the transfer tool
v
You cannot set
assistantOverrides.variableValues
or pass custom arguments to the receiving assistant when triggering a transfer from the dashboard's system prompt alone.
To make variables like
{{zipcode}}
available in the transferred assistant, you must use a custom server or API integration to explicitly set these values during the transfer. If you need to pass arguments, consider handling the transfer via API or webhook, where you can set
assistantOverrides.variableValues
as shown in the [Vapi documentation](https://docs.vapi.ai/assistants/dynamic-variables).
Sources: - [Vapi documentation: Dynamic Variables](https://docs.vapi.ai/assistants/dynamic-variables) - [Vapi documentation: Personalization with user information](https://docs.vapi.ai/assistants/personalization)
k
To set assistantOverrides.variableValues in the transfer tool, pass dynamic values like, callerName, department in your API call under assistantOverrides, then reference them in your prompts or transfer messages using {{variableName}}.
v
You cannot pass custom arguments to the receiving assistant using only the dashboard's system prompt and transfer tool. To make variables like
{{zipcode}}
available in the transferred assistant, you must handle the transfer via API or webhook and set them in `assistantOverrides.variableValues`:
Copy code
json
{
  "assistantOverrides": {
    "variableValues": {
      "zipcode": "47906",
      "phone_number": "1234567890",
      "date_of_birth": "1981-01-01"
    }
  }
}
Reference these in your prompt as
{{zipcode}}
, etc. This is not possible from the dashboard alone—API integration is required.
[See Vapi documentation for details.](https://docs.vapi.ai/assistants/dynamic-variables) Sources: - [Vapi documentation: Dynamic Variables](https://docs.vapi.ai/assistants/dynamic-variables) - [Vapi documentation: Personalization with user information](https://docs.vapi.ai/assistants/personalization)