Tool call doesn't collect any information and isn'...
# support
m
It should be sending this info to a webhook and I know the info is discussed within the call. In the call logs under analysis it says N/A under data Using Gemeni 2.0 flash for context and the transfer tool call but this one is a function that isnt working. Here is the code for the tool config
Copy code
{
  "id": "950b43e0-ef86-44a1-9da9-a45e93a246e4",
  "createdAt": "2025-05-02T15:43:19.348Z",
  "updatedAt": "2025-05-05T13:41:01.371Z",
  "type": "function",
  "function": {
    "name": "logLeadToCRM",
    "strict": false,
    "description": "Log a qualified lead to CRM",
    "parameters": {
      "type": "object",
      "properties": {
        "name": {
          "description": "The name of the caller",
          "type": "string"
        },
        "email": {
          "description": "The email of the caller",
          "type": "string"
        },
        "phone": {
          "description": "the phone number of the caller",
          "type": "string"
        },
        "address": {
          "description": "the address of the caller",
          "type": "string"
        },
        "isHomeowner": {
          "description": "Whether or not the caller is the homeowner",
          "type": "boolean"
        },
        "callbackTime": {
          "description": "The callback time reserved by the caller",
          "type": "string"
        }
      },
      "required": [
        "name",
        "phone",
        "isHomeowner"
      ]
    }
  },
  "orgId": "9d1d8b58-85cc-485d-9406-cb08ab846701",
  "server": {
    "url": "https://testdomain.com/webhook/voice-agents/tool-calls/new-lead",
    "headers": {}
  },
  "async": true
}
v
Check your webhook server's response format. Vapi expects a specific JSON structure with the correct `toolCallId`:
Copy code
json
{
  "results": [{
    "toolCallId": "the-actual-tool-call-id-from-request",
    "result": "Successfully logged lead information"
  }]
}
Ensure your server returns HTTP 200 status (even for errors) and verify the webhook URL is accessible from outside your network. Sources: - [Discord conversation about tool call response format](https://discord.com/channels/1211482211119796234/1325000684231196775) - [Discord conversation about webhook issues](https://discord.com/channels/1211482211119796234/1326809606671958080)
m
My webhook isnt even receiving any data. It is not sending.
c
Hey! 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 us figure out what went wrong!
m
Assistant ID: 6392cd33-7769-4ce8-aa2b-467f425d1b72 Call ID: 64042567-c328-47d7-af54-b48a2cd3e24e I simplified the fucntion to just try and collect name. All i am trying to do is collect information about the caller and send it to a webhook before the call ends, but the tool never gets triggered.
@Shubham Bajaj Forgot to tag you here
@Shubham Bajaj Following up on this
s
looking into it.
I looked into the shared call ID logs, the transcript, and the system prompt. You need to do rework on your prompt. Basically, what's happening is your condition of triggering this tool
logLeadToAnovaCRM
is defined after the transfer tool call, so your call never reaches to this point. Instead, you have to first trigger the tool and then trigger the transfer tool call. You might need to use something like this in your prompt instead.
Copy code
trigger the `logLeadToAnovaCRM` tool and trigger the `transferCall` tool
Let me know your thoughts on this.
m
@Shubham Bajaj Ill give it a try now. Thank you
c
a gentle reminder to continue this thread.
m
Sorry just finished this up now. That fixed the issue.
c
Marking this ticket as Solved ✅
2 Views