Once a link has been established between two document systems, it must be recorded, and included on every subsequent exchange.
This generally takes the form of document numbers being assigned in both your and the customers systems. If your customer gives you a document number, you MUST store it with your document. Likewise – if your sub-supplier provides a document number, you must also record that for electronic document exchange.