Data transfer via webhook
# support
h
Hello, I hope you are well. I was sending call data to a "make" scenario via the "Server URL" in the Assistant settings. Until today, the customer number that the Assistant called was passed through the "message.customer.number" json, which we used to update contacts, but now it returns "anonymous" instead of the customer number. Can you please advise how I should pass the customer number via a webhook?
v
Hi there! 👋 Sorry to hear you're having trouble with the customer number being returned as "anonymous" in your webhook. I'm unable to determine exactly why your previously working setup suddenly changed to return "anonymous" instead of the actual customer number. However, I can definitely help with how to properly pass the customer number via a webhook! Here are several approaches you can try to ensure the customer number is correctly passed: ### 1. Using the
{{customer.number}}
Dynamic Variable The
{{customer.number}}
dynamic variable is designed to access the caller's phone number. This variable returns the E.164 formatted number (with the + prefix). For example, when setting up a call transfer, you can use:
Copy code
json
{
  "destination": {
    "type": "number",
    "number": "+*******",
    "message": "",
    "caller_id": "{{customer.number}}"
  }
}
According to [documentation found](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1341078918945439775), this is the correct variable to use for accessing the customer's number. ### 2. Using
assistantOverrides
and
variableValues
If you're using the Vapi SDK, you can pass data to the webhook using the
assistantOverrides
parameter:
Copy code
javascript
vapiInstance = vapiSDK.run({
  apiKey: apiKey,
  assistant: assistant,
  config: buttonConfig,
  assistantOverrides: {
    variableValues: {
      userId: "yourUserIdHere" // This can be adapted for customer number
    }
  }
});
This way, the customer number will be available when Vapi calls your webhook, as mentioned in [this source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339495894801711186). ### 3. Webhook Configuration Troubleshooting Several issues could cause the customer number to return as "anonymous": - **Check your webhook URL**: Ensure the Server URL in your Assistant settings is correctly pointing to your Make.com scenario URL.
- **Review webhook configuration**: Make sure your Make.com scenario is properly set up to receive and process JSON payloads. - **Verify phone number formatting**: Ensure phone numbers include the correct country code and are properly formatted according to the E.164 standard. - **Test with Postman**: Use a tool like Postman to manually send test payloads to your webhook URL. - **Check logs**: Implement logging on both sending and receiving ends to capture the raw data being transmitted. - **Validate JSON**: Use a JSON validator (like https://jsonlint.com/) to check if your data is properly formatted. According to [troubleshooting information](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1330221332452999321), webhooks can sometimes get stuck on old configurations, which might explain the sudden change in behavior. Is there anything specific about your webhook configuration or Make.com scenario that you'd like me to help with further? Sources: - [Discord thread about customer.number variable](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1341078918945439775) - [Discord thread about assistantOverrides](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339495894801711186) - [Discord thread about webhook troubleshooting](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1330221332452999321)
k
Hey! To help track down this issue, could you share: - The call ID This would really help us figure out what went wrong!