https://retellai.com/?utm_source=discord&utm_medium=seo logo
in conversation flow testing, dynamic variables th...
# ❓・ai-evy-support
l
@AI Evy in conversation flow testing, dynamic variables that are manually set for testing don't seem to work
a
Thanks for tagging me @legend28469. I'll look through relevant sources and get back to you shortly.
### Answer When testing conversation flows with dynamic variables, there are a few known issues and considerations: Testing Component Behavior In order to test a component within the component panel, the component needs to be added to the main Conversation Flow so that it will be initialized properly. [(1) ]() Dynamic Variables Not Appearing in Test Interface When testing multi-agent conversation flows, only dynamic variables explicitly referenced in the prompts of the first agent may appear in the test interface. [(2) ]() If your first agent uses
{{First_name}}
and
{{Last_name}}
, but a downstream agent needs
{{DOB}}
, you won't be able to input
{{DOB}}
when setting up the test call. One workaround is to add an unconnected conversation node listing all the dynamic variables you'd like to input. Variable Existence Checks There have been reports of issues with checking if dynamic variables exist using transition conditions. [(3) ]() The equation condition
{{variable_name}} exists
should evaluate whether a variable is set, [(4) ]() but some users have experienced inconsistent behavior between text chat testing and audio testing. [(3) ]() Default Dynamic Variables You can set default values for dynamic variables at the agent level through
default_dynamic_variables
. [(4) ]() [(5) ]() Default variables serve as a fallback and will only be used when specific variables aren't included in the call request. [(4) ](https:/
/docs.retellai.com/build/dynamic-variables) If you're experiencing persistent issues with dynamic variables during testing, I recommend checking that: - Variables are properly referenced in your prompts or nodes - Default dynamic variables are configured if needed - You're testing with the correct variable names (spaces around variable names are trimmed when evaluating)
​ To learn more, see the sources I considered: [[1] Components](https://docs.retellai.com/build/conversation-flow/components) [[2] Multi-Agent Conversation Flow - Not Importing Dynamic Fields](https://discord.com/channels/1186424376300679209/1425986785812549693) [[3] Check Dynamic variable exist not working](https://discord.com/channels/1186424376300679209/1422225456408559687) [[4] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[5] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
l
I have variables that I use in the component, I set them in the testing tab but it's not applying at all
@AI Evy I have variables that I use in the component, I set them in the testing tab but it's not applying at all
a
Thanks for the follow-up, @legend28469. I'll get back to you soon.
### Answer Based on the available sources, when testing components with dynamic variables, there's a critical requirement: the component needs to be added to the main Conversation Flow for proper initialization. [(1) ]() Here are key points about testing components with dynamic variables: Component Testing Requirements: - To test a component under the component panel, the component must be added to the main Conversation Flow so it will be initialized properly - The global prompt of the main Conversation Flow will be applied to all component nodes implicitly - If you want to test the component alone, you can make it a shared component and create a new empty agent with only one component node Dynamic Variable Configuration: You can set default values for dynamic variables at the agent level, which serve as a fallback and will only be used when specific variables aren't included in the call request. [(2) ]() Known Issues: When testing multi-agent conversation flows, only dynamic variables explicitly referenced in the prompts may appear in the test interface. [(3) ]() A workaround is to add an unconnected conversation node listing all the dynamic variables you'd like to input. Troubleshooting Steps: 1. Ensure your component is added to the main Conversation Flow (not just isolated in the component panel) 2. Verify variables are properly referenced using the
{{variable_name}}
syntax [(2) ]() 3. Check that default dynamic variables are configured if needed 4. Confirm variable names match exactly (spaces are trimmed when evaluating) If the issue persists after adding the component to the main flow, I'd recommend chec
king out these potentially useful sources: [Components]() , [Dynamic Variables]() Would you like me to provide a general answer about component testing based on my broader knowledge?
​ To learn more, see the sources I considered: [[1] Components](https://docs.retellai.com/build/conversation-flow/components) [[2] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[3] Multi-Agent Conversation Flow - Not Importing Dynamic Fields](https://discord.com/channels/1186424376300679209/1425986785812549693) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.