Automatic tag creation not working as expected

Solved
Highlighted
Shopify Partner
93 4 18

Wondering if there's a workaround or something I'm missing. I've noticed that if Flow is reacting to a product creation event to add tags, the tags often get thrown out in the background while I'm populating the page with details.

 

Here's what's happening:

1. Product created with basic details, like a title, but not much more. I save the product but remain on the page.

2. Flow fires the product created event and adds the tags I want, but the admin interface never gets updated with the programmatically added tags.

3. I still have the product page open after Flow added tags, and naturally, keep editing the product to build it out.

4. When I save my changes, Flow's tags that were added in the background and would have appeared if I refreshed the page are thrown out, in favor of my complete version of the product that I just saved.
5. Outwardly, it appears that Flow never added the tags at all, even though it did it in the background and the changes were lost when I saved.

 

Any ideas, workarounds or suggestions?

0 Likes

Hi @JohnAtBonify!

 

It looks like the admin (when you hit save) is overwriting what Shopify Flow has added to the product through the API. There wouldn't be a way around this since when you hit save, the admin is overwriting all product information with an API push. In #5 though you mention that it looks like Flow never even added the tags to the product in the first place - where do you see the signs of that? 

 

My recommendation would be to only hit save once you have the most complete version of the product information filled out in the admin, and then Flow will add the tags after that. 

Anthony // Product Marketing Manager @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - Learn about Shopify Plus

0 Likes
Shopify Partner
93 4 18

@AnthonyKentris 

Sorry for the slow reply. In regard to #5, Flow did add the tags. It's just that the edit form doesn't update dynamically so if you're sitting on the edit form when that change happens, you never see it. Then, if you save the page without refreshing after that change happened, the tag is gone. So it appears that nothing happened. In reality, Flow did the right thing, you just don't see it.

0 Likes

Success.

Hmm, I see. Yes, the update form wouldn't update dynamically. What looks to be happening is as you said, Flow is adding the tags, but the edit form isn't aware of that if it's happening while an edit is happening, and then when you click save, it's overwriting what Flow added with the contents of the form (since it does a full overwrite of all tags).

 

Unfortunately there would be no way around this because of the way editing tags works. In the future, this could be solved by the concept of "time" in Flow, so that the workflow could be delayed by a certain amount of time.

Anthony // Product Marketing Manager @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - Learn about Shopify Plus

0 Likes