There are renaming tools for that. What you need is a list of file names, for example as text file (*.txt) which can be applied by such a renaming tool to rename the JPG.
Inside Indesign you could use a script to assemble the file names from the page or better, you directly write a script that save the pages as JPG and names them as you want.
Without a script, you can't do anything automtically here.
I think a script would suit you best.
You could InDesign apply the Product code via the Text Variables.
And I think a clever scripter could use that variable to name your jpgs.
There is the Batch Convert script http://www.kahrel.plus.com/indesign/batch_convert.html
It's free - and it will convert your InDesign documents to JPEG.
But there is the additional "Run Script" and I think it might be possible to do it somehow.
ok, maybe with Text Variables I can do something...