ratty-blush
ratty-blush2w ago

Using variables in Prompt and Tools

very fustrating in my prompt i'm trying to capture and store customer name as a variable Begin the conversation and get the the customers name. store this as {{customer.name}} The in the warm transfer tool, i'm trying to pass that variable when transferring. Am I missing something Hi, I have {{customer.name}} a looking for help with credit card debt. I will let you guys take it from here.
5 Replies
Shubham Bajaj
Shubham Bajaj2w ago
Hi, You’re on the right track. capturing the customer’s name as a variable and then trying to pass it into the warm transfer tool. However, in Vapi, variables like {{customer.name}} are only available if they’re explicitly captured and stored during the conversation flow (usually via the assistant’s memory or a webhook update). Just including {{customer.name}} in the prompt won’t automatically persist and pass it unless it’s set in the session variables. To make sure it works: 1. Confirm that the assistant is actually saving the name into customer.name (for example, via a memory update or an assistantOverrides webhook). 2. When invoking the warm transfer, make sure the transfer message explicitly references the variable — the system will substitute it only if it’s stored correctly.
Can you confirm if you’re capturing and saving the name into customer.name via the assistant memory or webhook before the warm transfer happens? That will help us pinpoint if the variable is available at transfer time.
stormy-gold
stormy-gold4d ago
I have same issue, I store parameters in assistant-request hook, returning this object. I can't see values when tool is invoked:
No description
stormy-gold
stormy-gold4d ago
Parameters are not passed properly (they still have {{agency_id}} value, no substitution)
No description
Shubham Bajaj
Shubham Bajaj2d ago
Hello,

Thanks for patiently waiting and we are truly sorry for the delay.

We are still looking onto this and we will get back to you once we have answers.

We really appreciate your kind understanding.
stormy-gold
stormy-gold2d ago

Did you find this page helpful?