It's easy to print the message automtically, just create a matching filter and add the printing action. The printing action asks for a template and it's just a matter of what you'd like to print, those thing you add to the template.
It doesn't matter how you include the reference number, you can place it in the subject header (or whatever header you specifically create for the purpose) or somewhere in the text. When you place it in the text, it always has to be in the same, otherwise it'll be a bit difficult to extract it with a regular expression.
__________________________________
I'm just a user of The Bat! I don't work for Ritlabs.