CRM Sync Race Condition overriding values to NULL | Community
Skip to main content
Sean_Richards
Level 4
October 20, 2021
Question

CRM Sync Race Condition overriding values to NULL

  • October 20, 2021
  • 1 reply
  • 3370 views

Hi Everyone,

 

We are experiencing a sync issue between Salesforce and Marketo and could really use a hand a) getting confirmation that others experience this and b) getting some direction on how to implement a way around it.

 

Fundamentally we believe this is a race condition between the Marketo and Salesforce 5 minute core sync.

 

What we observe

------

A Lead record is initially created in Salesforce as a Lead. The Sync then picks up this lead and brings it into Marketo, triggering “Person Is Created” and our lifecycle logic picks up and starts to execute various campaigns.

 

While this is occurring in Marketo, back in Salesforce, the end user then converts the lead into a Contact record. 

Now’s the interesting part. 

 

Depending on when in the random 5 minute interval this whole scenario plays out this can cause a race condition. If the Lead was created toward the end of the sync’s interval, then the converted Contact get’s sync’d into Marketo. 

 

The issue that occurs is that if when this "Convert Person" activity is synced in from Salesforce BEFORE Marketo has sync’d it’s updated field values, then the “new” contact’s values from Salesforce are treated as new values and override the values that our lifecycle logic has updated to the Marketo record, between the time the lead was created in Marketo and now.

 

Looking at the activity log, you can see that Marketo sets a number of fields back to [null] after the "Convert Person" activity is synced in from the CRM. 

 

Here are a few other thoughts:

  1. This is undoubtedly not a unique issue to us.
  2. If this is simply core to how the sync works then there must be a fairly standard best practice architectural design principle that handles this?

Can anyone verify this and pretty please help me understand how you implement around this?

 

If you need any further information please let me know.

 

Much appreciated in advance.

 

Sean

 

1 reply

SanfordWhiteman
Level 10
October 20, 2021
I’ll try to write more later but can confirm that you’re absolutely right — the ostensibly “rare” condition of both sides being updated within the 5-minute sync window is not at all rare in cases of lead conversion.
Sean_Richards
Level 4
October 20, 2021

Thanks man.

 

I will await your further guidance on what options exist to build around it.

 

Cheers,
Sean

Sean Richards