Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hi all,
I have set up a Shopify flow, but the email it's producing has no data in it?
I'm trying to create a flow that sends an email every day with orders that are still in unfulfilled after 3 days.
Could some please help me and explain where the flow has gone wrong?
The email has the subject and email and that's it.
The query I'm using in the 'get order data' step is:
created_at:<='{{ scheduledAt }}' AND created_at:>'{{ scheduledAt | date_minus: "3 days" }}' AND financial_status:paid AND fulfillment_status:unfulfilled AND test:0 AND closed:0 AND cancelled:0
Thanks!
Solved! Go to the solution
This is an accepted solution.
First, figure out which fields you're interested in including the email. You can find all the available fields in the API docs. Once you know that, then you can output the relevant values for each item next to each other by iterating through the list once, rather than iterating through each item multiple times for each field. For example:
{% for getFulfillmentOrderData_item in getFulfillmentOrderData %}
{{getFulfillmentOrderData_item.orderName}}
{{getFulfillmentOrderData_item.status}}
{{getFulfillmentOrderData_item.updatedAt}}
{% endfor %}
You'll probably want to further modify that to include formatting (eg, as a bulleted list). Here are some other examples of using Liquid in Shopify Flow, in case that's helpful.
I'd recommend running that query within the graphiql app (https://shopify-graphiql-app.shopifycloud.com/login) - then you can see if the query itself is working the way you expect.
HI @leon99 👋 I can't really see from the workflow screenshot but are you including the desired information in the subject or body of the email within the Send internal email step? You can use Liquid to include data that's available to the workflow in the email, such as a list of order IDs and/or relevant customer contact details.
Hi @RPiii,
Thanks for your reply!
I've added in some of the variables into the message body but they don't seem to tie together well (so I've probably done it wrong) and the resulting emails don't make sense.
I'm unfamiliar with Liquid, would I be able to write a simple query in that to provide order ID, date, fulfillment status?
Thanks,
Leon
This is an accepted solution.
First, figure out which fields you're interested in including the email. You can find all the available fields in the API docs. Once you know that, then you can output the relevant values for each item next to each other by iterating through the list once, rather than iterating through each item multiple times for each field. For example:
{% for getFulfillmentOrderData_item in getFulfillmentOrderData %}
{{getFulfillmentOrderData_item.orderName}}
{{getFulfillmentOrderData_item.status}}
{{getFulfillmentOrderData_item.updatedAt}}
{% endfor %}
You'll probably want to further modify that to include formatting (eg, as a bulleted list). Here are some other examples of using Liquid in Shopify Flow, in case that's helpful.
Hi @RPiii,
That's been really helpful, thank you for that.
I can now see I was putting the query all wrong and that it needs to be one main query with the sub queries coming off it, sort of like a SQL Query with joins.
Thanks!
The year-end shopping spree is around the corner! Is your online store ready for the ...
By JasonH Nov 10, 2024We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024