https://retellai.com/?utm_source=discord&utm_medium=seo logo
i need some help with parameter types
# ❓・ai-evy-support
a
@AI Evy i need some help with parameter types
a
Thanks for tagging me @Alex. I'll look through relevant sources and get back to you shortly.
### Answer I can help you with parameter types in Retell AI. Could you clarify which area you're working with? For Custom Functions: Parameters are defined using JSON schema format [(1) ]() . Here's an example structure:
Copy code
json
{
 "type": "object",
 "required": [
 "order_id"
 ],
 "properties": {
 "name": {
 "type": "object",
 "description": "",
 "properties": {
 "first_name": {
 "type": "string",
 "description": "User first name"
 },
 "last_name": {
 "type": "string",
 "const": "{{last_name}}"
 }
 }
 },
 "order_id": {
 "type": "number",
 "const": 1234
 }
 }
}
For Dynamic Variables: All dynamic variable values must be strings [(2) ]() . When passing them via API, they go in the
retell_llm_dynamic_variables
field:
Copy code
json
{
 "user_name": "John Smith",
 "product_name": "Premium Plan",
 "account_status": "active"
}
[(3) ]() Common issue: If you're getting parameter type errors, make sure you include
"type": "object"
at the top level of your JSON schema [(1) ]() . What specific parameter type issue are you encountering?
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[3] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy why can I not choose integer for the ttype of the parameter in my custom function on single prompt agent buidll
a
Thanks for the follow-up, @Alex. I'll get back to you soon.
### Answer You can use integer types in custom function parameters for Single Multi Prompt agents [(1) ]() [(2) ]() . The JSON schema format supports
"type": "number"
for numeric values . Here's an example from the documentation showing a number type parameter:
Copy code
json
{
 "type": "object",
 "required": [
 "order_id"
 ],
 "properties": {
 "order_id": {
 "type": "number",
 "const": 1234
 }
 }
}
If you're unable to select integer/number types in the UI: 1. Switch to JSON schema format - The documentation shows parameters can be defined using "JSON schema format or JSON form" . Try switching between these input modes in the dashboard. 2. Use the raw JSON editor - Instead of the form-based parameter builder, you can define parameters directly in JSON schema format, which gives you full control over types including
"type": "number"
or
"type": "integer"
. 3. Check the HTTP method - Parameter definitions are "only available for POST, PATCH and PUT requests" . If you're using GET or DELETE, you won't be able to define body parameters. For guidance on JSON schema formatting, refer to [OpenAI's Function Calling Guide]() or this [Function Calling Tutorial]() . What HTTP method are you using, and are you in the JSON schema or form-based parameter editor?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
a
@AI Evy im doing a post and right now it is form not JSON schema
a
Thanks for the follow-up, @Alex. I'll get back to you soon.
### Answer --- The form-based parameter editor may have limitations on available types [(1) ]() [(2) ]() . Switch to JSON schema format to get full control over parameter types including integers . In the custom function configuration, you can define parameters using either JSON schema format or JSON form . The JSON schema format gives you complete flexibility to specify
"type": "number"
or
"type": "integer"
for numeric parameters . Here's how number types work in JSON schema:
Copy code
json
{
 "type": "object",
 "required": [
 "order_id"
 ],
 "properties": {
 "order_id": {
 "type": "number",
 "const": 1234
 }
 }
}
[(1) ]() Look for a toggle or option in the dashboard to switch from the form view to JSON schema view when defining your parameters [(1) ]() [(2) ]() . This should give you access to all standard JSON schema types. **
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.