https://retellai.com/?utm_source=discord&utm_medium=seo logo
is Parameter Name "function" allowed in custom fun...
# 💬・general
q
@AI Evy is Parameter Name "function" allowed in custom functions? I use 'Form' to add parameters, but for unknown reason 'function' parameter is always exluded
a
Thanks for tagging me @q40478. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available sources, I don't have specific information about whether "function" is a reserved or restricted parameter name in Retell AI custom functions. When you define parameters for custom functions using JSON schema format or JSON form, the documentation shows examples with properties like "city", "user_zip", and "user_number" [(1) ]() [(2) ]() [(3) ]() , but doesn't explicitly list restricted parameter names. The issue you're experiencing—where the "function" parameter is always excluded—suggests it may be a reserved keyword in Retell's system, since "function" appears in the request body structure that Retell sends to your endpoint [(2) ]() . When Retell makes a request, the body includes a
name
field for the function name and an
args
field for the arguments . I'd recommend trying an alternative parameter name (like "function_type", "operation", or "action") to avoid potential conflicts with Retell's internal structure. If you need further clarification on reserved parameter names, check out these potentially useful sources: - [Integrate any system with custom function]() - [Custom Function]() For additional support: - Visit [Contact Sales]() - Visit [) Would you like me to provide a general answer based on common API design patterns?
​ 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) [[3] Custom Function issue - urgent help require](https://discord.com/channels/1186424376300679209/1422619390347841556) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
q
@AI Evy JSON form
a
Thanks for the follow-up, @q40478. I'll get back to you soon.
### Answer ### Answer When defining parameters for custom functions in Retell AI, you can use either JSON schema format or JSON form [(1) ]() [(2) ]() . The documentation shows you can define parameters using JSON schema format like this [(1) ]() :
Copy code
json
{
 "type": "object",
 "properties": {
 "city": {
 "type": "string",
 "description": "The city of the weather"
 }
 },
 "required": [
 "city"
 ]
}
The JSON form provides a visual interface for defining the same parameters . Regarding your specific issue with the "function" parameter being excluded, the sources don't explicitly list restricted parameter names. However, when Retell sends requests to your custom function endpoint, the request body structure includes a
name
field (the function name) and an
args
field (the arguments) [(1) ]() [(2) ]() . This suggests "function" might conflict with Retell's internal structure. Try using an alternative parameter name like "function_type", "operation", or "action" to avoid potential conflicts. For additional support: - Visit [Contact Sales]() - Visit [) Would you like me to provide a general answer based on common API design patterns?
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
q
@AI Evy how to use dynamic variables in custom function JSON form. How are they declared
a
Thanks for the follow-up, @q40478. I'll get back to you soon.
Copy code
json
{
 "properties": {
 "user": {
 "name": "John Doe",
 "age": 26
 }
 }
}
[(2) ]() You can extract and save these values as dynamic variables to reference later in your conversation .
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[3] Response Variables - Part of Future Function Calls in JSON?](https://discord.com/channels/1186424376300679209/1396550506347761686) ​
### Answer ### Answer Dynamic variables in Retell AI custom functions use the
{{variable_name}}
syntax [(1) ]() . You can use dynamic variables in several places within custom function configurations [(2) ]() [(1) ]() : Where to use dynamic variables: - Custom function URLs [(1) ]() - Request headers (header values can include dynamic variables) [(2) ]() - Query parameters (query parameter values can include dynamic variables) - Tool descriptions [(1) ]() - Property descriptions How they're declared: Dynamic variables are declared using double curly braces:
{{variable_name}}
Using response variables from previous functions: You can use response variables extracted from a previous custom function's API response in subsequent function calls [(2) ]() [(3) ]() . When you configure response variables in step 8 of custom function setup, you extract values from the API response and save them as dynamic variables for later use [(2) ]() . For example, if you extract a user's name from a response, you can reference it later using
{{user_name}}
. According to a Discord discussion, you can use dynamic variables inside the JSON of future functions [(3) ]() . If you get
clientName
back from a "search_customer" function, you can use
{{clientName}}
inside the JS
ON for another future function . Example from documentation: If your API response body is:
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
q
@AI Evy can I use different voices for the single outbound agent?
a
Thanks for the follow-up, @q40478. I'll get back to you soon.
### Answer ### Answer I don't have specific information in the available sources about using different voices for a single outbound agent in Retell AI. The sources provided don't explicitly cover voice configuration options or whether you can dynamically change voices per call for the same agent. Check out these potentially useful sources: - [Voice API: Integrate Phone AI Agents with Your System | Retell AI]() - [Import Phone Number]() For additional support: - Visit [Contact Sales]() - Visit [) Would you like me to provide a general answer based on my knowledge instead?
message has been deleted
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.