https://retellai.com/?utm_source=discord&utm_medium=seo logo
How do I get the agent to extract user variables e...
# ❓・ai-evy-support
j
@AI Evy How do I get the agent to extract user variables even when the caller hangs up first?
a
Thanks for tagging me @jeremy_24520. I'll look through relevant sources and get back to you shortly.
### Answer The Extract Dynamic Variables tool lets you extract values from a user's response and save them as dynamic variables during the conversation. [(1) ]() To use it, you add an Extract Dynamic Variable Tool, define your variables (with name, description, and type) , and update your prompt to explicitly tell the agent when to invoke the extraction function. However, the available sources don't specifically address extracting variables when a caller hangs up first or ensuring extraction happens before call termination. The documentation focuses on the extraction process during active conversation. After a call ends, you can access
collected_dynamic_variables
in the call data, [(2) ]() [(3) ]() but this assumes the extraction function was already called during the conversation. For your specific use case of ensuring variable extraction even when callers hang up abruptly, I don't have explicit guidance in the sources. You might need to: - Structure your prompts to trigger extraction earlier in the conversation - Consider using webhooks to capture data at multiple points during the call Check out these potentially useful sources: [Extract Dynamic Variables]() , [Register Phone Call]() , [Create Web Call]() Would you like me to provide a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Extract Dynamic Variables](https://docs.retellai.com/build/single-multi-prompt/extract-dv) [[2] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) [[3] Create Web Call](https://docs.retellai.com/api-references/create-web-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Appreciate the feedback! Feel free to ask me again with additional guidance or context.