Hey all - weird question. This is the first time I've had this problem.
I ran a batch campaign yesterday (Feb 13):
I got a slack message this morning (Feb 14) asking about where a contact had gone. She had a name and email address. I know I ran that batch campaign, so I checked the Salesforce Recycle Bin. Sure enough, he was in the Recycle Bin - deleted by the Marketo sync user.
This opens up a few questions...
Solved! Go to Solution.
Here's a scenario where this can occur.
Person is deleted from SFDC. Marketo logs the "Lead was Deleted from SFDC" activity.
The lead is re-inserted into SFDC by Marketo via Sync Lead to SFDC flow step, program synced with a SFDC campaign, etc
That results in a record both having a deleted from SFDC activity in the activity log and currently existing in Salesforce.
Screenshots?
Was the record in the recycle bin already and then restored later?
Why are you looking at records removed from SFDC and also trying to Delete from SFDC at the same time? Is this a cleanup?
Did you check the list before you let it run?
What does the log say exactly for each record?
Hey Josh - answers below!
1) Not as far as I know. I didn't check the Recycle Bin before running the batch campaign.
2) Yes - the goal was to remove any deleted persons from Marketo. I left the "remove from CRM = true" comamnd because... well, I didn't see a reason not to. Logically, if a person had been deleted in SFDC, I didn't see why would that make a difference. But, in the offshoot that it did, I could use the chance to learn more about the system (aka - this topic).
3) I did check the list before I ran it - a question of you, what specifically did you want to inquire about on that list?
4) The records were deleted from system - it says nothing. After returning them from the Recycle Bin, it seems as if they are brand new records (new ID, new Marketo Created Date). They do have the correct SFDC ID.
Here's a scenario where this can occur.
Person is deleted from SFDC. Marketo logs the "Lead was Deleted from SFDC" activity.
The lead is re-inserted into SFDC by Marketo via Sync Lead to SFDC flow step, program synced with a SFDC campaign, etc
That results in a record both having a deleted from SFDC activity in the activity log and currently existing in Salesforce.
Hi Steven,
That's one possibility, as the activity log will keep a trace of the deletion.
Another possibility is that the lead is deleted in SFDC and then restored from the recycle bin. Personally, I would not take the risk to run this type of campaign 120 days later
The way we set this up, based on the fact that SFDC keeps records 15 days in the recycle bin:
Trigger :
Flow
Note that if the "remove from SFDC" is left empty, "Do Nothing" applies.
This design leaves 7 days in case someone would restore the record from the recycle bin, then deletes the record IF and only IF the record is still in a "delete" state in SFDC. This is all based on the fact that all SFDC record have an "is deleted" checkbox field that os set to True while the record is in the recyle bin. The "SFDC is deleted" filter checks that field.
-Greg
Solid decision - much more intelligent design than my recurring batch campaigns. Thanks Grégoire!
I left a comment below with some screenshots and an "ENTITY_IS_DELETED" error. Have you seen anything about that?
Hi Greg,
Late to the party, but had a follow up question regarding your smart campaign.
In the instance I inherited there was a second trigger (Data Value Changes) is that trigger necessary for the campaign to run properly?
thanks Mark
Hey Steven,
I ran your test scenario through - I expected this might be the case as well! I also wanted to test conditions with the recycle bin...
There's still a weird message I was seeing yesterday though... Below are screenshots I took showing a lead who was not deleted, but was getting a strange error message.
This person had "SFDC IS Deleted = FALSE", but "Lead was Deleted from SFDC". I highlighted that below.
In the Activity Log, that person gets these activity records (ENTITY_IS_DELETED) whenever I attempt a sync to SFDC. Note: I didn't notice at the time.
A while later, subsequent sync attempts still occur - but Marketo continually lets us know the person is deleted from CRM because - I imagine - that SFDC ID no longer existed.
Are you acquainted with this issue?
Hi Aaron,
When the lead is deleted in SFDC, Marketo does not remove it's SFDC ID and will attempt to sync it when it's updated (implicit sync) in Marketo.
-Greg
I haven't seen that error message before but I poked around in the SFDC docs. I think it's occurring because that SFDC record is still in the Recycle Bin. Marketo is trying to interact with it but it can't because it's in a soft deleted state in Salesforce, so a message comes back that the entity is deleted.