How to improve product sorting in Shopify?

Shopify is an e-commerce platform that helps one build their store, both online and offline, engage with customers, accept payments, and more. Shopify thus acts as a facilitator working to make the process of selling online easier. 

With the introduction of more products, it becomes important to foresee the order in which one’s products will be visible to the customers. On Shopify, as in most e-commerce platforms, a prospective customer can change the order in which they want to view the products – primarily by a drop-down giving us options like “Featured”, “Best Selling”, “Alphabetical”, “Price- Low to High”, “Price – High to Low”, “Date Modified”, etc. 

Product Sorting imposes an important challenge on all sellers. Showing the prospective customer the right products are very important. Suppose an instance where the customer is viewing one of the first few products in the listing page, however on selecting them he finds that the correct size is not available, or more so the product is not in stock. Now assume this repeats for a couple of more products which the customer looks into. One might be dissatisfied with the service and exit the website. Or take another instance where the customer has to scroll through many products to find the best match – this too might be cumbersome for an activity like online shopping which is more than often based on impulsive buys. A personalized, well-organized product listing order is thus necessary for a good customer experience. 

Here comes the necessity of Machine Learning and its applications in online sales platforms which have taken the world by a storm, more so in the current situation of COVID-19 where online shopping has taken a front seat. Ecommerce owes to the rise and spread of internet usage, and machine learning algorithms adeptly collaborate with its data to generate increased benefits. 

Easy implementation of Google Analytics on Shopify has eased the way for our algorithm. Google Analytics provides us with historic product-specific performance data metrics, such as total detail views, total unique purchases, add-to-cart details, and so on.


A product can be seen from two perspectives –

  • Old/Existing Product – this product type contains historical data from google analytics for a longer time duration (in our algorithm, over 30 days). 
  • New Product – product type having less rich information, primarily due to lesser visibility in the listing order, We select any product being introduced in the last 30 days as a new product. 

Our algorithm at DeepFlux uses the metrics – product detail views, product purchases, product add to cart, conversion rate, add to cart rate, and the daily averages for detail views, product purchases, product add to cart.

We first only work with the old products. Assigning a case-by-case weightage to each of these, we arrive at a product performance score – how is the product performing on basis of these above metrics as an indicator is how much the product is favorable to the customers. We know better the product detail views, more the add to cart, better the chances of the product being purchased. And more of one product being purchased indicates the product as a product a prospective new customer might tend to buy. 

Next, to avoid the issue of no inventory, we have introduced an inventory score and segregating the products into inventory buckets (bucket 1,2,3). Bucket 1 implies there is enough inventory of the product to sustain average existing sales for the next seven days. Bucket 2 implies low inventory, and that it needs replenishment. Bucket 3 implies no inventory. For our final sorting, the products are first sorted on the basis of the inventory buckets – to ensure the customer finds the products available first, and then another level of sorting is done on the performance score – to ensure the customer first sees the best performing products amidst the existing inventory bucket. 

However, the problem intensifies for the new products that do not have good historical data. After the analysis of the old products, we use our implementation of the Google Vision API Product Search. This allows retailers to create products, each containing reference images that visually describe the product from a set of viewpoints. Visual Similarity helps us identify the external trends, ie, evaluate the competition set for these new products. We combine the visual similarity score with our performance score and inventory data, with a higher weightage on the similarity score to arrive at a more revised listing order – which now consists of the new products in specific slots (say, 5th, 10th,15th place in the listing order). New products thus now attain sufficient visibility to gather the data for the metrics which allows for a better understanding of these products in the next round of the exercise on the next day the sorting order is arranged.

This exercise is repeated in short time intervals, keeping in mind the inventory problem in question. And coupling inventory with the scores of the performance metrics initially also provides a chance for high-inventory-low-selling products to be more visible to the consumers as the high-inventory-high-selling products get sold out. Though in nascent stages, our algorithm shows an improvement of over 40-50% betterment in the overall conversion rates, reduction in bounce rate by 30-35%, add to carts increased by over 35-40%,  for the category.  More refined algorithms may also incorporate the consumer behavior patterns defined by the age, gender, location, and device used for booking, so on, so forth. 

Read the previous blog here