Populating Bizdoc id into routing XML

Is there any simple method to get the bizdoc’s internal TN id is mapped to XML before or after the document get routed to TN?.

The possible solution might be creating bizdoc envelope and using that envelope to fill the data and route to TN. This may requires many TN services to be used to generate the envelope.

Is there any alternative?.