All things Shopify and commerce
Looking for some help creating a query. I need to iterate through all products where tracked=false but my first workflow worked until suddenly there were over 100 products where tracked=false and the For Each loop can't iterate through a list over 100. So now I'm using the Get Product Variant Data to limit the list to 100 but am having trouble with the query portion. I want product variant data for products whose inventory is not being tracked. This variable lives in variants.inventoryItem.tracked but not sure what the field would be to query this.
My current query is to just get a list of products created in the last 7 days. The issue is my company just uploaded 4,000 products and I'm now pulling the same 100 to set tracked=true instead of the remaining 3,900. Once I can iterate through a new 100 with each time this workflow runs, then I'll just manually run it 39 times until everything is tracked and let the automation handle this in the future.
This won't be the only time I have a large amount of untracked inventory added to the store so I will need this workflow for the future. Thanks!
" I want product variant data for products whose inventory is not being tracked "
Clarification isn't it that products do not get tracked nor have inventory , so only a products.variants have inventory and tracking.
InventoryItem etc is not an argument in a productVariant query
For products use a tag NOT existing in the query then simply tag each product as it's variants are finished being processed*. Or reverse it and use a bulk import to pre tag all products , use that tag in the query then remove that tag and do successive runs.
https://shopify.dev/api/usage/search-syntax#search-query-syntax
Alternatives,
Either incrementally decrease the time window for when products were created, or also use with schedule trigger to feed the scheduledAt data in a moving time window you create as a query.
Or while it's doubtful your data is properly setup for this but: create a query that will target specific sets of 100 products at a time based on some pre-existing data point such as a tag, being in a collection etc.
in the same vein create a new task for each set, 40, that target each set of 100 then run offset*
Alternatively see about using an ETL app like matrixify or ez-importer to edit data in bulk that doesn't have a shopify native CSV import.
Or use a better automation tool,app, like usemechanic to script an automation to do a bulk operations that flow really isn't built for. Examples, https://tasks.mechanic.dev/?q=bulk
*For LOTS of products make different workflows with separate unique tags as flags for NOT querying and tagging for omissions, and offset in run schedules as the minimum schedule trigger time increment is 15 minutes.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025