How to make Subitems IDs static or assigned

I created an integration that maps subitems by their ids but when I test I get some errors because when a subitem is created the ID is not always constant. Is there a way around this?