Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
I did not know there was a Flow App community here. I've been posting my (unanswered) questions to the Shopify Apps community.
Here are my last two posts (I don't see how to move them) related to this post:
Since I couldn't get either of those methods to work, I started on a third. It starts with getting the customer's order data, then looping through the orders. I can't just get the latest order data (i.e., 1) because the latest order is the order just placed and which triggered the flow and not the order just before (i.e., the true previous order).
This method works until I go to tag the original order (i.e., the order that triggered the flow). Because I'm looping through the order data, I can only tag action on an order from the get order data - I cannot take an action on anything not in the loop.
Solved! Go to the solution
This is an accepted solution.
Wouldn't you do something like:
date_created:<={{ "now" | date_minus:"1 minute" }}
Can you use the "Then" path? That path will be executed after the looping is done and you'll have access to the original order
Hi. Thank you for helping. I am using the then path at the end. Using then instead of otherwise at any point during the for each loop does not allow me to edit the original triggering order. 😫
If you mean "then" at the for each block, that doesn't loop through the options, therefore, doesn't accomplish what I need.
I think I understand...you want to conditionally tag an order based on other orders.
The most straight-forward way to do that is to remove the whole For Each loop and connect an "Add Order Tag" to "Get Order Data". You then write your logic in Liquid in the tag field (yes it accepts liquid).
A couple of tips:
Thank you. I understand conceptually what you're suggesting, but don't know how to pull it off.
Today, I've been focusing on the get order data query. If I could change the "now" to "1 minute" (or equivalent) so the newest order (the trigger order) was excluded, it would solve my problem; however, "now" doesn't seem to be replaceable.
{{ "now" | date_minus:"1 min" }}
That just gives from now to 1 minute ago...which will just be the current new order that triggered the flow.
This is an accepted solution.
Wouldn't you do something like:
date_created:<={{ "now" | date_minus:"1 minute" }}
The problem is "now." It means all orders from the 1st to date_minus will be pulled. I tried ">" without the "=", which means anything greater than now and less than date_minus, but it still grabbed the latest more recent order that triggered the flow.
Can you share your full query?
Note that I used "less than" so that code would get all orders older than 1 minute.
This does work! While I noticed the less than operator, I failed to see less than with time means anything older than.
BTW: "1 min" generates an error but "1 minute" works.
Thank you very much for sticking with your help.
Great thanks I fixed the original post
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