https://retellai.com/?utm_source=discord&utm_medium=seo logo
why is my JSON schema in a custom function dissape...
# ❓・ai-evy-support
w
@AI Evy why is my JSON schema in a custom function dissapearing after I save it with no error messages?
a
Thanks for tagging me @weronika. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] JSON Schema not saving in custom functions](https://discord.com/channels/1186424376300679209/1319363416296657039) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[3] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
### Answer This is a common issue that typically happens when there's a problem with your JSON format. [(1) ]() Most likely cause: You may be including the function/tool name and description inside the JSON schema itself. The name and description should go in the separate form fields in the dashboard—only the
parameters
portion should go in the JSON parameters field. Another common mistake: Not adding
"type": "object",
to the top level of the JSON schema. [(2) ]() , [(3) ]() Here's an example of the correct format for the parameters field:
Copy code
json
{
  "type": "object",
  "required": [
    "order_id"
  ],
  "properties": {
    "name": {
      "type": "object",
      "description": "",
      "properties": {
        "first_name": {
          "type": "string",
          "description": "User first name"
        }
      }
    },
    "order_id": {
      "type": "number",
      "const": 1234
    }
  }
}
[(2) ]() If the issue persists, try clicking one of the example templates in the dashboard and updating accordingly.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.