Jake Concha
02/10/2026, 3:51 PMAI Evy
02/10/2026, 3:51 PMAI Evy
02/10/2026, 3:51 PM{{user_number}} contains the user's phone number (from_number for inbound, to_number for outbound) . [(1) ]()
2. Build a custom function to retrieve prior call data
Create a Custom Function that queries your own database/CRM using the caller's phone number. The function/tool call should return the user details, which you will then be able to use during the call. [(2) ]()
3. Inject retrieved data via Dynamic Variables
For inbound calls, you can supply dynamic variables in the Inbound Call Webhook. [(1) ]()
For outbound calls, set your variables in the retell_llm_dynamic_variables field when using the Create Phone Call API:
json
{
"user_name": "John Smith",
"product_name": "Premium Plan",
"account_status": "active"
}AI Evy
02/10/2026, 3:51 PMcall_analyzed webhook to capture the summary and store it in your database keyed by phone number
2. On the next inbound call, use the Inbound Call Webhook to look up prior call data using {{user_number}}
3. Pass the retrieved summary as a dynamic variable to the agent's promptAI Evy
02/10/2026, 3:51 PMAI Evy
02/10/2026, 3:51 PM