inland-turquoise•17mo ago
Dynamic Variables
Hello, I would like to use the built in dynamic variable {{time}} based on this document https://docs.vapi.ai/assistants/dynamic-variables#default-variables
The variable works correctly with webcalls but when calling in using a phone number, the placeholder does not seem to be transformed. She sees it as "{{time}}"
Example:
Fail
Type: Incoming Call
Call Id: 5283522a-3b48-46c9-add0-8cc8b61ec731
AI: Well, let me check. The current date and time is dash chat. Date, at flashing dot chat time dot u t Hey there. How can I help you today?
Success
Type: Web Call
Call Id: 1b761200-37ec-44e0-958a-7ea8d0bce235
AI: Um, it's May 20 fourth. 20 24, and the time is 5 36 PM UTC. Anything else I can help you with?
Thank you, Tyler
Vapi
Dynamic Variables - Vapi
Vapi makes it easy to personalize an assistant's messages and prompts using variables, allowing each call to be customized.
9 Replies
Hi @Tyler Thompson, I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly.
-----------------------------
While I generate an answer, here are some sources that might be helpful:
* Dynamic Variables
* Get Call
* Create Phone Call
* List Calls
-----------------------------
Answer
Hello Tyler,
It seems like you are facing an issue where the built-in dynamic variable
{{time}}
is not being transformed correctly during incoming phone calls, while it works as expected during web calls.
This issue may be related to how the system handles variable transformations based on the call type. Ensure that the dynamic variables feature is correctly implemented across different call types and that there aren’t any differences in the system's handling of web and phone calls which might be causing this behavior.
Since this is a specific implementation detail that might require further technical investigation or could be a bug, I recommend verifying your implementation against the latest Dynamic Variables documentation to ensure it aligns with the expected configurations (1) . If the problem persists, this might be a good case for raising a ticket with Vapi's technical support team to get more tailored assistance.
For your reference, dynamic variables should automatically adjust without needing additional configuration for different call types as described in the documentation.
: Dynamic VariablesGot it. Tagging @Vapi Team for additional help.
xenophobic-harlequin•17mo ago
I had the same issue! I've tried using {{time}} and {{now}}, but neither seems to work during a phone call. Was it resolved?
rival-black•17mo ago
Looks like dynamic variable are currently supported in web calls only.
Let me see if I can fix it or not.
xenophobic-harlequin•17mo ago
please let us know
rival-black•17mo ago
It is not working. I have write the fix for it. I will update you guys when I am done.
rival-black•17mo ago
Vapi
Dynamic Variables - Vapi
Vapi makes it easy to personalize an assistant's messages and prompts using variables, allowing each call to be customized.
rival-black•17mo ago
Updated the docs @Marcus Reis @Tyler Thompson