Is there an % if option in the prompt for inbound/...
# support
i
I want to adjust my prompt in case the caller called the agent or if I initiated an outbound call. Is it possible to do in a similar way to {% if transport.conversationType == "chat" -%}
c
You can definitely do this. Vapi supports conditional template logic in your assistant prompt, first message, and model instructions, allowing you to adjust behavior based on whether the call is inbound or outbound. For example:
Copy code
jinja
{% if call.type == "outboundPhoneCall" -%}
Hi! This is Sarah from Acme Company, calling to follow up on your recent inquiry.
{% elif call.type == "inboundPhoneCall" -%}
Hi! Thanks for calling Acme Company—how can I help you today?
{% endif %}
Using this structure, your assistant can dynamically tailor its greeting and behavior depending on the call type. Let me know if you'd like help adapting this for your specific prompt.
4 Views