Following the answer on this question, I had been using
SELECT Id, isDeleted, masterRecordId FROM Contact WHERE masterRecordId != '' and adding
AND SystemModStamp > [the last time we checked] with the SOAP API for several years with good results.
Recently I've noticed that this query never returns any results, both in the application that sends the query to the SOAP API and within the Salesforce developer console itself. I've run it with and without the
SystemModStamp. I've run it immediately after running a merge, thinking maybe it had just already been deleted by the system. The record is still in the recycle bin, in any case.
I'm wondering if this query no longer works, but the documentation about the field doesn't seem to have changed. I'm not aware of anything that has changed in our Salesforce installation that would've prevented us from being able to detect this, but I'm not really sure what would be able to do that either. Does anyone have any insight into this?
Ideally I'd like to detect merges with the REST API, but as far as I can tell it still does not have a way to detect merges, hence my use of the SOAP API.