Lead deleted - Salesforce integration

Anonymous
Not applicable

Lead deleted - Salesforce integration

Hi! A lead is deleted and created again when the following steps happen:
1. I create a lead 
2. The lead sync with SF
3. I delete the lead in Marketo, and not in SF
4. I resuscribe the lead in Marketo
5. The lead sync with SF
6. The lead in marketo has this error: 
Sync Lead to SF error:
mktDbException [PropelException]; msg = Unable to execute UPDATE statement. [wrapped: Could not execute update [Native Error: Duplicate entry '003K000000x7iTMIAY' for key 'mkt_person_u1'] [User Info: UPDATE mkt_person SET mkt_person.SFDC_TYPE = 'Contact',mkt_person.SFDC_CONTACT_ID = '003K000000x7iTMIAY',mkt_person.UPDATED_AT = '2015-02-03 16:34:31' WHERE mkt_person.ID=1000301]] [[SQLException] nativeError = Duplicate entry '003K000000x7iTMIAY' for key 'mkt_person_u1']

7. The lead is deleted from marketo
8. A lead is created in Marketo because is a contact in SF that he can see.

Anyone knows why this happens? I am loosing all the history of the lead in Marketo. Is there a way of 
Thanks! 
Elena

 
Tags (1)
3 REPLIES 3
Edward_Masson
Level 10

Re: Lead deleted - Salesforce integration

Looks like your going round in circles.

Marketo will accept a duplicate record from your CRM. Now Marketo cant create duplicates based on email address from list uploads or form fills etc. But if you have a flow thats pushing contacts to a SFDC queue, marketo can create a duplicate in SFDC. SFDC can't have contacts in lead queues. Only leads exist there, so marketo will create a lead for you to push into a lead queue.

Looks like it was trying to update a Contact record. How many records do you have for that one email address and what type? lead/contact?
 
Josh_Hill13
Level 10 - Champion Alumni

Re: Lead deleted - Salesforce integration

If you do not delete the record in both systems, SFDC can reinsert it into Marketo under various circumstances. The other problem is if the lead comes back into Marketo with the same email, it will try to sync to SFDC. When that happens, as Ed said, it may push a duplicate.

Not sure why you are deleting records in this situation, but if you do, I recommend deleting in both systems, and to export the list before you do so.
Anonymous
Not applicable

Re: Lead deleted - Salesforce integration

Thanks for you help! 
Some clarification. 
- We only use contacts in SF. Leads are automatically created. 
- We need to delete leads from Marketo and not from SF because we want only subscribe contacts to be in Marketo (the unsubscribe are costing us money if they are in Marketo).
 
What I really need to understand is why would marketo delete a lead from my list if there is an error. 
 
Thank for your time