Have your say in Community Polls: What was/is your greatest motivation to start your own business?

I need to run a workflow to manage my inventory

I need to run a workflow to manage my inventory

Gungibear
Tourist
7 0 1

Hi,

 

I have installed one of the workflow templates and turned it on but it doesn't appear to do anything? What am I missing please?

 

Workflow.jpg

Replies 5 (5)

paul_n
Shopify Staff
1429 156 330

This particular workflow checks for both tags and if any variant for a product it in stock or out of stock. The tags are needed to know if the product was already out of stock. Since you'll start with no tags, you'll only execute the bottom part. So you need mark your currently out of stock products with that tag. 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
Gungibear
Tourist
7 0 1

Thankyou for that. Is there a way to filter the products to bulk add the tag?

paul_n
Shopify Staff
1429 156 330

Yes, there are two options I can think of:

Option 1. Build workflow that queries out of stock stocks and adds the tag. If you have a lot of products, you might need to run it several times to work through them all. 

 

  1. Scheduled time trigger
  2. Get product data with query (inventory_total:0 AND tags_not:"Out of stock")
  3. For each product
    1. Add product tag (out of stock)

Option 2. Or you could build a workflow like the below. You would then run this via the "Run Flow automation" feature in the admin (you have to do it page by page, but there is a trick to get 250 per page, see here). 

  • Product added to store
  • Check if out of stock and doesn't have "out of stock" tag
  • If so, add "Out of stock" tag
Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
Gungibear
Tourist
7 0 1

I like the idea of option one but I'm struggling to put it into a workflow. Could you help me with this please?

paul_n
Shopify Staff
1429 156 330

If you want help, via this forum, try to build it and when/if you get stuck post a question with as much detail as possible. 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.