Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hi everyone,
I'm trying to build a Flow that updates a product metafield named last_stock_update (type: date_time) whenever the inventory quantity of one of its variants changes.
i have created a metafield date/time in product section named last_stock_update
i am not able to get it work correctly, did you find a solution ?
Thanks !
Solved! Go to the solution
This is an accepted solution.
to help people who needs a solution, i found this variable : {{productVariant.updatedAt}}
it takes inventory levels, but also variant modifications
in case you use only inventory movements, it will be fine
Hello @LADS12
Step-by-Step Flow Setup
Use the trigger: Inventory quantity changed
Condition (optional but recommended):
If you want to update only when the quantity actually changes (not stays the same), add:
Condition: Inventory Level > Quantity Changed
Value: is not equal to 0
Add action: Update product metafield
Metafield details:
Namespace: (your namespace, e.g. custom)
Key: last_stock_update
Type: date_time
Value: {{ now | date: "%FT%TZ" }}
(This uses the current date-time in the required ISO format.)
thanks for your answer, but this is not working and returning this error : « now » is not a valid link, please replace the variable.
This is an accepted solution.
to help people who needs a solution, i found this variable : {{productVariant.updatedAt}}
it takes inventory levels, but also variant modifications
in case you use only inventory movements, it will be fine
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025