Transfer Call is not working
# support
u
I tried using the transfer call to forward the call to a number, but it seems like it is not working at all. I am attaching the code that I ran on postman to get the tool, kindly let me know what I am doing wrong, thanks { "type": "transferCall", "function": { "name": "humanTransfer", "description": "Use this function to transfer the call if the name or address of the caller does not match with the retrieved details.", "parameters": { "type": "object", "properties": { "destination": { "type": "string", "description": "The destination to transfer the call to." } }, "required": [ "destination" ] } } }
v
message has been deleted
You can continue this conversation by mentioning me in the message.
@08anas It looks like you've structured your request in a format that describes the function rather than actually calling it. To use the
transferCall
function, you need to provide the specific parameters required to execute the function, not the description of the function itself. Here's how you should structure your request to call the
transferCall
function:
Copy code
json
{
    "type": "transferCall",
    "destination": "+1123123123" // or "+1123123141" depending on the condition X or Y
}
Please replace
"+1123123123"
with the actual phone number you want to transfer the call to, following the E.164 format. If you have specific conditions X or Y that determine which number to transfer to, please provide those conditions so I can assist you further. If you're still experiencing issues, please let me know the exact problem, and I'll be happy to help troubleshoot it.
u
@Vapi Thank you so much, I'll try this and let you know
v
@08anas You're welcome! Please take your time to try it out, and if you encounter any issues or have further questions, feel free to reach out. I'm here to help. Good luck!
u
@Vapi With the above link as a reference, I changed it to this but it is still not working { "type": "transferCall", "destinations": [ { "type": "number", "number": "+918770331454", "transferPlan": { "mode": "warm-transfer-say-message", "message": "Hi, we have new customer whose name is {{customerName}} and address is {{address}}" } } ], "function": {"name": "transferHuman"} } What other changes are required?
v
@08anas It seems there might be a misunderstanding in the structure of your request. The
function
field is not necessary when you're specifying the action directly. Also, the
transferPlan
field is not standard for a simple transfer call action. Here's how you can structure your request to transfer a call:
Copy code
json
{
  "type": "transferCall",
  "destinations": [
    {
      "type": "number",
      "number": "+918770331454"
    }
  ]
}
This is a simplified version that should work if you're trying to transfer a call to the specified number. If you need to play a message before transferring (warm transfer), that would typically be a separate action or part of a more complex API call flow that may not be directly supported in the simple
transferCall
action. Please try the simplified version above, and if you need to include a warm transfer with a message, you might need to check the documentation for the specific API or platform you're using to see if they support that feature and how to implement it. If you're still having trouble, please provide more details or ask support for more info on this.
u
@Vapi V
v
@08anas To include conditions for transferring the call, as well as a message and context for the agent, you would typically need to use a more advanced feature of your voice API platform that supports conditional logic and pre-transfer messages. However, based on the JSON structure you've provided, it seems like you're trying to use a specific API's functionality. If the API supports warm transfers with a message, you might structure your request like this:
Copy code
json
{
  "type": "transferCall",
  "destinations": [
    {
      "type": "number",
      "number": "+918770331454",
      "transferPlan": {
        "mode": "warm-transfer-say-message",
        "message": "Hi, we have a new customer whose name is {{customerName}} and address is {{address}}"
      }
    }
  ]
}
In this structure: -
type
specifies the action to transfer the call. -
destinations
is an array that includes the details of the transfer destination. -
type
within
destinations
specifies the type of destination, which is a phone number in this case. -
number
is the actual phone number to transfer the call to. -
transferPlan
includes the mode and message for the warm transfer. Please note that the placeholders
{{customerName}}
and
{{address}}
should be replaced with actual values before sending the request, or your system should be set up to replace these placeholders with dynamic content. If your API does not support this structure or if you're still facing issues, you may need to consult the API documentation for the correct syntax and available features, or contact their support for further assistance. If the API you're using is part of a service or platform, they may have specific methods for implementing conditional logic and warm transfers with context.
u
@Vapi I want to add the condition for which the call should be transferred, first message and context for the agent to whom the call is getting transferred. What changes are required?
v
@08anas To add a condition for transferring the call, as well as providing a message and context for the agent, you would typically need to use a more advanced feature of your voice API platform that supports conditional logic and pre-transfer messages. However, the JSON structure you've provided does not include a field for conditions. If the Voice API you're using supports conditions for call transfers, you would need to refer to its documentation for the exact syntax. Typically, such conditions would be based on variables or data collected during the call. Here's an example of what the structure might look like if your API supports conditions and messages, but please note that this is a hypothetical example and may not match the exact requirements of your API:
Copy code
json
{
  "type": "transferCall",
  "destinations": [
    {
      "type": "PhoneNumberTransferDestination",
      "number": "+918770331454",
      "conditions": {
        "customerName": {
          "eq": "John Doe"
        },
        "customerIssue": {
          "eq": "Billing"
        }
      },
      "message": "Transferring call to billing regarding John Doe's account."
    }
  ]
}
In this hypothetical example: -
conditions
is an object that includes the conditions for transferring the call. -
customerName
and
customerIssue
are example fields that might be used to determine if the call should be transferred. -
eq
is an example operator that stands for "equals," and it's used to specify the condition value. -
message
is a string that includes the message to be played or provided to the agent before the transfer. Please replace the
conditions
and
message
with the actual fields and values as per your API's documentation. If your API does not support such features, or if you're unsure how to proceed, you may need to contact the API provider's support for detailed guidance on implementing these features.
u
@Vapi But in my case the condition is a proper sentence and that can only be fetched if the caller says his/her name or address which does not match with the details retrieved from the db
Can somebody please help me with this problem? @Shubham Bajaj @Vapi @User
s
Hey @08anas To help track down this issue, could you share: - The call ID - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help me figure out what went wrong!
u
Sure @Shubham Bajaj Call ID: fa241ee2-090b-4e4b-83d4-348b040140d7 Timestamp: 1732893803078 I want the call to get transferred to the number provided in the call forwarding section along with some other info The call is not even getting forwarded to that number. Let me know what am I missing, thanks.
@Shubham Bajaj Any updates on this one?
Is there someone who can help me with this problem? @User @AiTitus :) @Shubham Bajaj
a
Are you setting this up with a transient agent or in the dashboard?
What's the call flow @08anas
u
In the dashboard itself Also I am using this for an inbound call and the tool is getting triggered whenever it is supposed to but the call is not getting transferred. Although I can see in the transcript that the call is getting transferred but it is not.
a
so whats the flow? 1. call in, 2. call tool to transfer, 3. transfer
is this the expected flow?
u
Yes
a
how do you know the call transfer tool is called? VAPI logs?
how are you callng the tool? in the prompt?
u
Yes
I have defined the tool in the prompt and mentioned it to call that tool when it is suppose to
a
can you send prompt you are using?
u
## Tools ###
humanTransfer
- Transfer the call if: - The caller's name cannot be confirmed after re-verification. - The caller's address does not match the retrieved details. ## Operational Flow ### Step 1: Warm Welcome - Start with a friendly and reassuring greeting. - Use
getTheCustomerDetails
to retrieve the name and address. - Confirm the name provided matches the retrieved name: - If the name matches, proceed directly to Step 2 to verify the address. - If the name matched is multiple, proceed directly to Step 2 to verify the address and check which one is the current address** - If the name does not match, politely re-confirm the caller’s name with the retrieved name just one last time - If it still does not match after re-verification, proceed to transfer the call. ### Step 2: Address Confirmation - Verify the caller-provided address matches the retrieved address: - If the address does not match, proceed to transfer the call immediately without re-confirmation. - If the address matches, confirm if it is their current address and proceed. - If two addresses exists for the same name, confirm by stating all the addresses and ask which one is the current address and proceed. There's more to it, but these are the main conditions to call the transferCall tool.
a
the tool name you have is humanTransfer you may want it to match VAPI transferCall name
so strange you see it calling the tool in logs but it's not transferring
do you have a number assosciated with the callTransfer tool?
u
Yes, I do
And that number is visible in the logs as well
a
i would create a new test agent with just the call transfer, simple prompt and see if that works first, i have noticed call transfers can be tricky sometimes but if correctly added in the prompt can fix some issues.
u
Is it something related to twilio, as in will the call only get forwarded to a twilio number?
@Shubham Bajaj Please look into the call logs you asked for and let me know the cause of the problem.
Do let me know if you have more questions.
u
@Shubham Bajaj Even I can see that the call is getting forwarded in the logs of the call but I am not getting any call though, we have already spoken about it yesterday in the office hours and you told me that we can connect to know more about the problem. Let me know when can we do it, thanks.
@Shubham Bajaj Can you please help with the problem?
s
@08anas Check DM.
6 Views