Reads the supplier price list, updates cost per item across the catalog, and tags products whose margin falls under your floor with 'margin-floor-breach', so repricing can follow with a diff you approve.
async def run(ctx): floor = ctx.params.get("margin_floor", 0.25) for row in await ctx.http.get_csv(SUPPLIER_PRICE_LIST): variant = await ctx.variants.find_by_sku(row.sku) if not variant:
How do you keep Shopify costs in sync with a supplier price list?
To keep Shopify costs in sync with a supplier price list, this template reads the list, matches rows to variants by SKU, updates cost per item across the catalog, and tags products whose margin falls under your floor. Unmatched SKUs are reported instead of skipped silently, which catches the renamed row that would otherwise leave one product on last year's cost. Repricing can then follow deliberately, product by product, instead of surfacing at the end of a bad quarter.
Supplier updates usually live in an inbox attachment while the store keeps selling on old numbers. As code, ten thousand SKUs take the same effort as ten. Each sync produces a diff of every cost change plus the list of margin breaches; you approve it once, and the margin checks downstream start working from reality again.
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