MDL-50130 todo: Conditional code to be changed to API by MDL-50728