Usually optimization takes forecasts as part of inputs. It is actually a lot like reinforcement learning, where the sales forecasts are part of the environment. This is standard process for supply-chain management, not just retail industry or at Amazon.