Applies an idempotent percentage price change to every variant of products matching a search, stamping a campaign metafield so re-runs never compound the change.
async def run(ctx): tag = ctx.params["tag"] percent = ctx.params.get("percent", -10) products = await ctx.shopify.query(products_with_tag(tag))
How do you change prices in bulk on Shopify?
To change prices in bulk on Shopify, this template takes a search or tag, applies your percentage to every matching variant, and stamps a campaign metafield on each product so re-running the job never compounds the change. Launch a 10% campaign, run it twice by accident, and prices still moved exactly once. Rounding happens per variant to two decimals, and the scope is whatever Shopify search can express: a tag, a vendor, a collection, a title match.
Shopify does not have a built-in undo for bulk edits, which is why bulk pricing usually means CSV exports and a held breath. Here the change runs as code against your real catalog first and produces a diff of every variant with its current and new price. You read the list, catch the outliers, and release it when the numbers look right.
Last updated August 24, 2026
If you run a sharper version of this template, or something it inspired, send it in. We review every application and publish the good ones, credited to you or your agency.
AI writes real Python or TypeScript, a dry run rehearses it, you approve, it deploys.
Free plan · no card · 🇪🇺 EU data residency