Sort by best selling products

Jason_Jaynes
New Member
6 0 0

We are trying to get a sold count from the product endpoint so we can sort products in our system by best selling like users can already do through custom collections. This attribute currently does not appear to exist on the product endpoint. 

Is there another way to get this data? If not, can you add it?

Thanks,
Jason

0 Likes
Chris_Saunders
Shopify Staff
Shopify Staff
582 0 49

We don't track this kind of information. You can use webhooks to keep track of product sales and then re-order your top selling collection based on that collected information.

Shopify doesn't track this kind of information.

0 Likes
Jason_Jaynes
New Member
6 0 0

Thanks for the reply Chris. I am confused because you already provide this sort option, so I would assume you would provide the data you use to perform this sort through the API. It may not be sold count, but I assume there is some attribute you use to perform this sort. Can you tell me what product attribute you use to sort products by "best selling" in custom collections?

If you are unwilling to surface this data, can you surface a call that allows one to get a list of products for a custom collection sorted by "best selling"?

Thanks,
Jason

0 Likes
Chris_Saunders
Shopify Staff
Shopify Staff
582 0 49

Ah I see what you are talking about. You can create a custom collection and set it's sorting but I don't believe we expose that information for whatever reason.

I can look around but I don't think this information is stored directly on the product/variant.

0 Likes
Jason_Jaynes
New Member
6 0 0

Thanks for looking into this for me Chris. If it is not exposed, how I can request to have the information exposed?

Thanks,
Jason

0 Likes
Ben_Cardwell
Shopify Partner
1 0 0

Hey Chris, 

 

I'm hoping we can find a solution for this as well, it's a small requirement but I think it's potential for Shopify users and App creators alike is enormous. I myself was hoping to use the feature to really take the mobile app for my store to the next level.

 

Ben 

0 Likes
Jason_Jaynes
New Member
6 0 0

Thanks for the additional confirmation of the need for this data Ben. Chris, were you lucky in tracking down any where this info is stored today?

Thanks,
Jason

0 Likes
Chris_Saunders
Shopify Staff
Shopify Staff
582 0 49

Yes. We'll need to look into what would be required for exposing the attribute to the collections API. It's shouldn't be a lot of work, but we need to be sure the API exposure makes sense and when we have the space to place this feature request into a sprint.

We cannot provide any dates as to when this would be done.

0 Likes
Jason_Jaynes
New Member
6 0 0

Thanks Chris. FWIW, I think this information makes more sense as a product attribute and not a collection attribute in the API. As you know, you can see by looking at a product what collection it is in, but you cannot query a collection for a list of products. The best way to do this is to simply surface a sold count on the product and then allow API users to sort products based on that value.

Thanks,
Jason

0 Likes
Jason_Jaynes
New Member
6 0 0

Hi Chris,

Just checking in to see if you have any update on this?

Thanks,
Jason

0 Likes