Salesforce + HubSpot Company Record Deletion

Hey gang,

Wanted to get some opinions on this. I’ve been working with a client for several months now, helping to untangle a messy Marketing Hub workspace that includes a mostly working Salesforce integration. We identified some issues with Contact records syncing/not deleting, and solved those. In the process we learned that the sales team, based in Salesforce, has been using Seamless.ai to enrich existing Company records in Salesforce.

Which is where the problem starts. When enriched, the client’s SDRs manually merge the existing Company record and the new contacts, which leaves a duplicate Company record without a Salesforce ID. That duplicate then syncs to HubSpot, and we have to manually delete it.

On top of that, it seems that there’s no way to set Company/Account records to auto-delete based on deletion across the integration. Contacts can be set to delete, but Companies can’t.

I’m trying to figure out a way to create a workflow and custom property that functions as a synced date/time picker, checking the identical values between HubSpot and Salesforce, with the idea that if an Account is deleted in Salesforce the property will stop updating, and will no longer be in sync with the HubSpot version. At which point, either fully automated or on a manual, scheduled basis, we set up a process to delete those now-defunct Company records.

Does this make sense, systems-wise? Is there an easier way to do this?

Hi @Surgical_JMM, I hope that you are well!
Thanks for asking the HubSpot Community!
To start with, I believe this article “Create ‘Specific date’ or ‘Contact date property’ contact-based workflows” might be of interest to you.
Also, you might want to take a look at this similar thread “How to compare two dates to update another field?” which may give you a start in the process.
I’d love to put you in touch with our Top Experts: Hi @HFisher7, @HubSpot_Corey and @Teun do you have any tips to help @Surgical_JMM, please?
Have a great day and thanks so much in advance for your valuable contributions!
Bérangère

@Surgical_JMM - Hey!
When an Account is deleted or merged with another in Salesforce there is a property in HubSpot, created by default when the integration is installed, called ‘Salesforce Deleted’ which is set as ‘True’.
You’ll be able to use the property to create an active company list of company records which have been merged / deleted in Salesforce. This list could then be manually reviewed and the records deleted in HubSpot.
Something to be mindful of when deleting companies in HubSpot will be losing any activities logged on the company record, that is not logged on the associated contact records. Additionally, legacy activities do not auto-associated to the new company record when a contact’s primary company association is updated.
With this in mind, I’d suggest it is best practise to merge the company records. This functionality is disabled when the Salesforce integration but I’d highly recommend the Insycle app.

Oh this is perfect, thank you!