Structured Data not working
# support
n
Hey ! I have an assistant working in VAPI, with all her prompts, in Structured data also have a prompt which must appear in call logs after the transcript is done, but in analysis the data optput is empty. How can a fix it? A call ID for example: c76acbb8-cb39-46ed-96d0-fe3ae499657c Prompt: https://cdn.discordapp.com/attachments/1379825752111059175/1379825752337547345/image.png?ex=6841a65f&is=684054df&hm=896f317e0eb5691d734621b665ae5a6149e6b5ce4d4c58a5120420274e06ae35&
v
Try this: Double-check that your structured data schema is included as valid JSON in your assistant's configuration. For your use case, it should look like:
Copy code
json
{
  "structuredDataSchema": {
    "type": "object",
    "properties": {
      "TamizajeInicial": {
        "type": "object",
        "properties": {
          "CriteriosInclusion": {
            "type": "object",
            "properties": {
              "PreguntasRespuestas": {
                "type": "object",
                "properties": {
                  "edad_18_60": { "type": "boolean" },
                  "reside_bogota_urbano": { "type": "boolean" },
                  "conectividad_internet": { "type": "boolean" },
                  "sintomas_atenuados_post_hosp": { "type": "boolean" },
                  "red_apoyo_funcional": { "type": "boolean" },
                  "cuidador_mismo_domicilio": { "type": "boolean" },
                  "perdida_capacidades_impide_metas": { "type": "boolean" },
                  "consumo_sustancias_problema": { "type": "boolean" }
                }
              }
            }
          }
        }
      }
    }
  }
}
Paste this into your assistant's
analysisPlan
and make sure your prompt and schema are both set. If the transcript contains the relevant info, the structured data should appear in the analysis output. Source: - [Vapi Call Analysis Documentation](https://docs.vapi.ai/assistants/call-analysis#structured-data-schema)
n
still not working
c
Hey, you need to set the analysis plan structured data plan enable to true. Currently, it is set to false, that's why your structured data output is empty.
r
Hey Shubham, how can I do that in the dashboard? I'm having the same issue. My structured data was working fine 2 weeks ago but now it's passing empty values every time. For example, call id - 4359aff3-88bd-4150-a4cd-ca9d75d4911d Usually it would have passed something like this: Date - tomorrow Time - 2 pm Address - 607 Northeast third Place, 79031 Phone Number - 8063151217 But now it's all just empty (image attached). https://cdn.discordapp.com/attachments/1379825752111059175/1380588521932324995/Screenshot_2025-06-06_at_1.43.10_PM.png?ex=68446cc1&is=68431b41&hm=a226575c302dcd178582767f0220d914fe9a1859ca4d0e82dca02f612c322de1& https://cdn.discordapp.com/attachments/1379825752111059175/1380588522171269130/Screenshot_2025-06-06_at_1.43.49_PM.png?ex=68446cc1&is=68431b41&hm=bc2c9b1b81223053fc93ff4f79c8bab75a9ffe6c5ad552f4e19441207f44d469&
s
logs
šŸ”µ 21:47:23:488 Google Request. System Message: "You will be given a transcript of the call and the system prompt for an AI. Your job is to extract a time they want to book an appointment, extract a date that the person wants to book an appointment for.". Messages: [ { "role": "user", "parts": [ { "text": "Here is the transcript:\n\nAI: Hey. Can you hear me?\nUser: Hello?\nAI: Hi. I'm Lexi from Lincoln Pro Roofing. I'm an AI assistant, and my goal is to help you book your free roof inspection. But if you don't wanna receive any calls from us, let me know. You submitted a form via Facebook about replacing your roof. Is that right?\nUser: Yes.\nAI: Great. To help us get started, can you tell me roughly how old your roof is? No need to be super exact.\nUser: 15, 20 years.\nAI: Thanks for sharing that. Have you noticed any visible damage like leaks or missing shingles?\nUser: Yes. Missing shingles and leaks.\nAI: Got it. Thanks for letting me know. And for the purposes of booking your free roof in inspection, could you please confirm the address and ZIP code of your home?\nUser: 6 0 7 Northeast third Place, 7 9 0 3 1.\nAI: Perfect. Thank you for that information. Let's go ahead and schedule your free roof inspection. When would be a convenient day? And time for you? Just a note, we can start as early as tomorrow, but not today.\nUser: Okay. Tomorrow will be alright.\nAI: Great. What time tomorrow works best for you? Can schedule the inspection at a specific hour, like 10 AM, 2 PM,\nUser: About About Uh, about about 2 o'clock.\nAI: Alright. So just to confirm, you want to book the inspection for tomorrow at 2 PM. Is that correct?\nUser: Yes.\nAI: Perfect. To finalize your appointment, could you please let me know the best phone number to send a confirmation text with your appointment information? If it's the 1 you're using right now, can you say the number out loud just to confirm?\nUser: Okay. 8 0 6 3 1 5 1 2 1 7.\nAI: Got it? 8 0 6 3 1 5 1 2. 0, could you repeat the last 2 digits for me just to make sure I've got it right?\nUser: Hello. 1 1 7\nAI: Oh, sorry about that. I just wanted to\n\n\n. Here is the ended reason of the call:\n\nassistant-ended-call\n\n" } ] } ] "structuredDataPlan": { "schema": { "type": "object", "properties": { "Date": { "type": "string" }, "Time": { "type": "string" }, "Address": { "type": "string" }, "Phone Number": { "type": "string" } } }, "messages": [ { "role": "system", "content": "You will be given a transcript of the call and the system prompt for an AI. Your job is to extract a time they want to book an appointment, extract a date that the person wants to book an appointment for." }, { "role": "user", "content": "Here is the transcript:\n\n{{transcript}}\n\n. Here is the ended reason of the call:\n\n{{endedReason}}\n\n" } ] }
changes
{ "structuredDataPlan": { "enabled": true, "timeoutSeconds": 30, "useAssistantLlm": false, // Use Vapi's reliable default (Anthropic) "customLlmUrl": null, "schema": { // your schema here }, "messages": [ // corrected messages from previous solution ] } } Also set structuredDataMultiPlan to null.
2 Views