🚨 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! 🙏
5
1 comment
Ryan Smith
3
🚨 Retell AI — Dynamic Variable Not Substituting in Whisper & Three-Way Debrief Messages
AI Automation Society
skool.com/ai-automation-society
Learn to get paid for AI solutions, regardless of your background.
Leaderboard (30-day)
Powered by