Structured Date and Structured Output
# support
y
Is there any way to use Structured Data inside the Structured Output?
v
Yes, you can use structured (nested) data inside a Structured Output by defining object properties within your JSON Schema. For example:
Copy code
json
{
  "type": "object",
  "properties": {
    "customer": {
      "type": "object",
      "properties": {
        "name": { "type": "string" },
        "email": { "type": "string", "format": "email" }
      },
      "required": ["name"]
    },
    "issue": {
      "type": "object",
      "properties": {
        "description": { "type": "string" },
        "priority": { "type": "string", "enum": ["low", "medium", "high"] }
      }
    }
  },
  "required": ["customer", "issue"]
}
Just define your nested structure in the
properties
field as shown above.
For more details, see the [Vapi structured outputs documentation](https://docs.vapi.ai/assistants/structured-outputs). Source: - [Structured outputs documentation](https://docs.vapi.ai/assistants/structured-outputs)
y
No, I mean the assistant’s analysis - structured data section.
No, I mean the assistant’s analysis - structured data section. @Vapi Support Bot
v
You cannot directly reference the assistant’s built-in analysis (structured data section) as a field inside your Structured Output. However, you can extract similar information by defining a schema and using variables like
{{transcript}}
in your prompt. For example, to extract a summary:
Copy code
json
{
  "type": "object",
  "properties": {
    "callSummary": { "type": "string", "description": "Summary of the call" }
  },
  "required": ["callSummary"]
}
In your prompt, instruct the model to summarize the conversation using
{{transcript}}
.
See more: [Structured outputs documentation](https://docs.vapi.ai/assistants/structured-outputs) Source: - [Structured outputs documentation](https://docs.vapi.ai/assistants/structured-outputs)
y
Then can I use {{analysis.structuredData}} in my
Structured Output
prompt? @Vapi Support Bot
v
Thank you for your question. The documentation does not list
{{analysis.structuredData}}
as an available variable for Structured Output prompts—only variables like
{{transcript}}
and
{{messages}}
are mentioned. Could you clarify if you are trying to reference data already extracted by the assistant’s analysis, or are you looking to extract similar data within your own Structured Output schema? This will help me provide the most accurate guidance for your use case. Source: - [Structured outputs documentation](https://docs.vapi.ai/assistants/structured-outputs)
y
I am trying to reference data already extracted by the assistant’s analysis for the Structured Output prompt. @Vapi Support Bot
v
You cannot reference data already extracted by the assistant’s analysis (such as
{{analysis.structuredData}}
) in your Structured Output prompt.
Only these variables are available for Structured Output prompts: -
{{transcript}}
-
{{messages}}
-
{{callEndedReason}}
-
{{structuredOutput.name}}
-
{{structuredOutput.description}}
-
{{structuredOutput.schema}}
To extract similar information, define your own schema and use
{{transcript}}
in your prompt to instruct the model accordingly.
See: [Structured outputs documentation](https://docs.vapi.ai/assistants/structured-outputs) Source: - [Structured outputs documentation](https://docs.vapi.ai/assistants/structured-outputs)
y
Okay. So I can reference data extracted by other structuredOutput, but not by the assistant’s analysis for strucutredOutput prompt, right? @Vapi Support Bot
v
No, you cannot reference data extracted by other Structured Outputs in your Structured Output prompt. Only these variables are available: -
{{transcript}}
-
{{messages}}
-
{{callEndedReason}}
-
{{structuredOutput.name}}
-
{{structuredOutput.description}}
-
{{structuredOutput.schema}}
Each Structured Output operates independently and cannot access results from other extractions. See the [Structured outputs documentation](https://docs.vapi.ai/assistants/structured-outputs) for details. Source: - [Structured outputs documentation](https://docs.vapi.ai/assistants/structured-outputs)
y
Got it. Does VAPI have a plan to deprecate assistant's analysis -
structuredData
, but support
structuredOutput
in the future? @Vapi Support Bot
Got it. Does VAPI have a plan to deprecate assistant's analysis-structuredData, but support structuredOutput in the future? @Vapi Support Bot
c
There's currently no ETA on when analysisPlan.structuredData will be deprecated, but we recommend using structuredOutputs as it will likely be supported for a while