Features
Represents numeric values. Integers (like 10
) and percentages (like 25%
) are treated as decimals internally. Used for properties like clicks
, spend
, acos
, or bid
.
Represents a specific point in time, stored internally as a timestamp (seconds since epoch). Used for properties like campaign start date
or returned by now()
. Compare using date operators or relative terms like "7 days ago"
.
Represents text values. Must be enclosed in double quotes when used as a literal value in comparisons.
Represents a predefined list of accepted string values for certain properties like state
or match type
. Values must be enclosed in double quotes.
Represents a span of time used for time-based properties or variables. Defined using relative (e.g., 30d
), literal (e.g., '2024-01-01'..'2024-01-31'
), or offset (e.g., 7d..14d
, ..14d
) formats.
Represents a user-defined variable created using the let
keyword. Can hold the result of expressions, calculations, case
statements, or references to other variables, encompassing various data types (Number, String, List, Date, Time Period).
=
, !=
, >
, >=
, <
, <=
clicks(7d) = 0
state != "archived"
bid > 0.50
spend(90d) <= 100.00
=
, !=
, contains
, does not contain
, starts with
, ends with
ad group name != "Test Group"
campaign name contains "Branded"
campaign name starts with "High Priority"
and
, or
clicks(14d) > 5 and spend(14d) > 2.00
state = "enabled" or state = "paused"
(orders(7d) = 0 and clicks(7d) > 10) or acos(30d) > 60%
=
, !=
, contains
, does not contain
state = "effectively enabled"
state != "paused"
match type contains "broad"
match type does not contain "loose match"
=
, !=
, >
, >=
, <
, <=
campaign start date > 30 days ago
last bid change >= now() - interval("3d")
campaign end date < '2024-12-31'
last budget change <= now() - interval("7d")
+
, -
, *
, /
bid > cpc(7d) + 0.15
budget - spend(1d) < 5.00
clicks(30d) * 0.01 > 1
sales(14d) / orders(14d) >= 20
acos(30d) > 30%
clicks(30d)
, while others are static (like campaign name)
. Combine properties with functions and operators for advanced logic.Advertising Cost of Sale. Ad spend relative to ad revenue (spend / sales
).
acos(30d) > 40%
acos(7d..14d) <= 0.35
The current name of the Ad Group. Use with string operators like contains
, starts with
, etc., and quoted values.
ad group name contains "Exact Match"
ad group name does not contain "Test"
Estimated KENP royalties adjusted by the KENP Impact Multiplier (estimated royalties * KENP Impact Multiplier
). Relies on Ad Account Settings.
adjusted estimated royalties(60d) > 25.00
adjusted estimated royalties(lifetime) > 0
Number of orders adjusted by the Order Impact Multiplier (orders * Order Impact Multiplier
). Relies on Ad Account Settings.
adjusted orders(30d) > 5
adjusted orders(lifetime) > 0
KENP pages read adjusted by the KENP Impact Multiplier (pages read * KENP Impact Multiplier
). Relies on Ad Account Settings.
adjusted page reads(30d) > 5000
adjusted page reads(lifetime) > 0
Sales revenue adjusted by the Order Impact Multiplier (sales * Order Impact Multiplier
). Relies on Ad Account Settings.
adjusted sales(14d) > 200.00
adjusted sales(lifetime) > 0
Average Order Value. Average revenue per ad order (sales / orders
).
aov(60d) > 15.00
aov(lifetime) > 0
The current bid set for a Keyword or Target.
bid > 0.75
bid <= cpc(7d) * 1.2
Blended Advertising Cost of Sale (spend / blended profit
). Relies on Ad Account Settings.
blended acos(60d) < 35%
blended acos(30d) > 0
Blended Average Order Value (blended profit / adjusted orders
). Relies on Ad Account Settings.
blended aov(30d) > 5.00
blended aov(lifetime) > 0
Blended Customer Acquisition Cost (spend / adjusted orders
). Relies on Ad Account Settings.
blended cac(90d) < 15.00
blended cac(lifetime) > 0
Blended Conversion Rate (adjusted orders / clicks
). Relies on Ad Account Settings.
blended cvr(30d) > 8%
blended cvr(lifetime) > 0
Total estimated profit from ads, combining adjusted sales profit and adjusted KENP royalties. Relies on Ad Account Settings. Formula: (Adjusted Sales * Profit Margin) + Adjusted Estimated Royalties
.
blended profit(30d) > 50.00
blended profit(lifetime) > 0
Blended Return on Ad Spend (blended profit / spend
). Relies on Ad Account Settings.
blended roas(30d) > 2.0
blended roas(lifetime) > 0
Blended Revenue (Profit) Per Click (blended profit / clicks
). Relies on Ad Account Settings.
blended rpc(14d) > 0.40
blended rpc(lifetime) > 0
The current daily budget set for a Campaign.
budget > 10.00
budget <= 50.00
Customer Acquisition Cost. Average ad spend per ad order (spend / orders
).
cac(90d) < 25.00
cac(30d..60d) > cac(0..30d)
The configured end date of the Campaign, if set. Use with date operators (after
, before
) and relative ("X days ago"
) or absolute ('YYYY-MM-DD'
) date values.
campaign end date before "14 days ago"
campaign end date = '2025-12-31'
The current name of the Campaign. Use with string operators and quoted values.
campaign name contains "Brand - SP"
campaign name ends with "- UK"
The configured start date of the Campaign. Use with date operators and relative or absolute date values.
campaign start date after "60 days ago"
campaign start date < '2024-01-01'
Total number of times ads were clicked.
clicks(7d) >= 5
clicks(30d..60d) < clicks(0..30d)
Cost Per Click. Average cost per ad click (spend / clicks
).
cpc(14d) < 0.80
cpc(90d) >= 1.10
The default bid set at the Ad Group level.
default bid > 0.50
default bid <= 1.25
Estimated royalties from KENP pages read attributed directly to ads.
estimated royalties(30d) > 10.00
estimated royalties(lifetime) > 0
Total number of times ads were displayed.
impressions(14d) > 1000
impressions(lifetime) > 0
Timestamp of the most recent bid update for a target/keyword. Compare against now()
using interval("Xd")
.
last bid change < now() - interval("7d")
last bid change > now() - interval("2d")
Timestamp of the most recent Campaign budget update. Compare against now()
using interval("Xd")
.
last budget change < now() - interval("30d")
The keyword match type or auto-targeting type. Accepted values (must be quoted):
"exact"
, "broad"
, "phrase"
, "product exact"
, "similar"
, "close match"
, "loose match"
, "complements"
, "substitutes"
match type = "exact"
match type contains "close match"
Total number of orders directly attributed to ads.
orders(30d) > 1
orders('2024-01-01'..'2024-03-31') = 0
Total Kindle Edition Normalized Pages (KENP) read attributed directly to ads.
pages read(60d) > 2000
pages read(lifetime) > 0
Return on Ad Spend. Ad revenue relative to ad spend (sales / spend
).
roas(30d) > 3.0
roas(7d..14d) <= 1.5
Return on Investment. Profit relative to cost (sales - spend) / spend
).
roi(60d) > 50%
roi(lifetime) < 0%
Total revenue from orders directly attributed to ads.
sales(14d) > 50.00
sales(30d) < sales(30d..60d) * 0.9
The current status of the entity (Campaign, Ad Group, Target, etc.). Accepted values (must be quoted):
"effectively enabled"
, "enabled"
, "paused"
, "archived"
state = "enabled"
state != "archived"
The desired Advertising Cost of Sale (ACOS) percentage you aim for. Target ACOS is set at the Ad Account level by default and inherited by Campaigns, Ad Groups, and Targets unless a specific override value is set at a lower level.
target acos < 30%
target acos <= 0.3
acos(14d) > target acos * 1.2
now()
), define reusable variables (let
), or implement conditional logic (case
).Defines a named variable within the current Recipe. Assigns the result of an expression to the variable name. Must end with a semicolon ;
. Variables can store various data types (Number, String, Time Period, etc.) and be referenced later.
let variableName = expression;
let threshold = 45%;
acos(30d) > threshold
let target_cpc = cpc(14d) * 1.1;
bid > target_cpc
let lookback = 2d..30d;
clicks(lookback) > 10
Evaluates conditions sequentially and returns the value associated with the first true condition. An else clause must be provided to specify a default value if no when
conditions are met. Can return Number, String, or List values. Date and Variable values are not supported.
case(when condition1 then value1, when condition2 then value2, ..., else defaultValue)
case(condition1 => value1, condition2 => value2, ..., else defaultValue)
case( when state = "enabled" then "Active", else "Inactive")
let bid_multiplier = case(
acos(14d) < 20% => 10%,
acos(14d) > 50% => -10%,
else 0%
);
Returns the current timestamp (seconds since the Unix epoch). Used for time-based comparisons, often with the interval
function.
now()
last bid change < now() - interval("7d")
campaign start date > now() - interval("90d")
Converts a duration (like "3d"
) into its equivalent value in seconds. Primarily used for date/timestamp arithmetic with now()
function.
interval("Xd")
now() - interval("14d")
let two_weeks_ago = now() - interval("14d");
last bid change < two_weeks_ago
and
, or
), and list and string values (like "enabled"
, "broad"
) are case-insensitive. campaign name contains "brand"
is the same as Campaign Name contains "BRAND"
.25%
) are automatically treated as decimals (0.25
). Currency symbols ($
) are ignored; values are based on the ad account's base currency.sales(14d)
or clicks(7d..14d)
. See the Time Periods documentation for all formats.//
to add single-line comments. Anything after //
on that line is ignored. Example: clicks(7d) > 10 // Check for minimal activity
let
): Variable definitions using let must end with a semicolon (;). Example: let high_cpc = 1.50;
clicks > 10 and spend > 5) or acos > 50%
© Merch Jar LLC