@Manoel, I love that proactivity, getting in front of those errors due to SFDC maintenance.
Generally speaking, your steps will be:
- Perform a fetch of all your GS Company records, including SFDC Account ID
- Perform a fetch of all your SFDC Account records,
- Perform a Left Merge (Companies plus Accounts), matching on the SFDC Account ID
- Filter that merged dataset, identifying any rows where the SFDC Account ID from the SFDC dataset is null. (In other words, you have an SFDC Account ID on the Gainsight side, but it didn’t find a partner on the Salesforce side, signaling a merge / delete in Salesforce.)
You could run this as a Digital Journey Program. You might also consider instead notifying your admin team or creating and writing to a new custom field on the Company object via rule, then adding any Companies where that custom field is populated to a Report / Dashboard that your admin team is monitoring. Any time something hits that Report/Dashboard, the team will know some remediation is needed, and your goal will likely be to “drive that Report to zero”.