xenial-black•6mo ago
Inbound Call Variables in workflow
How do you access the inbound phone number in a workflow as a variable? It doesn't seem to work with the normal liquid js templating the way it does in a prompt.
18 Replies
Hi there! 👋
I understand you're having trouble accessing the inbound phone number in a workflow using LiquidJS templating. While I can't explain exactly why LiquidJS templating works differently in workflows compared to prompts, I can definitely help with how to access the inbound phone number in a workflow!
Here are several ways to access the inbound phone number in a Vapi workflow:
1. Using the
{{customer.number}}
variable:
This variable returns the E.164 formatted number (with the + prefix) and is commonly used to access the caller's phone number. According to information I found, this variable might work for inbound requests as well.
2. Extracting from request body:
You can access inbound call parameters directly from the request body using:
This method is mentioned in the documentation for on-hold specialist transfers.
3. Accessing call parameters:
According to information in Discord, you can extract parameters like this:
4. Using variable values:
You might be able to access variables using message.variableValues.variable_name
or messages.assistantOverrides.variableValues.variable_name
as mentioned in this Discord thread.
If you're still having trouble with accessing the inbound number, would you like me to help troubleshoot your specific implementation or provide more details on any of these methods?
Sources:xenial-blackOP•6mo ago
The customer.number variable is not working within the liquid js in the workflow . How would you access it within a workflow prompt block?
@Vapi pls help more?
Hey! To help track down this issue, could you share:
- The call ID
- What response you expected to get
- What response you actually got instead
This would really help us figure out what went wrong!
This would really help us figure out what went wrong!
xenial-blackOP•6mo ago
@Shubham Bajaj I wasn't expecting a specific response, it just doesnt accept the templated customer.number like it does in a normal template within the workflow. I can build an echo endpoint to return that info out of the toolcall it makes as part of the flow, but i dont feel that should be necessary, and it limits its accessibility to non-devs. when i template {{customer.number}} in to the workflow say block, it skips past it as though it were empty. In your docs for workflow the ui shown is different as well.. Is there some way to get the inbound call vars that doesnt involve an echo endpoint in a workflow?
Hey, could you share the call ID because the dynamic variables work for workflows as well?
Sharing the call ID will help me debug, what would have went wrong for you
Lastly, apologies for the delay. I was out of office for couple of days.
adverse-sapphire•6mo ago
same issue
Hey out higher please ping me to your supporting.
Hey @jsieber-eip, a gentle reminder to continue the statement.
ticket -> statement.
xenial-blackOP•5mo ago
@Shubham Bajaj we are moving to telnyx flow for our IVR development since its a little more mature and purpose built, and using vapi for our outbound flows still. I tried to reproduce it on this call id right now : 90b02bfa-ffb2-4ffb-82f4-ebc4236a3c12
@Shubham Bajaj For outbound vapi has been great with the basic prompt based interactions, but for the more business critical use cases we are shifting away for now ( inbound support flows with high traffic)
correct-apricot•5mo ago
@jsieber-eip please check your DM.
complex-teal•5mo ago
we have same problem with {{customer.number}}. Any suggestions on how to fix it?
Please provide details of your issue and steps taken to resolve it. This will help me understand your challenges and tailor suggestions. I can propose new solutions or enhance existing approaches.
complex-teal•5mo ago
We prepare solution for inbound call. When customer calls, we want to find information about them in our DB. (Case is about unpaid invoice)
So we have prepared API request for it, but we have a problem with default variable customer.number. It does not work. I tried using it in "Say prompt" but it did not work (others default variables are fine).
WE use Twilio number.
So I tried to check if it's working without workflow, and there are no problems. Vapi can provide number.
Then I tried to use this assistant that can say callers telephone number in workflow, but same problem customer.number did not work
To utilize the customer number in your prompt or workflow, please adhere to the following syntax within your prompt.
I suggest you check out this documentation; it will help with your use case. https://docs.vapi.ai/assistants/use-cases/personalizing-calls-with-user-information
xenial-blackOP•4mo ago
@Shubham Bajaj that was not working in the workflow and was not available when testing the inbound calls previously. @defichk seems to be having the same problem.
correct-apricot•4mo ago
@jsieber-eip @defichk @outhire Thanks for highlighting the problem that call personalization doesn't work with workflows. I will Make sure this gets added to the workflows quickly within a week.
rare-sapphire•3mo ago
Hello! Has anyone been able to figure this out? I read a lot of questions on the same topic but there doesn't seem to be a definitive answer. Only links to the docs
@Shubham Bajaj
Have you figured this out?
correct-apricot•3mo ago
@geramalagon @jsieber-eip @defichk @outhire Hello everyone call personalization with workflows is coming by week’s end. We’re adding support for workflow overrides through Assistant Request server messages, with the update landing in the weekly channel by Friday. To test immediately, move to the daily channel tomorrow, or wait for the weekend release on weekly. I’d love your feedback once you’ve given it a spin.