how to get the summary and the structured data, af...
# support
n
I used a prompt to generate the summary. Now, how do I access the summary?
v
@Nocreativity To access the summary you've generated using the prompt, you can typically find it stored in the
call.analysis.summary
section of the call record. If you have the call record available, you should be able to locate the summary there. If you need assistance with retrieving the summary from the system or if you're unsure where to find the call record, please let me know, and I'll be happy to help you further.
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
a
I attempted to get it as well but faild. I set the server url correctly, created pages/api/route.ts that waited for POST message and checked for end-of-call-report, that is:
Copy code
if (req.method === 'POST') {
    const body = req.body;
    if (body.message && body.message.type === 'end-of-call-report') {
      const callId = body.message.call.id;
      const summary = body.message.summary;
and connected to my backend via server sent events, but I'm having 20:00:44:301 [ERROR] Server URL Error: all the tim when the call ends, probably causing the issue?
s
Check the data you are receiving and then see whether the end-of-call-report contains the summary or not.
n
@Sahil u are correct, i had somehow assumed recordingURL was under analysis without opening the analysis key due to formatting
Hey @Avenir , I'd love to help, but it seems like your issue is different from mine. It might be best if you create a new post detailing your problem. Like that you can get more specific advice from others who may have faced the same issue.
k
Hi, I am kind of new to VAPI, and have successfully implemented what we need except for one small thing. Once a call is complete, we are looking to extract the structuredData output from analysis plan. None of the APIs are clearly documented to show how to do that. Looking for help.
a
body.message.analysis.structuredData
this is what you need to access mate
k
@Avenir is there any way to access call id while the call is in progress? Basically we wanted to get the structuredData right after the call ends.
2 Views