https://retellai.com/?utm_source=discord&utm_medium=seo logo
can default system variables be used in the parame...
# ❓・ai-evy-support
g
@AI Evy can default system variables be used in the parameters field of a custom function tool or would it be better to use an extract variable tool?
a
Thanks for tagging me @Goopa Snoops. I'll look through relevant sources and get back to you shortly.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer --- Yes, system default dynamic variables can be used in custom function parameters. Dynamic variables work in tool configurations including custom function URLs, tool descriptions, and property descriptions. [(1) ]() For the parameters field specifically, you can use the
"const"
property to inject dynamic variables. For example: [(2) ]()
Copy code
json
{
  "type": "object",
  "properties": {
    "last_name": {
      "type": "string",
      "const": "{{last_name}}"
    }
  }
}
System default variables like
{{user_number}}
,
{{call_id}}
,
{{direction}}
,
{{current_time}}
, etc. can be used this way. [(1) ]() When to use each approach: - Use system default variables directly when you need built-in call context (like
{{user_number}}
for the caller's phone number on phone calls) . - Use the Extract Dynamic Variable tool when you need to capture information from the conversation that the LLM extracts from user speech (like a phone number the user verbally provides that differs from their caller ID) . [(3) ]() One important note: system variables like
{{user_number}}
only have values in the appropriate context—for example,
{{user_number}}
won't have a value during web call testing since there's no phone number involved.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[3] Custom Function Not substituting variable](https://discord.com/channels/1186424376300679209/1450867178906714123) ​