Features
Merch Jar Formulas is the next evolution of our powerful Recipes automation engine. If you're familiar with our legacy Recipes V1 system, this guide will help you understand the key differences and leverage the powerful new features available in the updated syntax.
While the core goal remains automating actions based on data, the Formulas (V2) syntax offers significantly more flexibility, power, and clarity. Migrating your existing V1 logic involves rewriting it using the new syntax, but the benefits – like comparing time periods, using variables, and performing math – unlock much more sophisticated automation potential.
The most significant difference is how time periods are handled.
V1: Used over the last X days (...
) or over the lifetime (...)
blocks, grouping conditions within that timeframe. Static properties were often checked within these blocks.
V2: Time periods are applied directly to time-based properties using parentheses ()
. Static properties are used without time periods. Conditions across different timeframes are combined using standard and/or.
Simple Time-based Condition:
over the last 30 days clicks > 10 // V1
clicks(30d) > 10 // V2
Multiple Conditions (Same Period):
over the last 14 days (acos > 40% and spend > 20.00) // V1
acos(14d) > 40% and spend(14d) > 20.00 // V2
Multiple Conditions (Different Periods):
(over the last 7 days clicks = 0) and (over the last 30 days spend > 15.00) // V1
clicks(7d) = 0 and spend(30d) > 15.00 // V2
Static + Time-based Condition:
over the last 30 days orders > 1 and state = "enabled" // V1
orders(30d) > 1 and state = "enabled" // V2
Lifetime Condition:
over the lifetime orders = 0 // V1
orders(..) = 0 // V2
and
, or
) & Grouping (()
):V1: Often required explicit parentheses ()
when mixing AND and OR within the same over the...
block.
V2: Allows mixing and and or freely. Remember that and has higher precedence (is evaluated first). Use parentheses () to control the order of operations explicitly for clarity, especially in complex expressions.
Example: (state = "enabled" and clicks(7d) > 5) or acos(30d) > 60%
V2 syntax allows you to do things that were difficult or impossible in V1:
Directly compare performance metrics across different date ranges.
V2 Example:
// Check if sales dropped compared to previous month
sales(30d) < sales(30d..60d)
Perform calculations directly in your formula.
V2 Example:
// Check if bid is below 110% of 7-day CPC
bid < cpc(7d) * 1.1
Learn more about Math Operations
let spend_threshold = 20.00;
let high_acos = 50%;
spend(30d) > spend_threshold and acos(30d) > high_acos;
Learn more about Creating Custom Properties
Implement if/then/else logic.
V2 Example:
// Assign a performance tag
let tag = case(
acos(14d) < 25% => "Good",
else "Poor");
Learn more about Conditional Logic
Most metric and property names remain the same between V1 and V2 (e.g., clicks
, sales
, spend
, acos
, state
, bid
, budget
).
New in V2: Key additions include target acos
, match type, and last bid change, last budget change
Refer to the Syntax Reference for the complete list of V2 properties.
over the last X days (...)
with property(Xd) ....
and
/ or
. Use ()
for clarity.let
, case
, math operations, or time period comparisons can simplify or improve your original logic.Migrating takes some effort, but the increased power and flexibility of the Formulas (V2) syntax unlock far more sophisticated analysis and automation for your Amazon Ads. Don't hesitate to consult the detailed documentation pages and the Syntax Reference.
© Merch Jar LLC