https://retellai.com/?utm_source=discord&utm_medium=seo logo
JSON for EdgesDo we need to add the JSON Schema fo...
# ❓・ai-evy-support
u
@AI Evy JSON for Edges Do we need to add the JSON Schema for every edge?
a
Thanks for tagging me @.manthu. I'll look through relevant sources and get back to you shortly.
### Answer No, you don't need to add a JSON schema for every edge. JSON schemas in edges are optional and typically used when you want to extract specific parameters during a transition. [(1) ]() Edges can use different transition condition types. For example, a simple prompt-based condition doesn't require JSON schema:
Copy code
json
{
  "id": "edge_1",
  "transition_condition": {
    "type": "prompt",
    "prompt": "Customer wants to book appointment"
  },
  "destination_node_id": "book_appointment"
}
You would add a JSON schema when you need to capture structured data during the transition (like extracting an appointment ID or customer details) . [(2) ]() If you do use JSON schema in edges, ensure: - Include
"type": "object"
at the top level - The
"required"
keys match the property names exactly (e.g., if the property is
"appointment_id"
, use
"appointment_id"
in required, not
"appointmentId"
)
​ To learn more, see the sources I considered: [[1] Update Conversation Flow](https://docs.retellai.com/api-references/update-conversation-flow) [[2] Error in playground when using multi-prompt with json in edges](https://discord.com/channels/1186424376300679209/1351840870835421224) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.