Unable to Extract Structured Data from End-of-Call...
# support
f
Hi, I am unable to get the Structured Data from my end-of-call-report. Attached my prompt and the report screenshots. Can you help me resolve this? @VAPI Tech @Vapi Support Bot @vapi @Vapi @Vapi @vapi @vapi user @Vapi-enjoyer @Vapi9817234 @Shubham Bajaj @Support.Voice-Agent @supportr https://cdn.discordapp.com/attachments/1348896721010167808/1348896722344087604/image.png?ex=67d12177&is=67cfcff7&hm=9fa20ddd3e0877762e71ed1f3f99012749ba1affa40a6e2a0f36466495133d38& https://cdn.discordapp.com/attachments/1348896721010167808/1348896722587226163/image.png?ex=67d12177&is=67cfcff7&hm=d8d8f65ba690728f6df8ec97870db98cda47e9ec2d18de10bf16e734d8fd5fc7&
v
Hi there! 👋 I see you're having trouble extracting structured data from your end-of-call reports. Let me help you troubleshoot this issue. Based on your screenshots, I can see you've set up a prompt to extract Pre-qualification Status, Budget, and Purpose, but you're not getting the structured data in your report. Here are some common issues and solutions: 1. **Check your structured data configuration**: Make sure you have both
structuredDataPrompt
and
structuredDataSchema
properly configured in your assistant settings:
Copy code
json
   {
     "structuredDataPrompt": "Extract all of the information needed for the desired properties of the call.",
     "structuredDataSchema": {
       "type": "object",
       "properties": {
         "budget": { "type": "string" },
         "purpose": { "type": "string" },
         "preQualificationStatus": { "type": "string" }
       },
       "required": ["budget", "purpose", "preQualificationStatus"]
     }
   }
2. Enable server messages for end-of-call reports:
Copy code
typescript
   serverMessages: ['end-of-call-report']
This ensures the report is sent to your webhook when a call ends [source](https://discord.com/channels/1211482211119796234/1211483291191083018/1342410769232302122). 3. **Verify webhook setup**: Ensure your webhook is correctly configured to receive and process the end-of-call reports. Here's an example implementation:
Copy code
javascript
   app.post('/vapi-webhook', async (req, res) => {
     const message = req.body;
     if (message.type === 'end-of-call-report') {
       // Check if structured data exists
       console.log(message.artifact?.structuredData);
       // Process the data
     }
     res.status(200).json({ success: true });
   });
4. **Check timeout settings**:
I notice you've set a structured data request timeout. The default is 20 seconds, but you can set it between 1 and 120 seconds. If your value is too low, the LLM might not have enough time to extract the data [source](https://discord.com/channels/1211482211119796234/1211483291191083018/1339941602872918068). 5. **Review transcript accuracy**: If the transcript has inaccuracies, it can affect structured data extraction. Consider updating your prompt to be more robust to transcript variations [source](https://discord.com/channels/1211482211119796234/1211483291191083018/1333710576609787986). Let me know if you've checked these items and are still having issues! Sources: - [Webhook Configuration](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342410769232302122) - [Transcript Accuracy](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333710576609787986) - [Request Timeout Settings](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339941602872918068)
p
Hello Hey! 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 us figure out what went wrong!
f
Call id : 8ee5b903-15bc-4039-8663-79f7888546b1
I expected to get the outcome with structured data having the field Prequalification Status
p
@FaresAhmed the structured data plan is missing from your assistant analysis plan, add it and then it will work.
current
Copy code
"analysis": {
    "summary": "Ivana from Fidu Properties called Fares to follow up on his interest in a project from a social media ad. Fares confirmed he has a budget of 2 million, is primarily interested in the specific project as an investment, and wants to proceed immediately. A meeting with a senior property consultant was scheduled for the following day at 3 PM.",
    "successEvaluation": "true"
  }
f
Yeah. But i already added via dashboard. Please refer to the screenshot
p
Hello Fares, on the back end your structured data plan is not saved to your assistant. Could you please double check you've pressed publish and then test again?
2 Views