🚨 Retell AI β€” Dynamic Variable Not Substituting in Whisper & Three-Way Debrief Messages
Hey everyone β€” hitting a wall with Retell AI and hoping someone here has solved this before.
The Setup:
I have an inbound voice agent (Amber) handling calls for a restoration company. The flow is:
Caller calls in β†’ Amber answers and collects info
Amber calls a Custom Function (get_oncall_routing) that hits a Relay.app webhook
Relay looks up who's on call, returns data back to Retell
Amber does a Warm Transfer to the on-call PM's phone number
Amber delivers a Whisper Debrief to the PM and a Three-Way Handoff to both parties
What Works Perfectly:
{{oncall_phone}} substitutes correctly in the Dynamic Routing field β€” Amber routes to the right phone number every single time βœ…
{{caller_name}} and {{emergency_summary}} are being collected correctly during the call βœ…
The full Relay JSON response (Step 6) includes both oncall_name and oncall_phone βœ…
The Relay JSON response looks like this:
json{
"assignedPerson": "Ryan Smith",
"assignedPhone": "+12089707024",
"region": "EAST",
"oncall_name": "Ryan Smith",
"oncall_phone": "+12089707024",
"fallbackPerson": "Blake Hansen",
"fallbackPhone": "+12085898887",
"zipLookupSucceeded": true
}
Store Fields as Variables mapping in get_oncall_routing:
oncall_name β†’ oncall_name
oncall_phone β†’ oncall_phone
caller_name β†’ caller_name
emergency_summary β†’ emergency_summary
assignedPerson β†’ assignedPerson
region β†’ oncall_region
The Problem:
{{oncall_name}} is NOT substituting in either the Whisper Debrief Message or the Three-Way Debrief Message.
In Prompt mode β€” Amber literally says "Oncall name" out loud. The LLM reads the placeholder as literal text.
In Static Sentence mode β€” the variable doesn't substitute at all. Amber either skips it or says nothing where the name should be.
What We've Tried:
βœ… Confirmed oncall_name is in the Relay JSON response
βœ… Confirmed Store Fields mapping is correct β€” oncall_name β†’ oncall_name
βœ… Tried Prompt mode with {{oncall_name}} directly in the sentence
βœ… Tried Static Sentence mode with {{oncall_name}}
βœ… Tried removing the example sentence from the prompt (thought Amber was pattern-matching off "Hi Kaden" in the example)
βœ… Tried adding oncall_name explicitly to the main agent prompt as a declared variable
βœ… Published Relay workflow and Retell agent after every change
βœ… Consulted ChatGPT, Grok, Gemini, and Manus β€” all agree Static Sentence should work but it's not
The Weird Part:
{{oncall_phone}} works perfectly in the Dynamic Routing field. Same variable pipeline, same JSON, same mapping. But {{oncall_name}} fails in the Whisper and Three-Way fields regardless of mode.
This suggests the issue is specific to how Retell handles dynamic variable substitution inside Whisper and Three-Way Debrief message fields β€” not the data pipeline itself.
Current Workaround:
We've temporarily removed the PM name from both messages entirely. The whisper still delivers caller name, location, and emergency summary β€” just skips the PM greeting by name. Handoff works the same way. Functional but not ideal.
What We're Hoping to Find:
Has anyone successfully used a custom dynamic variable (not a system variable) inside a Whisper or Three-Way Debrief message?
Is there a specific syntax or configuration required for these fields that's different from other prompt fields?
Is this a known Retell limitation or bug?
Any workarounds that preserve the dynamic PM name greeting?
Using GPT-4.1, Warm Transfer mode, custom function hitting Relay.app webhook. Agent is a single prompt agent, not conversation flow.
Any help appreciated β€” this is the last piece of an otherwise fully working AI receptionist system! πŸ™
3
0 comments
Ryan Smith
5
🚨 Retell AI β€” Dynamic Variable Not Substituting in Whisper & Three-Way Debrief Messages
Brendan's AI Community
skool.com/brendan
A free community for AI Voice Agents, Claude Code & n8n.
Join to learn, share ideas, and build real systems for the future.
Leaderboard (30-day)
Powered by