Providing the right products at the right time with machine learning