Create a “Ready for Salesforce Sync” DateTime field to weird-proof Program ⇄ Campaign sync (and sync in general)

One of my favorite Marketo features — partly due to its controversial status among us veterans! — is auto-sync between a Marketo Program and SFDC Campaign. This feature is a prereq for syncing PMCFs with Campaign member fields. And because it’s tied in with the periodic bulk sync, it’s more resource-efficient than using Sync Person to SFDC.

Program ⇄ Campaign sync has its detractors. For one thing, they note the feature creates a race condition: you can’t stop a net new Program member from being picked up in the next sync cycle even if Marketo-side enrichment hasn’t completed.[1] That’s not just a theoretical point but is currently affecting a client.

The client has both API-powered enrichment[2] and a particularly busy campaign queue. Together these mean leads might be incomplete at the time they’re picked up by the sync. (They also had a bunch of unnecessary Wait steps, but eliminating them didn’t completely solve the problem.)

To be clear, the leads aren’t incomplete enough for the sync to fail completely; they’re incomplete in that high-value fields like Product Fit and Number of Seats are empty. Such fields weren’t required in SFDC, but their absence means the lead is instantly set to Status=Disqualified by an SFDC flow.[3]

This was ultimately my bad. Despite being in their instance for years, I forgot to recommend the Marketo Sync-Ready As Of field and its accompanying Validation Rule.

Enabling Marketo Sync-Ready As Of

It’s a custom DateTime field that syncs between systems, so create it in SFDC first, on both Contact and Lead:

The Validation Rule is simply “Don’t let Marketo create a new record if this field is still empty”:

AND(
  ISNEW(),
  ISBLANK(MarketoSyncReadyAsOf__c), 
  $Profile.Id = '00eal00000N1YIX' /* Marketo API */
)

Screenshot of the rule in context:

How to use it

Use Change Data Value to set Marketo Sync-Ready As Of to {{system.datetime}} when someone’s really ready.

Note the rule applies to any SFDC insert, not just those driven by Program ⇄ Campaign sync. So make sure it’s set before running Sync Person to SFDC or flow steps that imply a sync (e.g. Create Task, Add to SFDC Campaign) as well.

Notes

[1] They also mention you can’t stop a member from being synced to CRM in general. IMO this is a red herring: Program ⇄ Campaign sync should only be used when all members will implicitly MQL, or already have. If all people in a program shouldn’t at least be SFDC Leads, you shouldn’t sync that program!

[2] Their enrichment provider uses an outbound webhook that eventually schedules a separate inbound API call. In other words, not your typical webhook where the data comes back instantly via Response Mappings. The resulting delay is quite outrageous.

[3] You might already have an SFDC rule that requires First Name, Last Name, Company, etc. But the more abstract Marketo Sync-Ready As Of gives you full control on the Marketo side instead of tapping the SFDC admin for changes.