Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hi guys, apologies, i'm a bit new here.
I have set up a flow in shopify flow (on plus) as follows:
[Trigger] when order is fulfilled > [Action] add row to a google sheet.
I'm trying to export shipped order line items data to a google sheet for reporting, but i'm finding it difficult to add the correct variables to reflect a standard orders csv export (e.g. Name, Email, Currency, Subtotal, Taxes etc).
I've figured a few variables out (e.g. {{order.name}}), but its a bit trial and error.
Does a reference library of order variables exist? I've been using Mark Dunkley's shopify cheat sheet but can't find anything relating to order variables.
Any help would be much appreciated. thanks so much,
Would also love to know the answer to this! Just getting started with Shopify Flow and I also need to append order variables to different parts of the google sheet, but can't figure out how to do this.
There is a button to "Add a variable". Click that and choose the variable. It will insert the proper liquid for that variable. Some things like lineItems require looping so it will insert a loop. If you choose another variable for a lineItem, it will insert another loop, so that point you need to just grab the variable name. One thing to keep in mind is that Flow follows the GraphQL Admin API. So if you look at those docs, the names will be exactly the same.
https://shopify.dev/docs/api/admin-graphql/2023-01/objects/order
Finally, if you are trying to send each line item to a row in sheets, I'd recommend using a For Each loop to loop over the line items and call "Add a row" for each line item
"Finally, if you are trying to send each line item to a row in sheets, I'd recommend using a For Each loop to loop over the line items and call "Add a row" for each line item"
I am trying to do just that (Send each line item to a row in sheets). But when I try to add the "For Each" to loop over the line items, the line items list is not showing up as an option in the flow builder. I would think after I have done the getOrderData, I could add a For Each and it would allow me to select the Line Items to loop over. It is not showing that as an option. Am I missing a step? It would be very helpful to have a flow example of a for each over an order's line items. I can't find an example of what the flow should look like.
You cannot loop over nested listed yet (like Orders / LineItems). It also may not be advisable to call an API like that...you could end up calling the Sheets API thousands of times in a very short window (which is one of the reasons we don't have that feature yet).
OK. I can see that, but then what did you mean by : I'd recommend using a For Each loop to loop over the line items and call "Add a row" for each line item"
I don't see how to do that in the Flow interface.
If you are using an Order trigger, then you don't need to loop over Orders.
True. My situation is slightly different. I wanted to use a schedule trigger to pull down all order/line items that occurred in the last week (my volumes are low). I can see how using the order trigger for future orders might work better.
I think it's better to stream these 1x1 than do them in big batches, as long as the trigger works for you.
Thanks so much! Going to set up the by order flow next
Have you considered using a third-party tool for such tasks? For example, Coupler.io might be a perfect solution for you. The only thing, it wouldn’t work by a trigger (like order fulfillment) but by a schedule: Coupler supports automated data refresh feature that can be set up in a way of custom schedule, so you can choose how often your data should be refreshed (minimum every 15 minutes).
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
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