https://retellai.com/?utm_source=discord&utm_medium=seo logo
Should function nodes loop back the conversation n...
# ❓・ai-evy-support
s
@AI Evy Should function nodes loop back the conversation node they originated from?
a
Thanks for tagging me @skitrobot. I'll look through relevant sources and get back to you shortly.
### Answer Function nodes don't automatically loop back to their originating conversation nodes [(1) ]() . The flow direction is determined by the transition conditions you set up between nodes . Function nodes are designed to call functions and then transition based on their configuration . Since function nodes aren't intended for having conversations with users, you typically need to connect them to conversation nodes to communicate results to the user . The transition timing depends on your function node settings : - If
wait for result
is turned on, the agent transitions once the function result is ready - If
wait for result
is turned off, the agent transitions immediately after function invocation You control where the function node transitions by creating edges with transition conditions that connect to your desired next node [(2) ]() . This could be back to the original conversation node, to a new conversation node, or to any other node type depending on your conversation flow design .
​ To learn more, see the sources I considered: [[1] Function Node Overview](https://docs.retellai.com/build/conversation-flow/function-node) [[2] 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.
s
@AI Evy When does it make sense to turn 'wait for result' off?
a
Thanks for the follow-up, @skitrobot. I'll get back to you soon.
### Answer It makes sense to turn "wait for result" off when you want to maintain conversation flow speed and don't need the function result before transitioning to the next node [(1) ]() . Specifically, you'd turn "wait for result" off when: **For speed and responsiveness**: When the function takes a long time to execute (like 10 seconds) and you want the agent to continue the conversation without waiting [(2) ]() . This allows the agent to keep talking or continue taking orders while the function executes in the background . **When the function result isn't needed immediately**: If the next node in your conversation flow doesn't depend on the function's output, you can let the function run asynchronously [(1) ]() . Transition timing with "wait for result" off : - If "speak during execution" is on: agent transitions once done talking - If "speak during execution" is off: agent transitions immediately after function invocation - If user interrupts: transition happens once user is done speaking This is particularly useful for scenarios like restaurant ordering systems where you want to continue collecting the customer's order while processing previous items in the background, rather than making the customer wait for each function to complete [(2) ]() .
​ To learn more, see the sources I considered: [[1] Function Node Overview](https://docs.retellai.com/build/conversation-flow/function-node) [[2] Call function and wait](https://discord.com/channels/1186424376300679209/1406073007272759497) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.