Queries, templates, and the data interface between the two can vary widely between dealers, with no way to predict in advance. The best way to handle this is custom-modified subs, as far as I can tell. Essentially, the same .pm only in many different flavors. Maybe this isn't the best approach, but it seems to be working - I was only really concerned with efficiency, now that it'll have to be done for large numbers of transactions rather than just a few data imports.