Product Variants 💎 Built for Sidekick ⚡ Sidekick does this for you
shopify sidekick variants finances

Backfill Variant-Level Cost-Per-Item for Margin Tracking

Fill in missing cost-per-item values at the variant level using a supplier cost sheet, so profit and margin reports are accurate.

đź“‹ Prompt
Run in Sidekick
Find every variant in [SCOPE, e.g. “the entire catalog” or products tagged SUPPLIER_NAME] that is missing a cost-per-item value.

Match each variant to a cost using this source: [COST_SOURCE, e.g. “the SKU column in this cost sheet: COST_SHEET_REFERENCE” or “the parent product’s existing cost, if any variant already has one”].

For each variant:

  Show current cost-per-item (or “missing”), matched cost from the source, and resulting margin at current price ((price - cost) / price).
  Flag any variant where the resulting margin looks unusually low (below [MARGIN_THRESHOLD]%) or unusually high (above [MARGIN_THRESHOLD_HIGH]%), since that often signals a matching error rather than a real margin.
  Flag any variant with no match found in the cost source at all.


Apply cost-per-item values only after I review the full table. Afterward, give me a summary: variants updated, average margin before/after, and a list of unmatched variants needing manual cost entry.

How to Use

  1. Copy the prompt above
  2. Open Shopify Sidekick in your Shopify admin
  3. Paste the prompt and replace the bracketed placeholders with your details
  4. Review Sidekick's response and apply the suggestions