Automation 💎 Built for Sidekick ⚡ Sidekick does this for you
shopify sidekick automation inventory flow

Log Inventory Adjustments to a Product Metafield

Build a Flow that stamps a product metafield with the date and new quantity every time inventory changes, giving staff a lightweight last-adjusted log without a separate system.

đź“‹ Prompt
Run in Sidekick
Build a Shopify Flow that keeps a lightweight last-adjustment log on each product variant.

Trigger: Product variant inventory quantity changed.

Actions:

  Update product variant metafield “[LAST_ADJUSTED_METAFIELD]” (namespace/key I’ll confirm, e.g. custom.last_inventory_change) to today’s date and time.
  Update product variant metafield “[LAST_QUANTITY_METAFIELD]” (e.g. custom.last_known_quantity) to the new inventory quantity.


Before activating:

  Confirm the two metafield namespaces/keys, or tell me to create them (“Create metafield definition”) if they don’t exist yet.
  Confirm you’re okay with this only storing the most recent change (not a full history) — Flow metafields hold a single current value, not a running log, so if you need a full audit trail of every adjustment with who made it, that’s better served by Shopify’s built-in inventory history in admin, which already tracks that natively without a Flow.


After I confirm, create and turn on the Flow.

Note: this fires on every quantity change, including normal order-driven decrements, not just manual adjustments — if you only want to log manual stock-take corrections specifically, Flow’s trigger doesn’t distinguish the two, so this will log all changes and you’d filter manually by comparing timestamps against order activity.

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