Remove Product Type when Inventory <0?

Topic summary

A user wants to automatically hide out-of-stock products from a smart collection after 5 days without deleting, archiving, or unpublishing them. Their initial approach was to remove the Product Type field, which the smart collection uses to automatically include products.

The Challenge:

  • Removing Product Type isn’t ideal since it’s structural data needed for filtering
  • The smart collection uses OR conditions (Product type = x OR y OR z)
  • Shopify smart collections don’t support combining OR and AND conditions
  • The “Remove from collections” action doesn’t work with smart collections

Recommended Solution:
Switch the smart collection criteria from Product Type to tags or metafields (metafields preferred, as collections can’t use “tags does not contain” conditions). This requires:

  • Backfilling tags/metafields on existing products
  • Setting them automatically on new products
  • Using Flow to add/remove the tag or update the metafield value after the 5-day wait period

Outcome:
The user accepted this approach and will restructure their smart collection criteria accordingly.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

I’m trying to create a flow to hide products after some days from a smart collection (“Catalogue”) by removing the Product type. The smart collection uses the Product type to automatically add products to the catalogue, this product type is also used for our filtering system so I’d like to keep that in place.

What I’m trying to achieve

Start when: Product variant out of stock

Then Wait for: 5 days

Then Remove: Product type

Result: The product that went out of stock is removed from the catalogue smart collection after 5 days because the product type has been removed. The product is still active, but no longer in the catalogue smart collection.

What I don’t want

I don’t want to delete, archive or unpublished the products. I want to keep them active, just no longer in the smart collection.

I’m hitting a wall as I cannot find a way to remove (or change) the product type and the Remove from collections action doesn’t seem to work with the smart collection.

Does anyone have an idea how I can still manage to get the result I want in any way without having to delete, archive or deactive a product? Any help is much appreciated.

Adding or removing a product type doesn’t seem like a great approach, since that data should be more or less fixed and you create an issue if you ever need to add it back. You could instead use a tag or metafield value to remove it from the collection. Metafield might be better here because collections don’t currently allow a condition like “tags does not contain ‘out-of-stock’”. If you use either of these, you would use this workflow to add/remove the tag or set the metafield value.

To update the type, you would need to use the action “Send Admin API request” and with “productUpdate” as the mutation.

Thank you for your insight.

The issue I’m running in to is that we use a smart collection with an OR condition, so:
Product type = x OR product type = y OR product type = Z.

So whatever I do with tags, the smart collection will override this when a flow would remove the product from the collection. As far as I’ve found it’s als not possible in a smart collection to combine OR and AND conditions, for example:

Product type = x OR product type = y OR product type = z AND tag =/ out-of-stock

Do you have any suggestions on how I can still get the result of removing products from the smart collection with a flow?

Yeah, if you are using OR I don’t think that works. You would need to stop using ProductType as the criteria for that collection. It’s possible to entirely switch to tags or metafields, but that would require you to backfill the tags or metafields on all your products. And set them going forward when new products are created.

Alright, clear.

I will change the smart collections criteria to work with either information from metafields or tags. Then the flow won’t be an issue.

Thanks for the help!