Peter Haik

What is the recommended way to track and sort products by popularity since the Predictor has been removed Are there controls in place for this



Re: Commerce Server 2007 Product Popularity

Joseph Johnson

Peter,

The Commerce Server Analytics packaged with the installation contains a few reports to determine product popularity, but I don't know the complete level of detail for these reports.

Specifically, I think the report for product popularity only lists the product popularity with respect to every other product on the site. I don't think it has logic to see what popular cross-sells are present on the site, and I think these metrics are basically gathered up by importing the PurchaseOrder information to the DWA system.

I know of nothing that programmatically allows cross-sell functionality at run time based on popularity, and I think this would likely be custom code. This is definately functionality I'd like to use in a lot of projects, so we should probably discuss best practices for implementing this system.

I envision this sort of thing as being very similiar to the inventory system, where popularity is updated by pipeline components during the checkout process, and the actual popularity values are maintained as a seperate table in the Product Catalog database. What sort of functionality would you like to see out of this sort of thing






Re: Commerce Server 2007 Product Popularity

Peter Haik

In my case, I just need a value for popularity (whether that's quantity sold last x days, or pageviews, what have you doesn't really matter), that I can sort by on the products list.

So less on the cross-saleability and more on the how often are people purchasing this.





Re: Commerce Server 2007 Product Popularity

Colin Bowern

Peter,

I would write some code either in SQL Server or outside of SQL Server to calculate this on a scheduled basis. The logic would involve a select statement against the order line items table with grouping clauses and a where statement:

SELECT ProductIdBase, ProductVariantIdBase, SUM(Quantity) AS TotalSold
FROM LineItems
WHERE (Created < DATEADD(day, - 30, getutcdate()))
GROUP BY ProductIdBase, ProductVariantIdBase
ORDER BY TotalSold


From there you could take the data and pump it back into a custom attribute (e.g. Product Popularity) using the ordering as the popularity ranking.

Cheers,
Colin






Re: Commerce Server 2007 Product Popularity

Caesar Samsi - MSFT

If I understood the question right, you are looking for a "best seller" list within a period of time.

Colin's method certainly works directly against the database. Just be aware that the tables are used for online production purposes, so you'll want to avoid running the script at peak times (e.g. schedule it for a nightly run at off peak time).

Additionally as Joseph hinted. There is a Product Sales report available that you can run. You'll need to run the Data Warehouse import first, and then view the report (it's parameterized so you can specify the date range). This method is good for viewing the best seller list but requires a bit more work to convert into a list for pumping back into the product catalog (as product attributes), or simply a text file that you can render as HTML online.

Thanks, Caesar.