Work Flow Get Order Data Query

cirwin1
Visitor
3 0 0

I am trying to set up a daily auto email that will send me order numbers of unfulfilled Orders.

 

I also want to filter out Refunded Orders. I'd like to do this in the visual editor as I have no coding experience

 

Any Idea what to put in the query in GetOrderData to enable this?

 

This is my attempt:

created_at:<='{{ scheduledAt | date_minus: "6 days" }}' AND fulfillment_status:unfulfilled AND NOT status:cancelled AND NOT paymentStatus:Refunded

 

Replies 2 (2)
soenmez
Shopify Partner
50 6 17

If your shop is under the Shopify Plus Plan, you can use Shopify Flow to set up a daily auto email that will send you order numbers of unfulfilled orders and filter out refunded orders. Shopify Flow is a visual workflow builder that allows you to automate tasks in your Shopify store without any coding.

If you prefer to use a programming language, you can use the REST API for that. You can use the Order GET endpoint and filter for unfulfilled orders by adding the fulfillment_status parameter with a value of unfulfilled. To filter out refunded orders, you can add the financial_status parameter with a value of paid. The resulting query would look like this:

 

/admin/api/2023-04/orders.json?fulfillment_status=unfulfilled&financial_status=paid

 

This will return a list of orders that are unfulfilled and have been paid for. From there, you can extract the order numbers and use them to send yourself a daily email.

Keep in mind that you will need to authenticate your API request with an access token or API key. You can find more information on how to do this in the Shopify API documentation.

 

https://shopify.dev/docs/api/admin-rest/2023-04/resources/order#get-orders?status=any 

Kenan Sönmez | CTO @ Klondev Automation GmbH
- War meine Antwort hilfreich? Klicke Like um es mich wissen zu lassen!
- Wurde deine Frage beantwortet? Markiere es als Akzeptierte Lösung
- https://klon.dev/

cirwin1
Visitor
3 0 0

Hi, Thanks for the quick reply.

I have no coding experience, so was wondering if it's possible to do this inside the visual editor?

 

This is my attempt:

created_at:<='{{ scheduledAt | date_minus: "6 days" }}' AND fulfillment_status:unfulfilled AND NOT status:cancelled AND NOT paymentStatus:Refunded

 

This works for unfulfilled orders, but it does not get rid of refunded ones. Thanks