https://retellai.com/?utm_source=discord&utm_medium=seo logo
Is it possible to have it so if it's christmas day...
# ❓・ai-evy-support
c
@AI Evy Is it possible to have it so if it's christmas day, it can say something different and go down a different conversation route, if it's new year, go down another route otherwise go down the default route?
a
Thanks for tagging me @Ciaran. I'll look through relevant sources and get back to you shortly.
### Answer --- Yes, this is achievable using dynamic variables combined with a Logic Split Node in your Conversation Flow. How to implement: 1. Pass a dynamic variable (e.g.,
current_holiday
) when initiating the call. Your backend logic would determine the value based on the date—for example,
"christmas"
,
"new_year"
, or
"default"
. [(1) ]() 2. Use a Logic Split Node to branch the conversation based on that variable. The Logic Split Node evaluates conditions immediately upon entry and routes to the corresponding destination node. [(2) ]() 3. Configure your conditions in the Logic Split Node: - Condition 1:
current_holiday
equals
"christmas"
→ route to Christmas greeting node - Condition 2:
current_holiday
equals
"new_year"
→ route to New Year greeting node - Else: route to default conversation node Important note: Dynamic variables may not be fully "hydrated" (loaded) if the Logic Split Node runs too early in the flow. You can add a hydration guard condition like
current_holiday exists
or
current_holiday != ""
before comparing values, or add a brief initialization node before the split. [(3) ]() The dynamic variables need to be passed when initiating the call or set as
default_dynamic_variables
in your conversation flow configuration. [(1) ]()
​ To learn more, see the sources I considered: [[1] Discord message from @philipballerscheff on 2025-11-17](https://discord.com/channels/1186424376300679209/1186462578310910112/1439891287963865211) [[2] Logic Split Node](https://docs.retellai.com/build/conversation-flow/logic-split-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.
c
@AI Evy It's just in inbound agent so not outbound calls are made so.
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer --- For inbound calls, you can still achieve holiday-based routing using the Inbound Webhook. [(1) ]() How it works: 1. Enable the Inbound Webhook on your phone number configuration. 2. When an inbound call comes in, Retell sends a
POST
request to your webhook endpoint with the caller information. 3. Your webhook handler determines the current date (Christmas, New Year, etc.) and returns a response with
dynamic_variables
set accordingly. Example webhook response:
Copy code
json
{
  "call_inbound": {
    "dynamic_variables": {
      "current_holiday": "christmas"
    }
  }
}
4. Your Conversation Flow then uses a Logic Split Node to branch based on
{{current_holiday}}
. System default dynamic variable alternative: You can also use the built-in
{{current_time}}
system variable, which provides the current date/time (e.g.,
Monday, March 24, 2025 at 02:53:01 PM PDT
) . [(2) ]() Your Logic Split Node could parse this to check if the date matches December 25 or January 1 and route accordingly. The inbound webhook approach gives you the most flexibility since your backend can handle the date logic and pass the appropriate variable before the call connects. [(1) ]()
​ To learn more, see the sources I considered: [[1] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) [[2] Simulation Testing Now Live for All Agents](https://www.retellai.com/changelog/simulation-testing-now-live-for-all-agents-c27zh) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy so I made a call, I can see the call_started webhook, how does this work?
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer --- The Call Event Webhook and the Inbound Webhook are two different webhooks serving different purposes. [(1) ]() [(2) ]() What you're seeing (
call_started
) :
This is the Call Event Webhook, which sends real-time notifications about call events. It supports three event types: [(1) ]() | Event Type | Description | |------------|-------------| |
call_started
| Triggered when a new call begins | |
call_ended
| Triggered when a call completes, transfers, or encounters an error | |
call_analyzed
| Triggered when call analysis is complete | The webhook `POST`s a payload to your endpoint with the event type and call object:
Copy code
json
{
  "event": "call_ended",
  "call": {
    "call_type": "phone_call",
    "from_number": "+12137771234",
    "to_number": "+12137771235",
    "direction": "inbound",
    "call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
    ...
  }
}
For your holiday routing use case: You need the Inbound Webhook, which is different—it triggers before the call connects and allows you to set dynamic variables. [(2) ]() The Inbound Webhook is configured on your phone number, not at the agent level. Check your number configuration to enable it and point it to your endpoint that determines the holiday and returns the appropriate
dynamic_variables
.
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy We just get 3 webhooks, call_started, call_ended and call_analyzed. If it's call_started, could we pass in some variables?
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer No—the
call_started
,
call_ended
, and
call_analyzed
webhooks are Call Event Webhooks that notify you after events occur. [(1) ]() They don't allow you to pass variables into the call. For inbound calls, to inject dynamic variables before the call connects, you need to use the Inbound Webhook, which is a separate webhook configured on your phone number. [(2) ]() Key difference: - Call Event Webhooks (
call_started
,
call_ended
,
call_analyzed
) : One-way notifications about call events—you just acknowledge with a 2xx response. [(1) ]() - **Inbound Webhook**: Triggers before the call connects, and your response can include
dynamic_variables
,
override_agent_id
,
metadata
, etc. [(2) ]() To set up the Inbound Webhook: Configure
inbound_webhook_url
on your phone number. When an inbound call arrives, Retell sends a request to that URL, and you respond with your variables:
Copy code
json
{
  "call_inbound": {
    "dynamic_variables": {
      "current_holiday": "christmas"
    }
  }
}
This is the mechanism you need for your holiday routing scenario.
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy How often does it post to us with Inbound Webhook Call? I enabled it and see it hit us once... Its it just once?
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer Yes, the Inbound Webhook triggers **once per inbound call**—when the call is received but before it connects. [(1) ]() The webhook `POST`s to your endpoint, and you have 10 seconds to respond with a success status (2xx) . If no success response is received within 10 seconds, it will retry up to 3 times. At that point, the call is not yet connected and no call object exists yet. Your response determines how the call proceeds (dynamic variables, agent override, etc.) , and then the call connects. So for your holiday routing scenario: one inbound call = one webhook request to your endpoint (plus retries if needed) .
​ To learn more, see the sources I considered: [[1] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
c
@AI Evy So i've got it returning some json { christmas: false, new_years_day: false } Am I missing something here?
a
### Answer Yes, there are two issues with your response: 1. Structure: The response must be nested under
call_inbound.dynamic_variables
. [(1) ]() 2. Data types: All dynamic variable values must be strings. Booleans like
false
are not supported. [(2) ]() Your corrected response should look like:
Copy code
json
{
  "call_inbound": {
    "dynamic_variables": {
      "christmas": "false",
      "new_years_day": "false"
    }
  }
}
[(1) ]() This exact issue (passing
false
as a boolean instead of
"false"
as a string) was reported by another user who found their dynamic variables weren't being passed to the call. [(3) ]() Then in your Conversation Flow, reference them as
{{christmas}}
and
{{new_years_day}}
and check if they equal the string
"true"
or
"false"
. [(2) ]()
​ To learn more, see the sources I considered: [[1] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) [[2] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[3] Dynamic Variables From Inbound Webhook Not Passed to the Call](https://discord.com/channels/1186424376300679209/1419725903918923920) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
All works You can set an inbound webhook, set variables like { "call_inbound": { "dynamic_variables": { "christmas": "true", "new_years_day": "false" } } } And then in your agent, set a logic node and say {{christmas}} = true or {{new_years_day}} = true