https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hi — I’m seeing inconsistent behavior between two ...
# ❓・ai-evy-support
h
@AI Evy Hi — I’m seeing inconsistent behavior between two of my Retell agents when it comes to metadata usage in prompts. Both agents receive and display the same metadata payload in the call record (fields like first_name, account_name, deal_owner, etc.). However, in one instance (Planswell), the agent can reference these metadata fields inside the prompt using curly-brace syntax like {{first_name}} — they resolve correctly at runtime (e.g. “Hi Alejandro”). In the other instance (Gatewise), the identical prompt text produces literal placeholders instead (“Hi {{first_name}}”) even though the metadata is present and correct in the call’s Data tab. This suggests the prompt interpolation or templating layer (that maps variables from metadata or dynamic_variables into the model’s prompt) is disabled in this instance. Could you confirm whether variable interpolation is enabled for this organization or agent? If not, could you please enable it (sometimes referred to as enable_prompt_template_parser or metadata_to_prompt_vars) so that {{variable}} placeholders in the prompt are resolved from the metadata object before the model runs? For reference, both agents have identical settings — same data storage, same voice model, same structure. The only difference is they exist in separate Retell instances, and the Planswell one behaves as expected. Thanks — happy to provide example transcripts or call IDs if needed.
a
Thanks for tagging me @hotfudge99. I'll look through relevant sources and get back to you shortly.
### Answer Based on the documentation, dynamic variables in Retell AI use the
{{variable_name}}
syntax and should automatically resolve when properly configured [(1) ]() . The inconsistent behavior you're experiencing between your two agents suggests a configuration difference rather than a global setting issue. Here are the key areas to check: Dynamic Variable Configuration Dynamic variables can be set in multiple ways : - Through the
retell_llm_dynamic_variables
field when creating phone calls - As agent-level default dynamic variables that serve as fallbacks - In the API request payload Where Variables Should Work Dynamic variables are supported in : - Prompts (agent instructions and personality) - Begin message (opening greeting) - Tool configurations - Call handling settings Troubleshooting Steps 1. **Check Default Variables**: Verify that your Gatewise agent has the same default dynamic variables configured at the agent level 2. **API Call Comparison**: Compare how the dynamic variables are being passed in the API calls for both agents 3. **Variable Declaration**: One Discord user asked whether dynamic variables need to be declared before use [(2) ]() , which suggests this might be a common configuration point to verify Missing Variable Handling The documentation mentions that Retell has specific behavior for handling missing variables [(1) ]() , so if variables aren't properly configured, they may display as literal text rather than resolving. Since this appears to be an account or agent-specific configuration issue rather than a general platform problem, I'd recommend: Visit [Contact Sales]() or visit [
ub.com/RetellAI/]() for direct support with your specific agent configuration. Would you like a general answer about dynamic variable troubleshooting approaches based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Discord message from @tywells_35046 on 2025-04-17](https://discord.com/channels/1186424376300679209/1294891368505937952/1362455706107773019) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.