How to Keep Track of Deleted Records
All Bedrock integrations do not support the ability to trigger the deleting of records across systems. But when you are purging or cleaning up your various systems, it is often a good practice to keep track of what records you are removing in your other system(s).
This article will walk you through some steps to help you implement this tracking process. To illustrate the process, we are using an example of someone that is integrating HubSpot with Sugar CRM and we are going to be cleaning up records in Sugar and want to ensure that these records are never added back in from the HubSpot side.
Step 1: Create or identify a field that denotes the record is a purged record
If you have an existing field you are using to identify records you want to delete, then you are in good shape. For example, perhaps you always delete records that have requested to no longer be contacted by your company.
If you don't have such a field, go ahead and create a new one in both HubSpot and Sugar. We recommend calling it "Deleted from CRM" and just make it a boolean style field (single-checkbox).
Step 2: Map this field in Bedrock
Now that you have this field setup in both systems, you'll want to map it in Bedrock.
Step 3: Update your Workflow rules in Bedrock
You will want to add to your Workflow rules this new field as well and in our example here, we'll add it to the HubSpot Contact Workflow rule saying that this field must be FALSE since it's a boolean field. If you have another rule such as Lifecycle Stage, make sure the IF condition is set to ALL at the top.
Step 4: Start implementing your new process
If you have a list in your CRM that keeps track of bad records, see if you can implement some automation or triggers that sets this "Deleted from CRM" field to be TRUE. If such automation is not available, you'll want to check this box manually before you delete these contacts.
We recommend setting aside a day of the week (or month depending on how frequently you clean your data) where you delete the contacts from this list. The key is making sure that you've given the Bedrock integration enough time to sync back over to HubSpot the TRUE value for the "Deleted from CRM" field. This ensures that the related records in HubSpot are not flagged as having been records deleted from the CRM and should never be allowed to sync back over to Sugar.
Step 5: Run a Reset of your Bedrock Sync
It's good to note that up until you run this reset, Bedrock will never try and re-sync back in to Sugar these deleted records, despite the records in HubSpot having the Deleted from CRM field marked as TRUE. That's because these old deleted records are still hanging out in the Bedrock database and therefore will continue to act as a blocker.
But when you run a reset, you are clearing out these old records from Bedrock and that's why it is so important that you have this "Deleted from CRM" field used in your Workflow rules to prevent them from syncing back over after a reset is performed.