We have to be missing something simple, but when we delete a contact in Sales Cloud, shouldn't that contact be automatically removed from Marketing Cloud? We tried a bunch of options including many iterations of changing our query in automation studio to try to filter out deleted contacts. We thought maybe using the isDeleted flag in our where statement, but that wasn't it. What are we missing? Contacts deleted in Sales Cloud need to be deleted and removed from journeys automatically in Marketing Cloud.
Deleting a contact in SFDC will not automatically trigger a delete of the Contact in SFMC. Although there has been great progress in integrating these tools, such core concepts are still split. Deleting a contact in SFDC should remove the contact from the Synchronized Data Extension, which means that you can cannot rely on the isDeleted flag to be set as the entire record would likely be gone.
Generally, I would say you have three basic options
- Run a query to calculate which contacts are in your All Subscribers (and MobileConnect Demographics and MobilePush Demographics if you use those) compare with who is in your Contact synchronized data extension. Then once every week/month you run a manual delete request -> https://help.salesforce.com/articleView?id=mc_cab_delete_contact.htm&type=5
- Create a SSJS activity which triggers a delete using Contact Key or List (as calculated in 1) once per hour/day/etc to the API -> https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/restrict-contact-key.htm
- Trigger the above mentioned API as part of an onDelete trigger in SFDC (I would usually go with this one)