🚨 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}}