A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hey all-
There have been MANY times (two separate occasions just today!) where I've needed to know which products a particular customer has purchased, but can't for the life of me figure out how to quickly find this info without exporting that customer's orders to a csv file and then opening it in Excel to sort through there. There's gotta be an easier way to view all products sold to a customer, right? And when I say that, I don't mean simply seeing if someone has bought a certain item or not; no, I need to see a full list of every product they've ever purchased in one place. Can anyone help me with a way to do this? Assistance with the logic for a GraphiQL query would super-appreciated, as the documentation I've found for that hasn't provided me with enough clues to get started. Thanks!
Man, it's times like this when I really miss php/mysql... 😛
Chris
P.S. PLEASE do not try to sell me another damn app! That is just not helpful - thanks.
You can use the Sales by Customer Name report and filter by a specific customer.
Thanks - that sounds perfect! But where would I find that? When I look in the reports section, there are only about 25 reports to look at... 😕
Which version of Shopify do you have?
Ah, I see - I'm on the Basic plan, albeit an older version I was grandfathered into... I guess that means I gotta pay to see what's going on then? 😕
Chris
Yeah that report won’t exist on Basic. You can use the Admin API yourself to filter down to the orders you want.
Or I could recommend an app for you 🙂
Well, that's actually what my first question was above. 😉
Can anyone help me with a way to do this? Assistance with the logic for a GraphiQL query would super-appreciated, as the documentation I've found for that hasn't provided me with enough clues to get started.
Thanks!
Chris
Understood. The thing is there's not an easy way. You can use the Orders query to get all orders for the time period you are interested in. Then you have to cursor through them and look at each order to determine if it's for the customer you want. If an order matches, then you would look at all of the line items on that order to get the products purchased.
There are apps that will let you do this for free in 1-2 minutes.