byredyre
11/13/2025, 11:11 PMAI Evy
11/13/2025, 11:12 PMAI Evy
11/13/2025, 11:12 PM{{ghl_contact_id}} resolved to the actual contact ID [(1) ]() . The custom function setup you described—using Parameters (Form) with id set to {{ghl_contact_id}} and tags set to "reached by call," along with "Payload: args only" enabled—aligns with how custom functions work in Retell AI .
I'm ready to hear the specific issues you encountered with the two leads. Please share the details about what went wrong—for example, whether the function node failed to execute, the contact ID wasn't resolved correctly, or the GoHighLevel endpoint didn't receive the expected data. This will help identify whether the issue is with dynamic variable resolution, the function node configuration, or the API call itself.AI Evy
11/13/2025, 11:12 PMAI Evy
11/13/2025, 11:12 PMbyredyre
11/13/2025, 11:12 PMAI Evy
11/13/2025, 11:12 PMAI Evy
11/13/2025, 11:12 PMid to {{ghl_contact_id}}, Retell should resolve this variable at runtime from the call's dynamic variables .
## Variable Resolution Source
Dynamic variables can be set in several ways:
- Through the API when initiating calls (using retell_llm_dynamic_variables) [(3) ]()
- Extracted during the conversation using Extract Dynamic Variable nodes
- Passed via webhooks using the dynamic_variables field in responses
From a community discussion, there's evidence that dynamic variables may not persist correctly between turns in some cases [(4) ]() . One user reported that updated state objects weren't being passed back correctly on subsequent webhook calls .
## Addressing Your Specific Issues
Lead 1 (Tag Changed from "Reached by call" to "called") :
The documentation doesn't explain why a static string value would change. Since you have tags set to a static value "reached by call" in your Parameters (Form) , this shouldn't be subject to variable resolution at all [(1) ]() [(2) ]() . This appears to be anAI Evy
11/13/2025, 11:12 PM{{ghl_contact_id}} variable either:
- Wasn't set correctly for that call
- Was overwritten by another value during the conversation
- Fell back to a different variable (possibly first_name)
The documentation doesn't describe a fallback mechanism where Retell would substitute one variable for another if the requested variable is missing .
## Recommendations
1. **Verify Variable Setting**: Ensure ghl_contact_id is being set correctly at call initiation or extracted early in the conversation flow before the function node executes.
2. **Check Call Logs**: Review the specific call logs for both leads in your Retell dashboard to see what dynamic variables were actually present when the function node executed.
3. **Add Validation**: Consider adding a conversation node before your function node that confirms the presence and format of {{ghl_contact_id}} before proceeding.
4. **Contact Support**: Since the behavior you're describing (static values changing, variable substitution) isn't documented and represents potentially serious reliability issues, I recommend reaching out to Retell support directly with the specific call IDs for investigation.
Visit [Contact Sales]() or [) for direct support.
The sources don't provide information about variable type validation or locking mechanisms to prevent these kinds of substitutions .AI Evy
11/13/2025, 11:13 PMAI Evy
11/13/2025, 11:13 PMbyredyre
11/13/2025, 11:23 PMAI Evy
11/13/2025, 11:23 PMAI Evy
11/13/2025, 11:23 PMdata.locations[0].id rather than just locations[0].id) for them to resolve properly in function nodes .
2. Logic Split Nodes and function nodes may not access dynamic variables reliably [(2) ]() . The issue occurs because dynamic variables may not be "hydrated" (fully loaded into memory) when the node tries to access them .
## What This Means for Your Setup
Your issues with:
- Lead 1 (tag changing from "Reached by call" to "called")
- Lead 2 ({{ghl_contact_id}} resolving to "Meleke" instead of the UUID)
...suggest that Retell may be experiencing variable resolution failures or incorrect fallback behavior that isn't documented in the official sources.
## Additional Diagnostic Steps
Since you've already verified the call logs and variable settings, here are more specific checks:
1. Check the exact request body being sent to your endpoint - you can verify this by logging what your GoHighLevel integration endpoint actually receives. This will show whether Retell is sending the wrong value or ifAI Evy
11/13/2025, 11:23 PMAI Evy
11/13/2025, 11:23 PMjson
{
"ghl_contact_id": "01H8ZJ9K2...",
"first_name": "Meleke"
}
3. Test with the Update Call API - you can override dynamic variables mid-call using the Update Call API [(4) ]() . This might help you verify if the issue is with initial variable setting or runtime resolution.
## Unfortunately...
The sources don't document:
- Why static string values would change
- Any fallback mechanism where one variable substitutes for another
- Variable type validation or locking features
Given that you're experiencing undocumented behavior that affects production reliability, you'll need direct engineering support from Retell to investigate the specific call IDs and determine why variable resolution is failing.
Visit [Contact Sales]() or [)
Would you like a general answer based on my knowledge of how similar systems typically handle variable resolution issues?AI Evy
11/13/2025, 11:23 PMAI Evy
11/13/2025, 11:23 PM