@Rb Surge
VAPI is designed to be flexible and smart when it comes to handling JSON data. However, it does require clear instructions on which data to use from the JSON response. If you want VAPI to use specific data from a webhook query response, you should ensure that the relevant items are included in the response and are properly formatted.
When your server receives an HTTP request from VAPI, it should process the request, extract the necessary data, and then format the response in the JSON structure that VAPI expects. VAPI will then parse the JSON response and use the data as instructed in the tool's configuration.
If you have specific data points you want to use from the webhook query, you should include them in the "results" array of the response JSON. Here's an example of how to structure the response:
json
{
"results": [
{
"toolCallId": "unique_identifier_for_tool_call",
"result": "data_point_you_want_to_use"
},
// ... other results if necessary
]
}
If you need assistance with configuring your server to handle the webhook query and format the response for VAPI, please let me know, and I can provide further guidance.