Out now! Check out the Poll results: Do you have a Shopify store?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How can an app find the best selling products?

How can an app find the best selling products?

adelespinasse
Shopify Partner
9 0 3

We have a (eventually public) app which needs information about which products/variants are most popular, preferably with total numbers sold or at least a ranking of the top N products or variants. It seems to be surprisingly hard to get this information through the API. Here are the options I see:

 

  1. Use the Storefront API, which lets you retrieve a list of products sorted by BEST_SELLING. Unfortunately a public app can't use the Storefront API unless it's a "sales channel", and it really doesn't make sense for our app to be a sales channel.
  2. Use the Admin API. It does not let you sort products by BEST_SELLING, but we could potentially fetch all orders from the last 60 days and compile the sales numbers from that. The problems with this are
    1. Orders are "protected data", which sounds like a pain, and we shouldn't really need access to any data about individual orders.
    2. It would be a lot of data to fetch just to compile a short list of numbers. The data we need appears to already exist, so recreating it in this way feels really inefficient.
  3. Possibly something with ShopifyQL, but that appears to be only in the "unstable" version of the API, and it is indeed unstable (I got an "Internal error" error on the example query). Also it's not clear to me whether it will be available on all stores, or only Shopify Plus. It seems to require the "read_reports" scope, and it seems like reports are normally only for Plus and/or Advanced.

Do I have any good options here?

Reply 1 (1)

muhamadtalha944
Visitor
1 0 1

@adelespinasse Hello,

I am also looking for this and I would be glad to get some assistance from you. You are an expert person.

 

I am also working on something similer to this, can we connect somewhere? Can you share your email or any social media link where we can do effective communication!!