Optimizing supply chain workflows