Automation
Script cookbook
Ready-to-paste scripts for the most common jobs — copy one, preview it, adjust the thresholds.
Every script below is ready to paste into the editor. The thresholds are sensible starting points, not gospel — a $5 t-shirt niche and a $30 hoodie niche need different numbers. Always preview first, and start new rules in Review mode.
Pause bleeders
The classic first rule: keywords with plenty of clicks and nothing to show for them.
Pause a keyword that only bleeds when you add it up
$4 wasted in each of ten campaigns is invisible to the rule above — every instance looks harmless. An accumulated report sums the keyword across all of them first, then pauseEverywhere() switches off every instance at once.
Stop an ASIN that quietly eats budget everywhere
The same idea one level up: an ASIN summed across every campaign it advertises in. Swap pauseEverywhere() for note() alone if you want a list to read before acting. The # ACTIVE ONLY line is the default written down — leave it out and the rule behaves identically, but with it there you can see at a glance that ASINs you have already switched off are left alone.
Bid up the keywords of an ASIN that is proven across every campaign
Judges each ASIN on its total across all campaigns, then raises bids on the keywords that actually sell it. The loop reaches every ad group the ASIN delivered through, so the two guards are what narrow it: COUNT(ASINS(...)) keeps the raise off ad groups advertising more than one product, where the winner's keywords are shared with its neighbours, and the keyword count keeps it off ad groups big enough to make one ASIN an expensive decision. Drop either one if you want the wider reach.
Bid down high-ACOS keywords (with floor and cool-down)
Cuts bids 15% where ACOS runs hot, never below $0.05, and waits a week between cuts so changes can take effect before being judged.
Bid up proven winners (with ceiling)
Fill a new auto campaign's empty clause bids
Every auto ad group ships with four predefined clauses, and by default all four bid the ad group's default. This is Actions → Adjust Auto Targeting Bid on a schedule: it gives each clause its own bid the night the campaign appears. when: "empty" means it only fills clauses that have no bid of their own, so a bid you set by hand is never overwritten — and the clauses are read live from Amazon, so it reaches the three that have never delivered and are in no report.
Scale budgets on performance
Raises budgets on campaigns that convert efficiently, trims campaigns that spend without selling.
Harvest converting search terms
Promotes shopper queries that convert into exact keywords in their own ad group.
The targetingType test is not optional. createKeyword builds the keyword in the ad group its search term ran in, and Amazon allows only negative keywords inside an auto campaign — so terms harvested out of an auto campaign have to land somewhere else, which this rule cannot do. Terms from auto campaigns are skipped (the run log says how many), as is any term that is itself an ASIN — Amazon only accepts those as product targets. Moving an auto campaign’s winners into a manual campaign is the one harvesting job a rule cannot do for you: pick the destination ad group in the Amazon console, and let a rule keep it tuned from there.
Negate wasteful search terms
Blocks queries that click but never convert — the highest-leverage cleanup there is, because a negative stops the spend completely rather than trimming it.
Exact is the default, and usually the right one. A negative exact blocks only that precise query; a negative phrase blocks every query containing it, which is what you want for a genuinely toxic word (a competitor brand, “free”, an irrelevant niche) and a quiet disaster otherwise. Placement follows the source: the negative goes into the ad group the term actually delivered from, so the same query stays free everywhere else. Terms already covered by an exact negative are skipped rather than re-sent, and every negative MerchDash adds is in Change history and revertible in one click.
Trend brake: this week vs. your baseline
Compares a keyword's recent ACOS to its own longer history and reacts only to genuine deterioration.
Placement tuning
Rewards campaigns that convert well with a top-of-search boost.
Portfolio housekeeping
Files paused, long-dead campaigns into an archive portfolio so working views stay clean.
Move winners into a portfolio, and build it the first time
The housekeeping rule above needs the Archive portfolio to exist already — PORTFOLIO() stops the run when it does not. createPortfolio() is the version that makes it: the portfolio with that name, created when there is none, so the rule works on a fresh account and every night after it. It never answers NONE, so it needs no guard, and it proposes nothing once the portfolio is there. Approving the creation looks Amazon up first, so a portfolio you made in the console keeps its campaigns and history instead of being duplicated.
Placement tuning, one placement at a time
Raise top of search where the campaign converts, back it off where it does not, and leave each campaign alone for a week afterwards so the adjustment has time to show. DAYS_SINCE_CHANGE("top of search") is the cool-down for that one placement — a product-pages change made yesterday does not block it. See placement cool-downs.
Use campaign.daysSincePlacementChange instead when nothing about the campaign's placements should move if any of the three was touched recently.
Season ramp (pair with a season window)
Save with a season window (e.g. Nov 1 – Dec 20) and a second “ramp-down” rule after it.
MAX()/MIN(); add a DAYS_SINCE_CHANGE() cool-down to anything that adjusts values; always attach a note() — future-you reads it in Change history; and demand enough data (clicks/orders minimums) before letting a rule judge anything.