How to pass input variables to Vapi's Workflow, fo...
# support
a
I want to make outbound call and if agent have some information about user than that would be great.
v
To pass input variables like
first_name
to a Vapi Workflow for outbound calls, include them in the
customer
object when creating the call:
Copy code
json
{
  "phoneNumberId": "YOUR_PHONE_NUMBER_ID",
  "assistantId": "YOUR_ASSISTANT_ID",
  "customer": {
    "first_name": "John"
  }
}
In your workflow prompts, use
{{first_name}}
to reference this variable and personalize the conversation. Tip: Make sure your workflow nodes use the exact variable name in the
{{variable_name}}
format for dynamic insertion. [See more in the docs](https://docs.vapi.ai/assistants/personalization) Sources: - [Personalization with user information](https://docs.vapi.ai/assistants/personalization) - [Workflows documentation](https://docs.vapi.ai/workflows) - [Outbound sales example](https://docs.vapi.ai/examples/outbound-sales)
a
@Vapi Support Bot I'm using websocket connection with Vapi's workflow
v
To pass input variables like
first_name
to a Vapi Workflow over websocket, use the
assistantOverrides
parameter with
variableValues
in your
.start()
call:
Copy code
js
const assistantOverrides = {
  variableValues: { first_name: "John" }
};
vapi.start("YOUR_WORKFLOW_ID", assistantOverrides);
In your workflow, reference
{{first_name}}
to personalize the conversation. Tip: Make sure your workflow nodes use the exact variable name in the
{{variable_name}}
format for dynamic insertion. See [Web SDK docs](https://docs.vapi.ai/sdk/web#overriding-assistant-configurations) for more details. Sources: - [Web SDK documentation](https://docs.vapi.ai/sdk/web#overriding-assistant-configurations) - [Personalization with user information](https://docs.vapi.ai/assistants/personalization)
k
Integrate your CRM to fetch data, personalize assistant prompts with that info, automate call triggers via tools like Make.com, and ensure real-time data is available during the call..
a
One more -- there is such a high latency in Workflow than Assistant. Is there any way we can reduce them ? (I'm building voice agent for hindi support)
k
Use streaming STT/TTS, semantic VAD, faster or smaller LLMs like GPT-4o mini, cached responses, and host services regionally, while avoiding HTTP-based delays by switching to WebSockets where possible..
3 Views