This is funny to me. In the old days, this was called: cost accounting to determine the profit of any particular item you sell and market analysis to see how many of which things your customers are likely to buy. Join the two results to optimize your profits. It's not rocket (/data) science.
Actually neither of these is particularly easy to do for unorganized companies.