VAPI is not giving me Call ended reason when i int...
# support
l
i have connected VAPI call assistant with shopify, so whenever someone orders on my shopify store, VAPI calls the customer. i have setted up VAPI using HTTP "make a request" module. now i want it to update a google sheet with the call ended reason. but i cannot get the call ended reason in the HTTP output, i need it to update my google sheet according to the call end reason. i am sharing the json code. pls check if someone can help https://cdn.discordapp.com/attachments/1317169217698664478/1317169217988067390/Json_Code.txt?ex=675db4ed&is=675c636d&hm=a02d22f9312b1bbdb4fcbb2265cf2138afab7d02c29b683cc723f4733f028d0b&
v
message has been deleted
@LP Gaming Certainly! To assist you better, I would need to see the JSON code you're referring to. This will help me understand how you're currently handling the data and what might be missing in order to capture the call ended reason. Once I have that information, I can guide you on how to modify your setup to include the call ended reason in the HTTP output. Please share the JSON code, and I'll do my best to help you out.
You can continue this conversation by mentioning me in the message.
v
@LP Gaming I apologize, but it seems there might have been a misunderstanding. I haven't received the JSON code you're referring to. Could you please provide the JSON output code again? Make sure to paste the code directly into the message so I can review it and offer you the assistance you need.
check it @Vapi
v
@LP Gaming I'm sorry, but it appears there might be an issue with the transmission of the JSON code you're trying to share. If you're pasting the code into the chat and it's not appearing, there could be a technical glitch or formatting issue. To proceed, please try sharing the JSON code once more. Make sure to paste it directly into the chat window. If it still doesn't work, you might want to check if there are any special characters or formatting that could be preventing the code from being sent correctly. Alternatively, you can describe the structure of the JSON output you're getting from the HTTP request and where you're expecting to find the call ended reason. With that information, I can provide guidance on how to modify your setup to capture the necessary data for updating your Google Sheet.
l
@Vapi i cannot do it as of the text is too long to be uploaded as a message
v
@LP Gaming I understand the challenge you're facing with the length of the text. In that case, let's try a different approach. Could you provide a brief summary or the key parts of the JSON structure? Specifically, I'm interested in the following details: 1. The top-level properties of the JSON object. 2. Any property that seems related to the call status or call end reason. 3. The structure of the data that you receive after a call ends. Even a few lines of the JSON with sensitive information redacted could be helpful. This will allow me to understand the data you're working with and guide you on how to extract the call ended reason. Alternatively, if the JSON output is from a known API or service, you could share the documentation link for that API, and I can look up the relevant information there.
l
@Vapi is it ok if i share only the top part
v
@LP Gaming Absolutely, sharing just the top part of the JSON output can be very helpful. Please provide the portion of the JSON that you're able to, and I'll do my best to assist you with extracting the call ended reason for your Google Sheet update.
l
[ { "statusCode": 201, "headers": [ { "name": "date", "value": "Fri, 13 Dec 2024 16:27:34 GMT" }, { "name": "content-type", "value": "application/json; charset=utf-8" }, { "name": "content-length", "value": "3151" }, { "name": "connection", "value": "keep-alive" }, { "name": "x-powered-by", "value": "Express" }, { "name": "access-control-allow-origin", "value": "*" }, { "name": "etag", "value": "W/\"c4f-/DHkoWk16bR2h5dynCTYpt48jSM\"" }, { "name": "cf-cache-status", "value": "DYNAMIC" }, { "name": "set-cookie", "value": "_cfuvid=YKTU642qQuVfiOLRAJ1COaLd9thPV8D_TEeADnZBtus-1734107254631-0.0.1.1-604800000; path=/; domain=.vapi.ai; HttpOnly; Secure; SameSite=None" }, { "name": "server", "value": "cloudflare" }, { "name": "cf-ray", "value": "8f17527ec8f89591-DUB" }, { "name": "alt-svc", "value": "h3=\":443\"; ma=86400"
@Vapi [ { "statusCode": 201, "headers": [ { "name": "date", "value": "Fri, 13 Dec 2024 16:27:34 GMT" }, { "name": "content-type", "value": "application/json; charset=utf-8" }, { "name": "content-length", "value": "3151" }, { "name": "connection", "value": "keep-alive" }, { "name": "x-powered-by", "value": "Express" }, { "name": "access-control-allow-origin", "value": "*" }, { "name": "etag", "value": "W/\"c4f-/DHkoWk16bR2h5dynCTYpt48jSM\"" }, { "name": "cf-cache-status", "value": "DYNAMIC" }, { "name": "set-cookie", "value": "_cfuvid=YKTU642qQuVfiOLRAJ1COaLd9thPV8D_TEeADnZBtus-1734107254631-0.0.1.1-604800000; path=/; domain=.vapi.ai; HttpOnly; Secure; SameSite=None" }, { "name": "server", "value": "cloudflare" }, { "name": "cf-ray", "value": "8f17527ec8f89591-DUB" }, { "name": "alt-svc", "value": "h3=\":443\"; ma=86400"
v
@LP Gaming Thank you for sharing the top part of the JSON output. From what you've provided, it looks like this is the HTTP response header information from a request that has been made, indicated by the "statusCode": 201, which means the request was successful. However, the information you're looking for, which is the call ended reason, is typically part of the response body, not the headers. The headers are just metadata about the response, such as content type, date, server, etc. To update your Google Sheet with the call ended reason, you'll need to access the response body of the HTTP request. This body should contain the actual data payload returned by the API, which would include the call ended reason if the API provides it. If you have access to the response body or if there's more to the JSON output that includes the body, please look for a property that might contain the call end details. It might be named something like "callEndReason", "callStatus", "callDetails", or similar. If you're unable to share the full response body due to its length, try to locate the section that includes the call result information and share that specific part. If you're still having trouble, please let me know, and we can try to find another solution.
l
}, "voice": { "model": "eleven_turbo_v2", "voiceId": "Lhkfd0eq2F87bgx4Aozc", "provider": "11labs", "stability": 0.5, "similarityBoost": 0.75, "fillerInjectionEnabled": false }, "firstMessage": "Hello? Did you order any product from impressHub?", "endCallPhrases": [ "Thank you" ], "clientMessages": [ "transcript", "hang", "function-call", "speech-update", "metadata", "transfer-update", "conversation-update" ], "serverMessages": [ "end-of-call-report", "status-update", "hang", "function-call" ], "backgroundSound": "office", "backchannelingEnabled": false, "backgroundDenoisingEnabled": false, "stopSpeakingPlan": { "voiceSeconds": 0.2 @User
@Vapi }, "voice": { "model": "eleven_turbo_v2", "voiceId": "Lhkfd0eq2F87bgx4Aozc", "provider": "11labs", "stability": 0.5, "similarityBoost": 0.75, "fillerInjectionEnabled": false }, "firstMessage": "Hello? Did you order any product from impressHub?", "endCallPhrases": [ "Thank you" ], "clientMessages": [ "transcript", "hang", "function-call", "speech-update", "metadata", "transfer-update", "conversation-update" ], "serverMessages": [ "end-of-call-report", "status-update", "hang", "function-call" ], "backgroundSound": "office", "backchannelingEnabled": false, "backgroundDenoisingEnabled": false, "stopSpeakingPlan": { "voiceSeconds": 0.2
v
@LP Gaming Thank you for providing more details from the JSON configuration. It looks like you have a list of
clientMessages
and
serverMessages
that are used for different types of communication during the call. Among the
serverMessages
, there is an "end-of-call-report" message type, which suggests that the server sends a report at the end of the call. To update your Google Sheet with the call ended reason, you would typically need to capture the content of the "end-of-call-report" message, as it likely contains the information you're looking for. Here's what you can do: 1. Check the documentation of the VAPI or the service you're using to understand the structure of the "end-of-call-report" message. It should detail what kind of information is included and how it's formatted. 2. Modify your HTTP "make a request" module or the corresponding webhook to capture the "end-of-call-report" message. Ensure that you're processing the response body, not just the headers. 3. Once you have the "end-of-call-report" message, extract the call ended reason from it. This will likely be a field within the message's body. 4. Use the extracted call ended reason to update your Google Sheet. You might need to use an additional service or module that integrates with Google Sheets to perform this update. If you're not sure how to capture or process the "end-of-call-report" message, or if you need help with the specific field names and data extraction, please refer to the documentation of the service you're using or reach out to their support team for more detailed guidance. If you have access to the actual "end-of-call-report" message and need help with parsing it, feel free to share that part of the JSON, and I can provide more specific instructions.
l
@Vapi how will i make it capture the end call report becuase it is empty in the output
how will i make it capture the end call report becuase it is empty in the output. can you tell me what do i need to change in the code to make it capture the endcall report @Vapi
s
@LP Gaming Sorry for the late response. Are you still experiencing this problem? If so, could you send over a recent call ID so I can take a look?
Because of no response closing this ticket.
3 Views