hamza-007
02/06/2026, 8:54 AMtransferCallUK(customer_service)
- Product Questions / Orders → transferCallUK(sales_uk)
IF Office Status is CLOSED:
- Response: "I apologize, but I cannot transfer you to our sales or customer service departments outside of office hours. Our office is open Monday to Friday, 08:00 to 17:00. Please call back during these times, or I can provide you with general information now."
---
## My Question
I’m trying to figure out the best way to write conditions in my prompt. Specifically, I want to check Office Status and Outlet Status independently.
## Option 1: Plain Text Condition
IF Office Status is OPEN
## Option 2: Variable Comparison
{{office_status}} == OPEN
## Option 3: Liquid JS Syntax
What about Liquid JS, can I do like {% if office_status == "OPEN" %}
office_status is a dynamic variable so in Liquid JS syntax I should use office_status with {{}} or simply above one is correct
Which approach works best for LLM clarity and reduces confusion?
I’ve noticed that sometimes the model mixes up conditions and gives the apology script even when the office is open, instead of routing the call correctly.
- I have many conditional statements in my workflow.
- I want to avoid ambiguity and ensure the LLM consistently follows the correct branch.Vapi Support Bot
02/06/2026, 8:55 AM{{office_status}} == "OPEN" or {% if office_status == "OPEN" %} in Liquid syntax) is generally more precise and less ambiguous than plain text conditions. This approach can help ensure that each condition is evaluated independently and consistently, especially when you have many conditional statements.
If you are experiencing issues where the model sometimes gives the wrong branch (e.g., the apology script when the office is open), it may be helpful to double-check how the variables are being set and referenced in your workflow, and to use explicit comparisons to reduce ambiguity.
If you need more detailed guidance or examples, I do not have further information to provide at this time.Chiranjeet Mishra
02/10/2026, 2:01 AM