https://retellai.com/?utm_source=discord&utm_medium=seo logo
I have a logic split node
# ❓・ai-evy-support
t
@AI Evy I have a logic split node. It receives this result from a function node: tool_call_id: tool_call_9ff112 [{"appointment_list":"No valid appointments found"}]. After this logic split node, there are two ways to proceed: 1) the variable appointment_list contains: No valid appointments found 2) 1 does not apply This doesn't work, why?
a
Thanks for tagging me @tacitus_16379. I'll look through relevant sources and get back to you shortly.
### Answer This issue is often caused by the way the variable is set or matched in the Logic Split Node. If the variable appointment_list is coming from a function node response, make sure that: 1. The variable is properly mapped from the function response so it is available to the logic split node as a string value, not as an object or array. 2. The comparison in the logic split node is checking the exact value (including spaces and case) , and that the variable is not wrapped in extra quotes or brackets. 3. If the function response is an array of objects (like [{"appointment_list":"No valid appointments found"}]) , you may need to extract the value into a simple string variable before the logic split. There are documented cases where logic split conditions fail if the variable is not mapped correctly or if its structure does not match exactly what the condition expects. You may need to use response variable mapping after the function node to set appointment_list as a top-level string variable, then perform the logic split [(1) ]() . Also, ensure that the value being compared in the split node is exactly "No valid appointments found"—including any whitespace or formatting [(2) ]() .
​ To learn more, see the sources I considered: [[1] {{variable}} / Logic Split Node Issue](https://discord.com/channels/1186424376300679209/1417167639524151441) [[2] Logic Split Node Equation Not Working As Expected](https://discord.com/channels/1186424376300679209/1406310248691667125) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
t
how should the simple string variable look like in that case?
@AI Evy how should the simple string variable look like in that case?
a
Thanks for the follow-up, @tacitus_16379. I'll get back to you soon.
### Answer To ensure your logic split node works, the variable should be a simple string, not an array or object. For your case, after your function node, you want the value to be:
Copy code
appointment_list = "No valid appointments found"
This means the variable appointment_list should hold just the string No valid appointments found (no brackets, no quotes, no array/object structure) . The logic split node can then compare it directly to that string value. If the function node returns an array or object, you need to map or extract this value as a top-level string variable before the logic split node [(1) ]() , [(2) ]() .
​ To learn more, see the sources I considered: [[1] Logic Split Node](https://docs.retellai.com/build/conversation-flow/logic-split-node) [[2] Connect any AI Voice Agent to MCP with Retell AI MCP Node (Guide) | Retell AI](https://www.retellai.com/blog/connect-any-ai-voice-agent-to-mcp-with-retell-ai-mcp-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
t
ok, later in another node, I need the {{appointment_list}} as an array, because it will tell the node possible appointment dates (if found). How can I solve this problem?
@AI Evy ok, later in another node, I need the {{appointment_list}} as an array, because it will tell the node possible appointment dates (if found). How can I solve this problem?
a
Thanks for the follow-up, @tacitus_16379. I'll get back to you soon.
### Answer To solve this, you need to handle the variable in two forms across your flow: 1. For the logic split node, extract and map appointment_list as a simple string to check for the "No valid appointments found" case. This lets the split node do a direct string comparison [(1) ]() , [(2) ]() . 2. For later nodes where you need appointment_list as an array (with possible appointment dates) , keep the original array/object structure from your function node or remap it after the logic split node. This way, downstream nodes can access the array for further processing [(3) ]() , [(4) ]() . You may need to use two different variables: one for the string check in the split node, and another for the array you need later. Extract the relevant value as a string for the split, and preserve the array/object for further use. Dynamic variables can be mapped and used in different formats in Retell AI, but each node operates on the format it receives .
​ To learn more, see the sources I considered: [[1] Logic Split Node](https://docs.retellai.com/build/conversation-flow/logic-split-node) [[2] {{variable}} / Logic Split Node Issue](https://discord.com/channels/1186424376300679209/1417167639524151441) [[3] Connect any AI Voice Agent to MCP with Retell AI MCP Node (Guide) | Retell AI](https://www.retellai.com/blog/connect-any-ai-voice-agent-to-mcp-with-retell-ai-mcp-node) [[4] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
t
@AI Evy additional question: I have a function, that gives the actual lokal time. the tool result is: {"weekday":"Dienstag","current_time":"Dienstag, 16.09.2025, 18:30:22"} in another logic spli node I do have this prompt: Check {{weekday}}, if matching opening hours than a), if not, than b) Will that work proper?
a
Thanks for the follow-up, @tacitus_16379. I'll get back to you soon.
### Answer If you want the logic split node to branch based on whether the current weekday matches your opening hours, you need to ensure that the variable {{weekday}} is correctly set as a simple string (e.g., "Dienstag") before entering the logic split node [(1) ]() [(2) ]() [(3) ]() . However, a logic split node cannot evaluate a prompt like "Check {{weekday}}, if matching opening hours then a) , if not, then b) " in freeform text. Instead, you must define explicit conditions for the split—such as: - weekday = Dienstag - weekday = Mittwoch - (and so on for each open day) If your opening hours are not every day, set one condition per open day, and have the else branch handle closed days. The logic split node only evaluates direct conditions, not arbitrary prompts or logic written in natural language [(1) ]() [(3) ]() . Make sure the variable is mapped as a string and matches exactly (including case/whitespace) what you enter in the condition editor [(3) ]() . If you want to check against multiple open days, use multiple conditions or the "contains" operator if your open days are in a list [(1) ]() [(3) ]() .
​ To learn more, see the sources I considered: [[1] Logic Split Node](https://docs.retellai.com/build/conversation-flow/logic-split-node) [[2] Function Node Overview](https://docs.retellai.com/build/conversation-flow/function-node) [[3] Logic Split Node Equation Not Working As Expected](https://discord.com/channels/1186424376300679209/1406310248691667125) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
t
Ok, so that will not work! I do need the weekday, hour and minutes. how can I set this as avariable directly? I need date and time for Berlin (UTC +1)
@AI Evy Ok, so that will not work! I do need the weekday, hour and minutes. how can I set this as avariable directly? I need date and time for Berlin (UTC +1)
a
Thanks for the follow-up, @tacitus_16379. I'll get back to you soon.
### Answer To set weekday, hour, and minutes as dynamic variables in Retell AI, you can pass them as string values in your dynamic variables payload. For example, when creating a call or handling a webhook, you would include:
Copy code
json
{
  "weekday": "Dienstag",
  "hour": "18",
  "minute": "30"
}
You can use the syntax {{weekday}}, {{hour}}, and {{minute}} in your prompts or conditions. All dynamic variable values must be strings. If you need the current date and time for Berlin (UTC+1) , your backend or function node should generate these strings in the correct timezone and inject them into the dynamic variables before the flow continues [(1) ]() .
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
t
@AI Evy ok... so { "weekday": "Dienstag", "hour": "18", "minute": "30" } should be the output from the webhook? How should the prompt in my logic split node look like?
a
Thanks for the follow-up, @tacitus_16379. I'll get back to you soon.
### Answer Yes, your webhook should output the variables as simple strings:
Copy code
json
{
  "weekday": "Dienstag",
  "hour": "18",
  "minute": "30"
}
[(1) ]() In your logic split node, you should not use a freeform prompt. Instead, set explicit conditions for each variable. For example: - Condition:
{{weekday}}
equals
Dienstag
- Condition:
{{hour}}
equals
18
- Condition:
{{minute}}
equals
30
You can add multiple conditions as needed to match your opening hours logic. Each condition checks the value of a specific variable directly. The logic split node only evaluates direct conditions, not prompt-based or freeform instructions [(2) ]() , [(3) ]() .
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Conversation Node](https://docs.retellai.com/build/conversation-flow/conversation-node) [[3] Logic Split Node Equation Not Working As Expected](https://discord.com/channels/1186424376300679209/1406310248691667125) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
t
@AI Evy but why can I add a prompt to a logic split node condition then?
a
Thanks for the follow-up, @tacitus_16379. I'll get back to you soon.
Thanks for the feedback, glad I was helpful.
### Answer You can add a prompt as a transition condition in Retell AI, but in the context of a logic split node, the system is designed to evaluate explicit conditions (like checking if a variable equals a value) , not to interpret freeform prompts as logic instructions [(1) ]() [(2) ]() . When you define a "prompt" in a transition condition, it means you are specifying a condition in natural language that the LLM can recognize as a trigger to transition, but for logic split nodes, it is recommended and most reliable to use direct variable comparisons (such as variable = value) , especially if you want deterministic branching based on variables like weekday, hour, or minute [(1) ]() [(2) ]() [(3) ]() . If you want more dynamic, prompt-based interpretation (where the LLM interprets user input or context in a flexible way) , that is better handled in a conversation node, not a logic split node [(4) ]() [(2) ]() . Logic split nodes are optimized for fast, deterministic branching, not for natural language understanding [(1) ]() [(2) ]() .
​ To learn more, see the sources I considered: [[1] Logic Split Node](https://docs.retellai.com/build/conversation-flow/logic-split-node) [[2] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[3] Logic Split Node Equation Not Working As Expected](https://discord.com/channels/1186424376300679209/1406310248691667125) [[4] Conversation Node](https://docs.retellai.com/build/conversation-flow/conversation-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
t
@AI Evy SO in that case I can use a conversation node which checks my opening hours when the {{weekday}} variable looks like this: {"weekday":"Dienstag","current_time":"Dienstag, 16.09.2025, 18:30:22"}
a
Thanks for the follow-up, @tacitus_16379. I'll get back to you soon.
### Answer Yes, you can use a conversation node for this purpose. In a conversation node, you can write a prompt or use dynamic variables like {{weekday}} and {{current_time}} for the agent to interpret and respond accordingly. The conversation node allows for more flexible, prompt-based logic where the LLM can interpret context and user input, including checking if the extracted weekday and time fall within your opening hours. Just ensure the variables (e.g., weekday and current_time) are set as strings and provided to the node as dynamic variables. This approach is suitable when you want the agent to reason with more context, rather than using strict, deterministic variable checks as in a logic split node [(1) ]() [(2) ]() .
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Conversation Node](https://docs.retellai.com/build/conversation-flow/conversation-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @tacitus_16379. I'll get back to you soon.
t
@AI Evy OK, but the conversation node should not wait until the caller is speaking, but direktly go to the next node- after the analysis and decion which one (within opening hour or not) Is this possible?
a
### Answer Yes, you can achieve this behavior using the "Skip Response" setting in a conversation node. When "Skip Response" is enabled, the conversation node will automatically transition to the next node after the agent finishes speaking, without waiting for input from the caller. This allows you to perform prompt-based analysis (such as checking opening hours with your dynamic variables) and then move directly to the next node, making the flow seamless [(1) ]() .
​ To learn more, see the sources I considered: [[1] Conversation Node](https://docs.retellai.com/build/conversation-flow/conversation-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
t
@AI Evy but when i use Skip Response is cannot define individual tansitions?!
a
Thanks for the follow-up, @tacitus_16379. I'll get back to you soon.
### Answer When you enable "Skip Response" on a conversation node, the transition will only have one edge that you can connect, and after the agent finishes speaking, it will automatically transition to the next node via that specific edge. This means you cannot define multiple individual transitions out of a conversation node with "Skip Response" enabled—there is only one possible transition path in this configuration [(1) ]() .
t
@AI Evy Ok...but my goal is, the the conversation agent gehts the date and time like this: {"weekday":"Dienstag","current_time":"Dienstag, 16.09.2025, 18:30:22"} and should check and decide if the actual time is within my opening hours or not. if yes: way 1) if no: way 2) to the next nodes: How can I manage this?!
a
Thanks for the follow-up, @tacitus_16379. I'll get back to you soon.
### Answer To achieve branching based on whether the current time is within your opening hours, you should use a logic split node (or equivalent conditional node) that evaluates explicit conditions on your dynamic variables. Here’s how you can manage this: 1. Pass the variables as simple strings from your webhook or function, e.g.:
Copy code
json
{
  "weekday": "Dienstag",
  "hour": "18",
  "minute": "30"
}
[(1) ]() 2. In your logic split node, add equation conditions to check if the current weekday and hour fall within your opening hours. For example, if your business is open Monday–Friday, 09:00–17:00: - Condition 1:
{{weekday}}
is one of
Montag
,
Dienstag
,
Mittwoch
,
Donnerstag
,
Freitag
- Condition 2:
{{hour}} >= 9 AND {{hour}} < 17
You can express these as equation conditions:
Copy code
- "Montag, Dienstag, Mittwoch, Donnerstag, Freitag" CONTAINS {{weekday}}
- {{hour}} >= 9 AND {{hour}} < 17
If both conditions are true, proceed to "way 1" (open) . Otherwise, route to "way 2" (closed) . 3. Set up your logic split node with these explicit equation conditions. The node will evaluate them and branch accordingly [(2) ]() . For more on equation conditions and checking dynamic variables, see the documentation: - [Dynamic Variables]() - [Step 3: Add transition conditions]()
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
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] Conversation Node](https://docs.retellai.com/build/conversation-flow/conversation-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.