Hi everyone! 👋 I've been living in Relevance AI for a few months now, building out sales and lead management workflows, and I keep seeing the same few hiccups pop up when people start using the 'if/else' node for conditional logic. It's such a powerful tool for routing leads, personalizing messages, and automating decisions, but a small misconfiguration can send your data down the wrong path. I wanted to share some concrete examples and patterns that have saved me a lot of headaches.
The most common pitfall I see is **not accounting for all possible conditions**. It's easy to set up an "if" and an "else," but your data might have more than two states. For instance, when scoring a lead based on website activity:
* **Pitfall:** Checking only if a page visit count is "greater than 5" for a 'High Intent' tag, and everything else falls into 'Low Intent'.
* **The Problem:** What about the lead that visited exactly 5 pages? Or the one with 0 visits? They might get lump into 'Low Intent' by your `else` clause, which might not be accurate.
* **Better Approach:** Use chained conditions or a "switch" logic to be explicit.
* Condition 1: `if` visits > 10 → Score: 'Very High'
* Condition 2: `else if` visits > 5 → Score: 'High'
* Condition 3: `else if` visits >= 1 → Score: 'Warm'
* `else` → Score: 'Cold'
Another tricky area is **comparing data types correctly**. Relevance AI fields can hold numbers, text, dates, and true/false states. Comparing them improperly is a silent error.
* **Example:** You have a lead score saved as a text string "85", and you write a condition `if` lead_score > 80. This might fail because you're comparing a text string to a number.
* **Solution:** You often need to use a `Convert Data Type` node before your condition to change that "85" into an integer `85`. Always double-check the data type in your input variable panel.
Here's a real-life snippet from a workflow I use for email sequencing. The goal is to check a lead's title and company size to decide which case study to send.
**Condition Setup:**
* **If** `Job Title` contains "Founder" OR "CEO"
* **And If** `Company Employee Count` > 100
* **Then:** Send "Enterprise Scale" case study.
* **Else If** `Job Title` contains "Manager" OR "Director"
* **Then:** Send "Team Efficiency" case study.
* **Else:**
* Send generic "Product Overview" asset.
The key here is using the "OR" operator within a single field check, and the "And If" to layer criteria. It feels very natural once you map it out.
My final piece of advice is to **always test with edge cases**. Run a test where the field is empty, or has an unexpected format (like "N/A" in a number field). That's where your `else` path becomes a safety net, and you might discover you need an initial condition to handle invalid data before your main logic runs. It turns your workflow from fragile to robust.
Hope this helps you build more reliable automations! Happy to help.
hannah
Exactly. That "greater than 5" check is a classic fencepost error. In kubernetes configs, it's like only checking for `status: Running` and forgetting `Pending`, `CrashLoopBackOff`, or `Terminating`. Your 'else' becomes a garbage bin for unknown states.
In your case, the lead with exactly 5 visits is Schrödinger's lead - both high and low intent until you explicitly define it. Chained conditions are the way, but you gotta watch the order. If you check `visits > 10` after `visits > 5`, the first condition will catch it and the second never runs.
Might as well define all your buckets upfront, even if it's just a `== 0` catch for 'Cold'. Otherwise your automation drifts into chaos, which is my favorite kind of engineering but maybe not for sales ops 😅
The order issue is real. With continuous data like visits, you need mutually exclusive buckets. It's better to define ranges.
If you need to later add a "platinum" tier for >20 visits, that overlapping logic will break everything. I use integer flags in the feature store for each tier and evaluate in parallel, not serially.
Prove it with a benchmark.
The Kubernetes comparison really makes it click. I'm about to migrate some old cron jobs to a new system and the status checks are exactly that, a handful of known states.
> your 'else' becomes a garbage bin for unknown states.
This is my biggest worry right now. When you define your buckets upfront, do you always have a final "else" catch-all for logging unexpected data, or is it better to let it error so you know something's wrong? I'm nervous about silently swallowing something I didn't plan for.
One step at a time