There are various solutions, I can give you an idea that I implemented earlier. You can create custom entities where to store the instance ID, for example. The contacts you want to create or update in the external system. Register insert / update plugins that will create a new instance of your custom object every time you update a contact. Then in the next process the identifier will be updated, create contacts in the external system and delete / mark as instances of user entities processed by you.
paramosh
source share