Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
I have a flow set up so that for each item with the corresponding title, packaging products (such as hang tags, stickers, etc.) are added to the product. It doesn't seem to work and only 1 of each packaging item is added to the order. Is there a way to fix this?
It looks like you've put the logic you want to occur on each item after the Then port of the For each step, but you actually want them after the Do this for each item port. Any steps after Then only happen AFTER all actions are performed in the For Each loop.
See the documentation for further details.
To learn more visit the Shopify Help Center or the Community Blog.
Hi @Jeff-Armstrong ! Thanks for responding. To clarify, where would I have to move the arrows for the flow to work properly?
It depends what you're trying to accomplish.
If you want to add a line item for each line item in the order that matches a condition, then you need to put that condition and action after the Do this for each item port.
If you only want to add a single line item to the order if any of the line items match a condition, then you'd want to do that after the Then port (since you only want to do it once at most).
To learn more visit the Shopify Help Center or the Community Blog.
Hi Jeff,
We want to add a line item for each line item in the order that matches a condition. We tried putting the condition and action after the "do this for each item" port, but it didn't work. Instead of adding a line item for each line item that matches the condition, it added a line item for EVERY line item.
Objective: For every unit of sku X on an order, add a unit of sku Y.
Test flow: 3 line items on order, 1 matched the conditions.
Desired outcome: 1 unit of sku Y added to order
Actual outcome: 3 units of sku Y added to order (1 for each line item)
Example flow below (ignore the email condition - that was just for testing purposes)
What are we doing wrong here?
If your workflow is adding the item for all of the lineItems, I think it means your condition isn't working as you expect. Can you show an image of your condition panel so we can see the full details?
I figured it out - kind of. I previously had the generic lineItems value in my condition for "sku". I replaced this with "lineItemsForeachitem.sku" in order to tie it back to the "for each.." condition and it worked (see screenshot).
My challenge now is that the flow is adding 1 unit for every line item that meets the defined conditions. What I'm trying to do is add 1 unit for every UNIT purchased on line items that meet the conditions. In other words, if someone buys 3 units on a line item that qualifies, we want to add 3 units of different sku to their order. Current flow would only add 1. Any suggestions?
Thank you for your help!
I don't think that's possible with that action, because you cannot dynamically set the number of items to add. We have that in our backlog but it would take some time. The only workaround I can think of would be to use Send HTTP Request to call the API directly.
Is there an app you recommend that can support this Send HTTP Request?
Flow provides that action...no app required. But you need to be able to write an API call.
Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024