Create meta field dynamic to another meta field

I have inventory and we export data to our customers once a week. They want to see the inventory before they order, but I don’t want them to see the actual quantity. How can I create a meta field that looks at the inventory quantity and say something like

if inventory >50 then ‘good’

inventory between 49 and 10 then ‘ok’

else bad

This doesn’t need to go on any customer facing page and will only be on the variant internal page on the admin side of things.

Hi @ChonkyDog ,
You can’t do this directly inside a metafield, because metafields don’t support logic - they only store values.

However, you can achieve exactly what you want by using inventory quantity as the condition and writing the result into a variant metafield via automation.

1. Create a variant metafield

  • Settings → Custom data → Variants
  • Type: Single line text
  • Example key: custom.inventory_status
  • Values: Good, OK, Bad

2. Use Shopify Flow

Create a Flow with trigger “Inventory quantity changed” and apply conditions:

  • If inventory quantity > 50 → set metafield to Good
  • If inventory quantity between 10–49 → set metafield to OK
  • Else → set metafield to Bad

This runs automatically whenever stock changes.

3. Export the metafield instead of quantity

When exporting variants weekly, include the inventory_status metafield.
Customers see Good / OK / Bad, but never the actual numbers.

You can handle this with the Mixtable XLS/CSV Exporter app - it lets you map your inventory quantities to columns and then use Excel-style formulas to generate those “Good”, “OK”, and “Bad” labels based on your quantity thresholds. You can set up the formula once (like =IF(A2>50,"Good",IF(A2>=10,"OK","Bad"))) and it’ll automatically calculate for all your variants. When you’re done, export the Mixtable spreadsheet to Excel or CSV and share that file with your customers weekly without exposing actual quantities.

Check out the Exporter in the Shopify App Store