https://retellai.com/?utm_source=discord&utm_medium=seo logo
Does information from custom functions apply to th...
# ❓・ai-evy-support
z
@AI Evy Does information from custom functions apply to the rest of the conversational flow, or is it only for that node or the next node
a
Thanks for tagging me @zubeyrahmed. I'll look through relevant sources and get back to you shortly.
### Answer Values that you extract from a custom function response can be saved as dynamic variables, and these dynamic variables can be used later in the conversation flow—not just in the function node or the immediate next node [(1) ]() . This means information from custom functions can be referenced throughout the rest of the flow, as long as you have extracted and stored it as a dynamic variable , [(2) ]() .
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Conversation Flow Overview](https://docs.retellai.com/build/conversation-flow/overview) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
z
what if i dont use dynamic variables. will the ai remember it in different nodes
how do i save infomation as a dynamic variable
@AI Evy what if i dont use dynamic variables. will the ai remember it in different nodes. how do i save infomation as a dynamic variable
a
Thanks for the follow-up, @zubeyrahmed. I'll get back to you soon.
### Answer If you don't use dynamic variables, the AI will not automatically persist or recall information across different nodes in the conversation flow. Dynamic variables are specifically designed to store and make information accessible throughout the flow. Without them, data collected in one node will not be reliably available to others [(1) ]() . To save information as a dynamic variable, you can use an "Extract Dynamic Variable" tool or node. You'll need to define the variable's name, description, and type (Text, Number, Enum, or Boolean) , then set up the extraction so the AI saves the value during the conversation [(2) ]() [(3) ]() [(4) ]() .
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Extract Dynamic Variables](https://docs.retellai.com/build/single-multi-prompt/extract-dv) [[3] Extract Dynamic Variable Node](https://docs.retellai.com/build/conversation-flow/extract-dv-node) [[4] Major Platform Upgrades: Knowledge base, warm transfer, Voice & Analytics](https://www.retellai.com/changelog/major-platform-upgrades-knowledge-base-warm-transfer-voice-analytics) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
z
@AI Evy how do i use response variables in the custom function
a
Thanks for the follow-up, @zubeyrahmed. I'll get back to you soon.
### Answer To use response variables in a custom function, you extract values from the API response and save them as dynamic variables. This allows you to reference the extracted data later in the conversation flow. For example, if your API response contains a user's name, you can extract it and use it as {{user_name}} in subsequent prompts or nodes. You set up which values to extract in the "Response Variable" section when configuring the custom function [(1) ]() .
​ To learn more, see the sources I considered: [[1] 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.
z
so how will it look like
@AI Evy so how will it look like
a
Thanks for the follow-up, @zubeyrahmed. I'll get back to you soon.
### Answer When you want to save information from a custom function response as a dynamic variable, you specify which values to extract in the custom function's configuration. For example, if your API responds with:
Copy code
json
{
 "properties": {
   "user": {
     "name": "John Doe",
     "age": 26
   }
 }
}
You can extract the value of "name" and save it as a dynamic variable (e.g., {{user_name}}) for use later in your conversation flow. This setup is done in the "Response Variable" section when configuring the custom function [(1) ]() [(2) ]() .
​ 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.
z
@AI Evy in the custom fuction what does the name and description do. is it for me or the ai
a
Thanks for the follow-up, @zubeyrahmed. I'll get back to you soon.
### Answer The name and description fields in a custom function are for you as the builder—they help you identify and document the function's purpose within your agent configuration. The name should be unique (and typically uses underscores) , and the description explains what the function does. These fields are not directly used by the AI during conversation—they're for organization and clarity in your setup [(1) ]() [(2) ]() .
​ 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.
z
@AI Evy for conversation nodes is it possible to have them carry on where they left off when the flow breaks out but loops back in.
a
Thanks for the follow-up, @zubeyrahmed. I'll get back to you soon.
### Answer Conversation nodes in Retell AI are designed to handle multi-turn conversations within a single node, so the agent can maintain context while inside that node [(1) ]() . However, if the flow breaks out of a conversation node and then loops back in, the agent will not inherently "remember" the previous state or where it left off in that node—the conversation essentially starts fresh from the top of the node's instruction each time it's re-entered . To persist specific information or context across node transitions (including when looping back) , you would need to use dynamic variables or other state management strategies [(2) ]() , [(3) ]() .
​ To learn more, see the sources I considered: [[1] Conversation Node](https://docs.retellai.com/build/conversation-flow/conversation-node) [[2] Conversation Flow Overview](https://docs.retellai.com/build/conversation-flow/overview) [[3] Node Overview](https://docs.retellai.com/build/conversation-flow/node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
z
@AI Evy is there a dynamic variable which references the previous node
a
Thanks for the follow-up, @zubeyrahmed. I'll get back to you soon.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer Yes, there is a dynamic variable called last_node_name that references the previous node in the conversation flow. This is shown in the chat API response under collected_dynamic_variables:
Copy code
json
"collected_dynamic_variables": {
  "last_node_name": "Test node"
}
[(2) ]()
message has been deleted
z
@AI Evy i want to be able to reference that dynamic variable within the conversational node for the previous node
a
Thanks for the follow-up, @zubeyrahmed. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​
### Answer You can reference a dynamic variable like last_node_name within a conversational node by using the double curly braces syntax: {{last_node_name}}. This will insert the value of the last_node_name variable (which records the previous node's name) wherever you use it in prompts, messages, or logic inside the node [(1) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
z
@AI Evy {{last_node_name}} this dynamic varaible is not working within my conversational node when i reference it.
a
Thanks for the follow-up, @zubeyrahmed. I'll get back to you soon.
### Answer There is no documentation showing that {{last_node_name}} is an officially supported dynamic variable within Retell AI's conversational nodes. The available list of dynamic variables in the documentation does not mention {{last_node_name}} as a default or system-provided variable for use in conversation flows or prompts [(1) ]() . If you need to reference the previous node, this capability is not explicitly documented for use in node prompts or logic. Check out these potentially useful sources: [Dynamic Variables]() , [Conversation Node]() , [MCP Node]() Would you like a general answer based on my knowledge instead?
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] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​