Vapi integration for Restaurant Pickup / Delivery ...
# support
m
Hello @Shubham Bajaj , We are integrating Vapi AI voice agent for restaurant order placement. While fetching addons of fooditem or fooditem itself we can see wehhook log but AI agent respond with data from your database. We are work in nick's(nick@orderchop.com) organisation with orderchopassistant Can you guide me what I am doing wrong cc : @NickTheAussie
v
@Malay Hello! It sounds like you're trying to integrate VAPI's AI voice agent to handle restaurant orders and you're encountering an issue where the AI agent is not responding with the correct data from the webhook, but rather from the internal database. To assist you better, I would need a bit more information about how you've set up the webhook and the assistant's configuration. Here are a few questions that can help us pinpoint the issue: 1. Have you correctly configured the webhook URL in the assistant's settings to point to your service that provides the addons and food item data? 2. Is the webhook service returning the correct data when called directly (outside of the VAPI environment)? 3. Have you set up the assistant's intent and entity recognition to correctly parse the user's request and call the webhook with the right parameters? 4. Are there any conditions or filters set up in the assistant that might be causing it to default to the internal database instead of the webhook? Please check these configurations, and if everything seems to be set up correctly, it might be helpful to look at the logs to see if there are any errors or unexpected behaviors when the webhook is called. If you need further assistance, please provide additional details or error messages you're encountering, and I'll do my best to guide you through the troubleshooting process.
You can continue this conversation by mentioning me in the message.
s
Hey @Malay 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!
m
Call ID: "tool_call_id": "b08d362c-2bbb-4cbd-bcac-528e21931225" Timestamp: "timestamp": 1732772776061 Expected Response: The assistant should read the following data provided by your getFoodDataNew webhook: { "results": [ { "tool_call_id": "b08d362c-2bbb-4cbd-bcac-528e21931225", "result": "- Test Product: $0.00\n- 9 cheese: $15.50\n- Ice cream: $4.95\n- Cheesecake: $4.95\n- Mousse cake: $4.95\n- Apple: $0.99\n- Pear: $1.00\n- Banana: $0.39\n- Kiwi: $0.59\n- Open charge: $0.00" } ] } Actual Response: The assistant retrieved the data but instead read information from a different data source (likely your database). Issue Description: The assistant did not process or speak the result field from the webhook response correctly. Instead, it relied on data from another source, which is not what you intended. @Shubham Bajaj cc : @NickTheAussie
s
@Malay I need call id to debug the call which is unique to each call, you can get the call id from Vapi dashboard. 1. Goto Vapi Dashboard 2. Navigate to left side of dashboard (navbar) and look for logs > calls 3. Copy the Id under call ID. Make sure to share the recent call's call id.
m
@Shubham Bajaj Sharing latest call id "e47b7fa2-8e71-4042-b308-6e64c966cad6" Let me know if any more information required. Also would like to know if there is predefined template/demo available for Restaurant Ordering cc : @User
s
@Malay your returning call id in place of tool call id for the tool call. As you can see in the log you expected to return the tool call id but instead your returning call id. Return the tool call id in the response as expected and then it will work.
logs
🔵 05:38:43:183 Server Message Requested...(tool-calls , https://newdev.orderchop.dev/wp-json/rp-api/v1/fooditems-new): { "type": "tool-calls", "toolCalls": [ { "id": "call_WkhLZdMzvKcYdGLMjFIwXHBl", "type": "function", "function": {"name": "getFoodDataNew", "arguments": {}} } ], "toolCallList": [ { "id": "call_WkhLZdMzvKcYdGLMjFIwXHBl", "type": "function", "function": {"name": "getFoodDataNew", "arguments": {}} } ], "toolWithToolCallList": [ { "type": "function", "function": { "name": "getFoodDataNew", "async": false, "description": "list of food item" }, "async": true, "server": { "url": "https://newdev.orderchop.dev/wp-json/rp-api/v1/fooditems-new" }, "messages": [], "toolCall": { "id": "call_WkhLZdMzvKcYdGLMjFIwXHBl", "type": "function", "function": {"name": "getFoodDataNew", "arguments": {}} } } ] }
m
@Shubham Bajaj Thank you. Will let you know if I found any difficulties in integration again cc: @NickTheAussie
@Shubham Bajaj is there a way we can limit maximum topping modifiers/addons for food item? cc @NickTheAussie
s
You can handle this logic using prompting, create a separate section and add all of the constraints over there and then ask the assistant to use it before triggering or duing the user input for validation.
p
Hi @Shubham Bajaj I’m trying to dynamically retrieve the phone number from an incoming call using WAPI. I need to confirm the number with the user during the call. Here’s the conversation flow I’d like to implement: AI: “Thank you for calling [Orderchop]! May I start by confirming the phone number you’re calling from? I have it as [1234567890]. Is that correct?” Could you guide me on how to retrieve the caller’s phone number dynamically from the incoming call and use it in my application to ask for confirmation? Any example or documentation reference would be greatly appreciated cc : @User , @User
s
@parth kathiriya you can use use
{{customer.number}}
in your prompt to get customer number now.
For other doubts and questions create a new support ticket.
4 Views