Rule Conditions — Operators and Time Ranges
Last updated: April 18, 2026
Conditions are the decision-making core of every rule. They determine exactly when a rule should fire by comparing your ad performance data against the thresholds you set. This article covers the two key elements that make conditions precise: operators (how you compare) and time ranges (what data window you look at). It also explains how to combine multiple conditions using AND/OR logic.
Prerequisites
- Familiarity with Wevion rules concepts (Introduction to Rules — Automate Your Ad Management).
- Understanding of available metrics (Available Metrics for Rule Conditions).
Operators
An operator defines the comparison between a metric's actual value and your threshold. Wevion provides six operators that cover every type of numeric comparison you need.
Operator Reference
| Operator | Symbol | Meaning | Example Condition | Reads As |
|---|---|---|---|---|
| Greater than | gt | Value must exceed the threshold | Spend gt 100 | "Spend is greater than $100" |
| Less than | lt | Value must be below the threshold | ROAS lt 1.5 | "ROAS is less than 1.5" |
| Greater than or equal to | gte | Value must meet or exceed the threshold | CTR gte 2.0 | "CTR is at least 2.0%" |
| Less than or equal to | lte | Value must be at or below the threshold | CPA lte 25 | "CPA is $25 or less" |
| Equal to | eq | Value must exactly match the threshold | Purchases eq 0 | "Purchases is exactly 0" |
| Not equal to | neq | Value must not match the threshold | Clicks neq 0 | "Clicks is not zero" |
Choosing the Right Operator
gt vs. gte — Use "greater than" (gt) when you want to exclude the exact threshold value, and "greater than or equal to" (gte) when the threshold itself should trigger the rule. In practice, for most media buying scenarios the difference is negligible. If your CPA threshold is $25, both "CPA gt 25" and "CPA gte 25" will behave almost identically since CPA is rarely exactly $25.00.
eq and neq — These are most useful for zero-value checks. "Purchases eq 0" is the classic condition for detecting campaigns with no conversions. "Clicks neq 0" is useful as a data-quality filter — ensuring the entity has received at least some traffic before evaluating other metrics.
Practical Operator Examples
Budget protection (stop loss):
- Spend gt 50 — "Has spent more than $50"
- Purchases eq 0 — "Has zero purchases"
Scaling winners:
- ROAS gte 3 — "ROAS is at least 3x"
- Spend gte 100 — "Has spent enough to be statistically meaningful"
Cost control:
- CPA gt 30 — "Cost per acquisition exceeds $30"
- CPM gt 50 — "CPM is above $50 (market is too expensive)"
Fatigue detection:
- Frequency gt 3 — "Average person has seen the ad more than 3 times"
- CTR lt 0.5 — "Click-through rate has dropped below 0.5%"
Time Ranges
Every condition includes a time range that tells Wevion which window of data to evaluate. The time range determines whether you are looking at fresh, real-time data or smoothed, multi-day trends.
Time Range Reference
| Time Range | Data Window | Best For |
|---|---|---|
| Today | From midnight (account timezone) to the current moment | Real-time budget protection. Catching spend problems as they happen. |
| Yesterday | Full previous day (midnight to midnight, account timezone) | Daily performance review. Complete data with no intraday fluctuation. |
| Last 3 days | The 3 most recent complete days plus today | Short-term trend detection. Balances recency with noise reduction. |
| Last 7 days | The 7 most recent complete days plus today | Standard performance window. Enough data for reliable efficiency metrics. |
| Last 14 days | The 14 most recent complete days plus today | Medium-term trends. Useful for identifying sustained performance shifts. |
| Last 30 days | The 30 most recent complete days plus today | Long-term performance baseline. Best for high-level strategic rules. |
Choosing the Right Time Range
The time range you choose fundamentally changes what your rule detects. The same condition with different time ranges can produce very different results.
Example: Consider the condition "ROAS lt 1.5"
- With Today: Fires if today's ROAS is below 1.5. Highly volatile — a campaign might show 0x ROAS at 8 AM simply because purchases have not come in yet, even though the campaign is performing well.
- With Yesterday: Fires if yesterday's full-day ROAS was below 1.5. More stable, but you are reacting to data that is 12-24 hours old.
- With Last 7 days: Fires if the 7-day average ROAS is below 1.5. Very stable, filters out daily noise, but slow to react to sudden changes.
General guidance:
| Scenario | Recommended Time Range |
|---|---|
| Emergency stop-loss rules | Today — react as fast as possible |
| Daily performance cleanup | Yesterday — work with complete, stable data |
| Scaling decisions | Last 7 days or Last 14 days — ensure consistent performance |
| Fatigue and trend monitoring | Last 7 days or Last 14 days — detect gradual shifts |
| Strategic portfolio rules | Last 30 days — broad performance baseline |
Time Range Pitfalls
Avoid using "Today" for efficiency metrics early in the day. At 9 AM, a campaign may have spent $20 with zero purchases — not because it is failing, but because conversions have not happened yet. A rule with "ROAS lt 1 (today)" would incorrectly pause it. Solution: combine "Today" efficiency conditions with a minimum spend threshold (e.g., Spend gt 50 AND ROAS lt 1).
Avoid using "Last 30 days" for fast-reaction rules. If a campaign suddenly turns unprofitable, a 30-day window will take days to reflect the change because the recent bad data is diluted by weeks of good historical data.
"Yesterday" is your most reliable single-day window. Unlike "Today" (which is incomplete until midnight), yesterday's data is final and complete. Use it for rules that need daily precision without intraday noise.
Combining Conditions: AND / OR Logic
Most effective rules use more than one condition. Wevion lets you combine conditions using two logic modes.
AND Logic (All Must Be True)
When you choose AND, every condition must pass for the rule to fire. This makes the rule more selective — it only acts when all your criteria are simultaneously met.
Example — Stop-loss rule:
- Spend gt 50 (today) AND
- Purchases eq 0 (today)
This fires only when both conditions are true: the campaign has spent more than $50 AND has zero purchases. A campaign that spent $60 but made 1 purchase would NOT trigger the rule — which is exactly what you want.
Example — Scale with confidence:
- ROAS gte 3 (last 7 days) AND
- Spend gte 200 (last 7 days) AND
- Purchases gte 5 (last 7 days)
This fires only when the campaign has proven itself across multiple criteria: good ROAS, meaningful spend volume, and enough purchases to be statistically significant. Any one metric alone might be misleading, but all three together indicate a genuine winner.
OR Logic (At Least One Must Be True)
When you choose OR, at least one condition must pass for the rule to fire. This makes the rule broader — it acts when any of your warning signals appears.
Example — Multi-signal alert:
- CPA gt 40 (last 3 days) OR
- CTR lt 0.3 (last 3 days) OR
- Frequency gt 4 (last 7 days)
This fires if any one of these concerning signals appears. The campaign might have acceptable CPA but terrible CTR — the rule still catches it. Use OR logic with notify_only actions to cast a wide monitoring net.
AND vs. OR — Decision Framework
| Use AND When... | Use OR When... |
|---|---|
| You need high confidence before taking action | You want to catch any potential problem |
| The action is destructive (pause, budget cut) | The action is informational (notify_only) |
| You want to avoid false positives | You want to avoid missing problems |
| Multiple metrics together tell the full story | Any single metric is a sufficient warning |
Best practice for destructive actions (pause, decrease budget): Always use AND logic with at least two conditions. This dramatically reduces false positives — you almost never want to pause a campaign based on a single metric.
Best practice for monitoring (notify_only): OR logic is often appropriate. You would rather receive an extra notification than miss a genuine problem.
Building Effective Condition Sets
The "Volume + Quality" Pattern
The most reliable rules combine a volume condition with a quality condition:
- Volume: Spend gt 50 (today) — ensures enough data exists
- Quality: Purchases eq 0 (today) — evaluates the actual performance
Without the volume condition, quality metrics are unreliable. Without the quality condition, you are just measuring spending volume with no regard for results.
The "Trend Confirmation" Pattern
Use longer timeframes to confirm that a trend is real, not just noise:
- ROAS lt 1.5 (last 3 days) AND ROAS lt 1.5 (last 7 days)
If ROAS is below target over both 3 days and 7 days, the underperformance is likely systemic, not a temporary dip.
The "Graduated Response" Pattern
Create multiple rules with increasing severity:
- Notify: Spend gt 30 AND Purchases eq 0 (today) — Action: notify_only
- Pause: Spend gt 75 AND Purchases eq 0 (today) — Action: pause
This gives you an early warning at $30 and an automatic stop at $75, providing a window to intervene manually before the rule takes drastic action.
FAQ
Q: Can I mix different timeframes in the same rule? A: Yes. Each condition has its own independent timeframe. You might check today's spend alongside yesterday's ROAS in the same rule.
Q: What happens if a metric has no data (e.g., a new campaign with no impressions)? A: Metrics with no data evaluate to zero. A campaign with no impressions will report CTR = 0, ROAS = 0, CPA = 0, and so on. Design your conditions accordingly — a "ROAS lt 1" condition would fire on a campaign with zero data.
Q: Can I use more than two conditions? A: Yes. You can add as many conditions as you need. All conditions within a rule share the same logic mode (all AND or all OR).