Hello,
You need to create a new plugin otherwise your modification will be lost during the next HikaSerial update.
It is possible to copy a big part of the code in the HikaSerial random serial generator and once you have generated your serial, you can do whatever you want with it : add custom SQL queries, call web-services, etc. Since it's PHP code, you're free to do what you need.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.