Optimising supply chain using traceability systems