Conditions: metrics, windows, attribution and comparisons
Conditions describe what must be true about an object for the rule to fire. For example: “spend today is above 60 USD, and there are no deposits from today's clicks”. They are configured at the builder step “Conditions”. Each condition is checked separately for each object in the scope (see “Scope”).
How the “Conditions” step works
At the top are the defaults for the whole rule: “Default window”, “Default revenue attribution” and “Exclude last hours”. Conditions that do not have their own value inherit them.
In the middle is the condition tree: individual conditions and “AND”/“OR” groups.
At the bottom is “Minimum volume”: a threshold below which the object is not evaluated at all.
A new rule starts with the default window “Yesterday” and one condition “Spend greater than 0”. Replace it with your own.
On the right, the builder shows the rule in one sentence, for example: “CPD over 3 d before today (click cohort) > $25.00”. Check against it to make sure you set exactly what you intended.
Condition tree: “AND” and “OR”
“Add condition” adds a single condition. When there are two or more conditions, they are combined into a group.
“Add group” adds a nested group of two conditions.
A group has a type: “All (AND)” — all conditions of the group must be met, or “Any (OR)” — one is enough.
A group must have at least two elements. If only one is left, the builder asks you to add another one or remove the group.
Example of a tree “expensive deposits or none at all, with noticeable spend”:
All (AND)
Spend · Last 3 days (excluding today) · greater than 90 USD
Any (OR)
CPD · Last 3 days (excluding today) · cohort · greater than 45 USD
Deposits · Last 3 days (excluding today) · cohort · equals 0
“Yes”, “no” and “unknown”
Each condition has three possible answers: “yes”, “no” and “unknown”. “Unknown” means there is not enough data to decide. It is not the same as “no”.
Group | “Yes” | “No” | “Unknown” |
|---|---|---|---|
All (AND) | all conditions are “yes” | at least one “no” | no “no”, but there is an “unknown” |
Any (OR) | at least one “yes” | all “no” | no “yes”, but there is an “unknown” |
The rule acts only if the result of the whole tree is “yes” and the object has passed the minimum volume. With “unknown”, the rule does not touch the object. In the preview and on the “Why not now?” log tab, the reason is “Not enough data to decide”. This way the rule does not make decisions based on data that does not exist.
Examples for the rule “Spend · Today > 60 AND Deposits · Today = 0”:
spend 75 (“yes”), deposits 0 (“yes”) — the result is “yes”, the rule fires;
spend 40 (“no”) — the result is “no” whatever the deposits show: in an “AND” group one “no” is enough;
the ad set has no spend data for today yet — the result is “unknown”, the rule does nothing.
When a condition gets “unknown”
Reason in the preview and log | When it happens |
|---|---|
“No data” | The object has no data in the window, or the formula divides by zero: CPD with zero deposits, CTR with zero impressions, ROI with zero spend |
“No complete hours in the window yet” | The window is still empty: “Today” in the first minutes of the ad account day, or the excluded hours “ate” the whole window |
“Window is unavailable” | The window could not be built: “Last budget change is unknown”, “Start of the lifetime is unknown”, “Window starts before the tracker conversion history”, etc. |
“No value to compare with”, “Parent data is unavailable” | The right-hand side is unknown: the metric being compared with, or the parent value |
“Only a lower bound is known” | “Hours since budget/status change” for an object whose changes Adset.pro has not seen yet (details in the metrics reference) |
“No data” is not zero
Facebook metrics (spend, impressions, clicks and everything calculated from them) are known only if the object has spend data in the window. If the ad set did not deliver during the window or the sync has not caught up yet, the value is “no data”, not 0. The rule cannot tell one from the other. Therefore the condition “Spend · Today < 5” will not catch an ad set that did not spend at all today.
Tracker metrics (installs, registrations, deposits, revenue) are calculated honestly when there is traffic: if there were clicks but no deposits, “Deposits” = 0 and ROI = −100 %. The stop-loss “spend above X and 0 deposits” relies on this.
Derived metrics with zero in the denominator are “no data”. The CPD of an ad set without deposits is unknown, not infinitely large. Therefore the condition “CPD > 45” does not fire on an ad set that has no deposits at all. To catch those too, add an “OR Deposits = 0” branch, as in the tree example above.
What a single condition consists of
The condition fields go in this order: metric → window → attribution → exclude last hours → operator → compare with. Attribution and hour exclusion appear only if the condition reads tracker conversions.
1. Metric
Metrics are grouped: “Spend and delivery”, “Tracker conversions”, “Derived metrics”, “Object attributes”. The list has a search, and only metrics available at the rule level are shown. For example, “Learning phase” exists only for ad sets. What each metric calculates is described in “Metrics and attributes reference”.
Object attributes (status, budget, budget type, “hours since …”) have no window: the current value is compared, with the caption “Current value of the object, without a window” next to it.
2. Window
A window is the period over which the metric is calculated. All windows are calculated in the ad account time zone. The “As in rule” option takes the default window.
Window | What it covers | Example: it is now October 9, 15:30 |
|---|---|---|
Today | From 00:00 of the current ad account day to the current moment, including the current incomplete hour | October 9, 00:00–15:30 |
Yesterday | The full previous day | October 8, 00:00–24:00 |
Last N hours (1–720) | N hours back from the current moment. The data is hourly, so “24 hours” means 23 full hours plus the current incomplete one | 24 hours: from October 8, 16:00 until now |
Last N days (1–90), “Including today” on | Today up to the current moment and N−1 previous full days | 3 days: October 7, 00:00 — now |
Last N days, “Including today” off | N full days before today, today is not included | 3 days: October 6, 00:00 — October 9, 00:00 |
Lifetime | From the object's first spend seen by Adset.pro (if there was no spend, from creation) to the current moment. Each object has its own start | The ad set started spending on October 5 at 11:00: from October 5, 11:00 until now |
Since budget change | From the object's last budget change (by a rule, in Ads Manager, in Adset.pro or by a rollback) to the current moment | The budget was raised at 10:40: from 11:00 until now |
“Last 1 day” with “Including today” is the same as “Today”, and without it — the same as “Yesterday”.
The window start is rounded up to a full hour: data within an hour is not split.
“Lifetime” for tracker metrics is limited by the conversion history — about 190 days. If the object started spending earlier, a lifetime condition on conversions, revenue, ROI, ROAS, CPD or CPI will be “unknown”, and the preview warns: “Some objects are older than the tracker conversion history…”. Spend-only conditions are not limited by this.
“Since budget change” can be selected only in the condition itself: it cannot be the default window or the window on the right-hand side of a comparison. Ads do not have it. If the object's budget has not changed since the ad account was connected, the window start is unknown and the condition will be “unknown”. In an “AND” group the rule will not touch such an object, and in an “OR” group the other conditions decide.
3. Attribution
Attribution answers the question of which time a deposit (registration, revenue) is assigned to. It exists only for metrics that involve tracker data. Spend, impressions, clicks, CPC, CPM and CTR have no attribution: they are always calculated by delivery hour.
In the interface | How it calculates | What it is for |
|---|---|---|
By event time | The deposit is assigned to the moment it arrived. Answers the question “what happened during the period”. Tracker statistics and the Meta section tables calculate it the same way | Install and registration counts, CPI, CR — where the conversion arrives quickly |
By click date (cohort) | The deposit is assigned to the hour of the click that brought it. Answers the question “what did the traffic bought during the period bring” | ROI, ROAS, CPD, profit and any budget decisions |
Cohort in simple terms. The click happened on Monday at 23:40, the deposit arrived on Tuesday at 03:10:
by event time, the deposit goes to Tuesday;
by click date — to Monday, that is, the day when the click was paid for.
Therefore the cohort ROI for Monday honestly compares Monday's spend with what it brought, even if the deposits arrived on Tuesday or Wednesday. The flip side: the cohort “matures”. On Tuesday morning, the ROI of Monday's cohort is still lower than it will be on Wednesday, because some deposits are on their way.
Options in the condition's “Attribution” field:
“Metric default: …” — if the rule has no attribution of its own. CPD, ROI, ROAS and profit default to cohort, other tracker metrics to event time;
“As in rule: …” — if attribution is set at the rule level;
“By event time” or “By click date (cohort)” — explicitly for this condition.
Attribution also appears when the tracker is involved only on the right-hand side. For example, in the condition “Spend greater than 2 × CPD”, the attribution applies to CPD.
4. Exclude last hours
The latest hours are not complete yet: deposits and revenue keep arriving. The “Exclude last hours” field (0–72 h) moves the right edge of the window N hours back from the current moment. The shift applies to all metrics of the condition, that is, to spend, to revenue and to the right-hand side of the comparison. The “As in rule: N h” option takes the rule's “Exclude last hours” value.
“Today” at 15:30 with a 4 h exclusion — hours from 00:00 to 11:00 are counted (the incomplete hour is dropped).
“Yesterday” and “N days excluding today” end at midnight anyway, so the exclusion affects them only early in the morning. At 03:00 with a 6 h exclusion, yesterday is counted until 21:00.
After the exclusion, the window must still have at least 2 hours left. Otherwise the builder shows “Excluded hours leave the window empty”:
Window
Maximum excluded hours
Today
22
Yesterday
46
Last N hours
N − 2
Last N days, including today
24 × N − 2
Last N days excluding today
24 × (N + 1) − 2
Lifetime, Since budget change
up to 72
Important. For the “Today” window with an N-hour exclusion, the window is empty for roughly the first N hours of the day. During this time the condition is “unknown”, and the minimum volume is “Below the minimum volume”. The rule simply does not act until morning.
5. Operator
In the interface | Means |
|---|---|
less than / at most | < / ≤ |
greater than / at least | > / ≥ |
equals | =, for example “Deposits equals 0” |
between | from “From” to “To”, bounds included |
outside the range | less than “From” or greater than “To” |
List attributes (status, delivery status, budget type, learning phase) have only “equals”.
6. Compare with
The “Compare with” field offers several options for the right-hand side. The set depends on the metric.
Value. A plain number in the metric's units.
“CPD · Last 3 days excluding today · cohort · greater than 25” — more expensive than 25 USD.
“ROI · Yesterday · cohort · less than −20” — ROI below −20 %.
“Delivery status · equals · Paused”.
Range. Appears with the “between” and “outside the range” operators: two fields, “From” and “To”. “From” must be less than “To”.
“ROI · Yesterday · cohort · between 0 and 30” — the object is in profit, but no more than 30 %.
“CPM · Today · outside the range 5–40” — a suspiciously cheap or expensive impression.
Another metric × multiplier. Expected value = multiplier × the selected metric. Fields: “Whose metric” (“Same object” or “Parent”), “Metric”, “Window” (the condition window by default), “Multiplier” (greater than 0, up to 1000). Only metrics in the same units as the left-hand side are offered: money with money, ratios with ratios.
Same object: “Spend · Today · greater than 2 × CPD · Last 7 days excluding today”. The rule fires if today the ad set spent more than two of its usual costs per deposit.
Parent: “CPI · Last 3 days excluding today · greater than 1.3 × parent CPI”. The ad set is 30 % more expensive than its campaign. The parent of an ad set is the campaign, the parent of an ad is the ad set. Campaigns have no parent.
The parent is compared by its weighted average value, that is, the metric calculated over the whole parent: campaign CPI = all its spend / all its installs. It is not the arithmetic mean across ad sets. Therefore only ratio metrics can be compared with the parent: costs (CPC, CPM, CPI, cost per registration, CPD) and rates (CTR, CR, ROI, ROAS). Counts, spend, revenue and profit are not compared with the parent.
Same metric in another window ± %. Expected value = metric in the baseline window × (1 + change ÷ 100). Fields: “Baseline window” and “Change” in percent: greater than −100, up to 1000. “−40 %” means “40 % below the baseline”, “+50 %” means “50 % above”.
“CTR · Today · less than · CTR over the last 7 days excluding today −40 %” — the creative is burning out.
“CPM · Today · greater than · CPM yesterday +50 %” — a CPM spike.
The baseline window must differ from the condition window, otherwise the builder shows “The comparison needs a different window”. “Since budget change” cannot be the baseline window.
Important. If the baseline is negative (ROI, profit), the percentage is calculated from its absolute value, and “−” always moves the threshold down, to the worse side. Example: ROI for the past days is −20 %, the condition “ROI today less than baseline −30 %” fires at ROI below −26 %. The same applies to the multiplier: “less than 0.5 × parent ROI” with a parent ROI of −20 % means “below −30 %”.
How to enter values
Metrics | Input | Allowed |
|---|---|---|
Spend, spend incl. fee, revenue, profit, CPC, CPM, CPI, cost per registration, CPD | USD regardless of the ad account currency | any number; profit can be negative |
CTR, all CRs | percent: 20 means 20 % | from 0 to 100 |
ROI | percent: −30 means −30 % | from −100 to 1000 |
ROAS | multiplier: 1.5 means one and a half times (150 %), 1 means break-even | from 0 to 20 |
Impressions, clicks, installs, registrations, deposits, redeposits, rule actions | whole number | from 0 |
Daily budget, lifetime budget | in the ad account currency, in regular units: 50.5 means $50.50 for a USD ad account | from 0 |
Hours since created, since start, since first spend, since budget or status change | in hours or days (“Hours”/“Days” switch): 7 d = 168 h | from 0 |
A threshold outside the allowed range (for example, “ROI less than 2000” when you meant 20 %) will not be saved: the builder highlights “Threshold is outside the metric range”.
Deposit delay: why “today” is dangerous
Deposits arrive with a delay: hours, and sometimes days, after the click. Therefore any revenue metrics “for today” — deposits, registrations, redeposits, revenue, profit, ROI, ROAS, CPD — look worse during the day than they will in the evening.
Example. The ad set is consistently profitable: it spends about $120 a day and brings about $180 of revenue (ROI +50 %), and deposits arrive on average 3–8 hours after the click. Rule: “ROI · Today · By event time · less than 0 → pause”.
At 09:00, spend since midnight is $35. Deposits that arrived since midnight total $20, mostly the tail of yesterday evening's clicks. ROI = (20 − 35) ÷ 35 ≈ −43 %. The rule pauses a working ad set.
The cohort is no better in the morning: by 09:00 today's clicks have brought deposits of, say, $10, ROI ≈ −71 %. The cohort matches money more honestly, but for “today” it has not matured yet.
By event time, “today” also mixes days: today's spend is compared with deposits from yesterday's clicks. In the evening, such an ROI may, on the contrary, show a “profit” for an ad set that brought nothing today.
The builder warns about this right next to the condition: “Deposits arrive with a delay: today's revenue by event time is understated. Use the click cohort, the “Yesterday” window or exclude the last hours”. Cohort windows up to the current hour have a hint: “The click cohort is still maturing…”.
Task | How to set it up |
|---|---|
Budget decisions (scale, cut) by ROI, ROAS, CPD | Closed windows “Yesterday” or “Last N days” excluding today, attribution “By click date (cohort)”. Scheduled runs no earlier than 06:00 in the ad account time zone, so that yesterday evening's clicks have time to bring deposits. This is how the “Scale profitable” and “Cut unprofitable” templates are built |
A window that must include today | “Last N days” including today and “Exclude last hours” set to the typical deposit delay. Be sure to set a minimum volume |
Intraday stop-loss | “Today” is acceptable with a margin in the threshold and a soft action: “Spend · Today greater than 2 × target CPD AND Deposits · Today · cohort equals 0 → pause until end of day”. A threshold of two CPDs leaves room for the delay, and a mistake is cheap: at 00:00 the ad set is enabled automatically |
Fast signals: CPI, CR click → install, CTR, CPM | Installs arrive within minutes, spend and impressions as the sync progresses. Here “Today” and “Last N hours” work fine |
Minimum volume
Without a volume threshold, the rule fires on noise: an ad set spent $3, has no deposits, ROI is −100 % — and it is already “unprofitable”. “Minimum volume” filters out such objects before the conditions are checked.
The threshold metric is “Spend”, “Clicks”, “Impressions” or “Installs”. The value is compared as “at least” (≥). When enabled, the default is “Spend ≥ 20 USD”.
The volume is calculated in the rule's default window with its excluded hours, not in the windows of individual conditions.
An object below the threshold is not evaluated and not touched. In the preview and log it shows “Below the minimum volume: … required …”.
If there is no data for the window yet (for example, the “Today” window in the first hour of the day), this is also “Below the minimum volume”.
If there is no threshold, the builder warns: “No minimum volume: the rule may act on noise. Set a minimum volume or add a spend, clicks or impressions threshold to the conditions”. The warning does not appear if the mandatory conditions include “Spend”, “Clicks” or “Impressions” with the “greater than” or “at least” operator and a threshold above zero. Mandatory conditions are those in “AND” groups from the very top of the tree. A condition inside an “OR” and an installs threshold in the conditions do not remove the warning.
Tip. A threshold in a condition and the minimum volume behave differently. An object below the minimum volume gets “Below the minimum volume”, and it is immediately clear that it simply lacks data. An object that did not pass the threshold in a condition gets “Conditions not met”. For analyzing the log, the minimum volume is more convenient.
Default window and attribution
Setting | What it does |
|---|---|
Default window | It is used by conditions with the “As in rule” window and by the minimum volume. “Since budget change” cannot be selected. A new rule has “Yesterday” |
Default revenue attribution | “As set for the metric” (recommended): cohort for CPD, ROI, ROAS and profit, event time for other tracker metrics. If you select “By event time” or “By click date (cohort)”, this value applies to all conditions without their own attribution, including ROI and CPD |
Exclude last hours | 0–72 h. Applies to conditions without their own value and to the minimum volume |
Important. If “By event time” attribution is selected at the rule level, ROI, ROAS, CPD and profit are also calculated by event time, although cohort is usually used for them. The builder shows the hint “The rule-wide attribution (…) overrides this metric's default (…)” for such conditions. If a metric needs its own attribution, set it directly in the condition.
Limits
What | Limit |
|---|---|
Distinct “window × attribution” pairs in a rule | up to 6 |
Conditions and groups in the tree | up to 64, nesting up to 8 levels |
Elements in one group | from 2 to 16 |
“Last N hours” window | 1–720 hours |
“Last N days” window | 1–90 days |
Exclude last hours | 0–72 hours, with a 2-hour margin in the window |
Multiplier in “Another metric” | greater than 0, up to 1000 |
Change in “Same metric in another window” | greater than −100 %, up to 1000 % |
“Lifetime” for tracker metrics | conversion history of about 190 days |
How “window × attribution” pairs are counted
Each unique combination of window, excluded hours and attribution is a separate data query, and one rule can read no more than 6 such combinations. Above the tree there is a counter “Window × attribution pairs used: N of 6”. All windows of the rule are counted: condition windows, windows on the right-hand side of comparisons and the minimum volume window. Metrics without attribution (spend, impressions, clicks) in a window where the tracker is already read do not add a separate pair.
“Spend · Today greater than 60” + “Deposits · Today · cohort equals 0” — 1 pair.
“ROI · Yesterday · cohort” + “ROI · 3 days excluding today · cohort” + “Spend · 3 days excluding today”, minimum volume in the “3 days excluding today” window — 2 pairs.
The same “Yesterday” window, but one condition by cohort and another by event time — 2 pairs.
The same “Today” window, but one condition excludes 2 hours and the other does not — 2 pairs.
Two identical conditions in one group cannot be saved: “Duplicate condition”.
Ready-made formulations
Task | Conditions | Comment |
|---|---|---|
Stop-loss: no deposits today (ad sets) | All (AND): Spend · Today · greater than 60; Deposits · Today · By click date (cohort) · equals 0 | 60 = 2 × target CPD of 30 USD. Action — pause until end of day. Template “Stop-loss: no deposits today” |
Ad without installs | Spend · Lifetime · greater than 20; Installs · Lifetime · equals 0 | Installs arrive quickly, no need to exclude hours |
Scale profitable | ROI · Yesterday · cohort · greater than 50; ROI · Last 3 days excluding today · cohort · greater than 30; Spend · 3 days excluding today · greater than 100 | Runs from 06:00, budget +20 % not above the maximum |
Cut unprofitable | ROI · Last 3 days excluding today · cohort · less than −20; Spend · 3 days excluding today · greater than 100 | Runs from 06:00, budget −30 % not below the minimum |
Expensive deposits, including “none at all” | All (AND): Spend · 3 days excluding today · greater than 90; Any (OR): CPD · 3 days excluding today · cohort · greater than 45 / Deposits · 3 days excluding today · cohort · equals 0 | Without the “0 deposits” branch, ad sets without deposits get “unknown” |
ROAS below break-even | ROAS · Yesterday · cohort · less than 1; Spend · Yesterday · greater than 50 | ROAS is entered as a multiplier: 1 = break-even |
Creative burnout (ads) | CTR · Today · less than · same metric over the last 7 days excluding today −40 %; Impressions · Today · greater than 1000 | Action — notification |
CPM spike (ad sets) | CPM · Today · greater than · same metric yesterday +50 %; Spend · Today · greater than 20 | Action — notification |
Expensive installs | CPI · Last 24 hours · greater than 3; Installs · Last 24 hours · greater than 10 | Plus a minimum volume “Installs ≥ 10” in the 24-hour window |
Ad set worse than its campaign | CPI · 3 days excluding today · greater than 1.3 × parent CPI; Spend · 3 days excluding today · greater than 30 | Only costs and rates are compared with the parent |
New campaign without deposits | Spend · Lifetime · greater than 50; Deposits · Lifetime · cohort · equals 0; exclude last 2 h | Scope — “Only new, younger than 3 d”. Action — notification |
Do not scale right after a budget change | Add to the scale conditions: Hours since budget change · greater than 24 | If the budget has not changed, the time is counted from when the ad account was connected to Adset.pro: during the first day after connection the condition will be “unknown” |
Limit the number of scale steps | Add: Rule actions on the object · less than 3 | Only live triggers are counted |
Scale only ad sets that have exited learning | Add: Learning phase · equals · Learning complete | Ad sets only. Ad sets without a phase get “unknown” |
Ready-made rules with these conditions are collected in templates. It is convenient to take them as a basis and change the thresholds.
How to check conditions before launch
The preview (the last step of the builder) shows for each object the metric, value, condition and result — “yes”, “no” or “unknown” with a reason — as well as what the rule would do right now. Nothing is applied. More details are in “Preview, test and live modes”.
In the log, each action has a “Why?” button — a snapshot of the conditions at the moment of the decision: value, window with dates and time zone, attribution, threshold and result. The “Why not now?” tab checks any object by ID. More details are in “Log: runs, ‘Why?’ and rollback”.
Important. Tracker metrics see deposits per Facebook object only from sources where the campaign, ad set and ad ID macros are set up. If no source of the ad account passes them, live in this ad account is blocked; otherwise the rule would decide that everyone has zero deposits. How to set it up is described in “Setting up traffic sources”.
