Update product metafield when a product has incoming inventory

Topic summary

A user wants to display a “restocking soon” badge on product listings when items have incoming inventory (variant.incoming > 0), without modifying theme template files directly.

Current approach:
Manually editing the Prestige theme’s product-badges.liquid file with custom code to check for incoming inventory.

Desired solution:
Automate badge updates using Shopify Flow to populate a product metafield (“badges”) whenever incoming inventory exists, triggered by product updates or purchase order creation.

Key limitation identified:
Flow lacks the necessary triggers for monitoring incoming inventory changes.

Alternative suggested:

  • Third-party app Mechanic offers a similar auto-tagging task for products with incoming inventory
  • Using a “Liquid block” could work for product pages but won’t solve the main requirement

Remaining challenge:
The badges need to appear on collection page product cards, where Liquid blocks may not be applicable. The discussion remains open without a complete solution that avoids both third-party apps and direct theme modifications.

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

The overall goal is to show a badge on every product listing like “restocking soon” if the product has inventory.incoming > 0 (e.g. a purchase order has been created and the product has incoming stock on it’s way).

I don’t want to use a 3rd party app for this, and I want to avoid modifying liquid directly in my templates (today I do this, and am I trying to avoid it moving forward…).

Today, I modify my prestige template theme (product-badges.liquid) to have an extra piece of code:

{% if variant.available == false and variant.incoming %}
    Restocking soon
  {% endif %}

I want to avoid that custom code in the template. I use prestige theme and it has a feature where every product has a metafield called “badges”. Any text you put into that metafield will show up on the product listing as a badge (so this is essentially a way of adding custom badges to a product in addition to the defaults like “sold out” etc).

I am hoping that there is some automated way (e.g. via Flow) to make it so that whenever a product’s “variant.incoming” value is > 0 , the badges metafield on that product is updated to say “Restocking soon”.

Can flow do this? either by acting on product update or purchase order creation?

Thanks.

1 Like

If i remember correctly, unfortunately Flow does not have relevant triggers.

Other apps do, for example Mechanic has a very similar task https://tasks.mechanic.dev/auto-tag-products-with-incoming-inventory

I totally support your desire to avoid theme code edits to make it easier to update your theme in future.

In your case, I believe you may rather use “Liquid block” to add very similar liquid code:

{% assign variant = product.selected_or_first_available_variant %}

  {% if variant.available == false and variant.incoming %}
    Restocking soon
  {% endif %}

1 Like

Thanks Tim! Appreciate all the guidance.

I agree that’s a good solution for the product page badges, but unfortunately the place where I need to see this badge is on the product “cards” that get displayed when you visit a collection page. I am not sure if there is any way to achieve that with a liquid block.