https://retellai.com/?utm_source=discord&utm_medium=seo logo
<@1145576664366055464> What do i put in format sch...
# ❓・ai-evy-support
h
@AI Evy What do i put in format schema
a
Thanks for tagging me @hxssxn_21. I'll look through relevant sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Integrate any system with custom function]() * [Define the information you want to extract]() * [Tool set up help request]() * [Trouble accessing the response of a function call]() -----------------------------
### Answer For custom functions, you'll need to define parameters using JSON schema format [(1)]() . Here's an example schema from the documentation:
Copy code
javascript
{
  "type": "object",
  "properties": {
    "city": {
      "type": "string",
      "description": "The city of the weather"
    }
  },
  "required": [
    "city"
  ]
}
For arrays, you can structure it like this:
Copy code
{
  "type": "object",
  "properties": {
    "availabilities": {
      "type": "array",
      "description": "A list of time slots where the hcp is available",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "availabilities"
  ]
}
[(2)]() A few key points: - The schema must include "type": "object" at the top level [(1)]() - Properties should define the expected data types and descriptions - You can specify which fields are required If you're having trouble saving the function, it's likely due to invalid parameters. It's recommended to start with one of the examples and modify accordingly.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
h
@AI Evy and what for format json
a
Thanks for the follow-up, @hxssxn_21. I'll get back to you soon.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Integrate any system with custom function]() * [Platform Changelogs | Retell AI]() * [custom function Error with VALID JSON Schema]() * [Tool set up help request]() -----------------------------
### Answer For the JSON format in custom functions, here's an example structure:
Copy code
javascript
{
  "name": "{{callerName}}",
  "phone": "{{callerPhone}}",
  "email": "{{callerEmail}}",
  "reason": "{{callReason}}"
}
[(1)]() Important notes: - Don't include fields like
$schema
and
title
in your JSON - they are not needed by Retell - The JSON structure should match the parameters you defined in your JSON schema - The payload that Retell sends will contain the call info under the
call
object and your defined properties under
args
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.