Migration of data between own DB and suiteCRM DB

I would like to migrate some targets data from an old DB to suiteCRM DB. Every thing is ok only the target id is not auto generated. Is there any function or class responsible for generating that id. Same, is there any function that duplicates that id in the tracker and Prospect_List_Prospects tables or should I do it manually?

Thanks in advance