https://retellai.com/?utm_source=discord&utm_medium=seo logo
Transistion operator function is not finding my va...
# ❓・ai-evy-support
s
@AI Evy Transistion operator function is not finding my variable from a function call. the variable is given as a response variable in the api call
a
Thanks for tagging me @Spuddy. I'll look through relevant sources and get back to you shortly.
### Answer Response variables from a custom function can be used in subsequent function calls using the
{{variable_name}}
syntax. [(1) ]() A few things to check: 1. Ensure the response variable is properly extracted from your custom function's API response. In your custom function configuration, you need to define how to extract data from the response. [(2) ]() 2. Use the correct syntax - When referencing the variable in another function's JSON or in transition conditions, use double curly braces:
{{variableName}}
[(3) ]() , [(1) ]() 3. For transition conditions, you can reference the result by instructing the agent in the prompt/description. For example: "If the result attribute within data in the returned json is x, then transition to y" [(4) ]() If you're still having issues, could you share: - How you've configured the response variable extraction in your custom function? - The exact syntax you're using in the transition operator?
​ To learn more, see the sources I considered: [[1] Response Variables - Part of Future Function Calls in JSON?](https://discord.com/channels/1186424376300679209/1396550506347761686) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[3] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[4] How to pass in variables in the General Tool / State Tool function calls?](https://discord.com/channels/1186424376300679209/1229563946378203188) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.