Automating supply chain management