Such an algorithm is not defined by the legislation of Ukraine.
The Territorial Center for Staffing and Social Support is a military administration body of Ukraine that keeps military records and mobilizes the population. Starting from 2022, the TCC and SP have completely replaced the former system of military commissariats.
TCCs operate on the basis of the Law of Ukraine and the Regulation of the CMU, that is, on completely legal grounds.