Needing to do the same thing. We will ship our products to the fulfillment company and when order come in: they ship. The fulfillment company can pick any product, not caring about the serial number printed on the box. But when they ship, we want them to record the serial number at the order level, by product. They could be shipping one product or 20 to the same customer. But every order must show what was the serial number they shipped. We also are hoping this will flow back to Quickbooks, as the orders get fulfilled. I'm reading about meta-fields and other options ... prefer not to buy a solution, but code the change ourselves.
how about using line item properties? You could have custom information saved for each product of an order or even an order itself. By doing that you could i.e. generate a random number on the product page and tranfer it all the way to the order and display that number in any place you need after the order has been placed by using line_item.properties.
To do this change, it requires multiple changes on the storefront, so it might be complicated. If you want to discuss the implementation, you could contact us at email@example.com, and we will be able to help you!