How to Handle Large Data Syncs Between Salesforce and Marketo

Hi! Every night we run a batch campaigns that update our lead scoring model. One of these campaigns captures a particularly large group of leads every night ( ~3k-5k). When this happens Marketo triggers a sync with Salesforce for all those leads. Because Marketo tries to update so many leads in so short a time we hit APEX SOQL limits on a few of our custom triggers (even though they are set up to handle batch requests).

Wondering how others have dealt with this? One idea I had was somehow running the batch campaign that updates lead scoring over the course of a few hours taking a smaller group of eligible leads during each run, but not sure how I would do that. Another idea was to have those leads fail out and then somehow triggering another process that resyncs them, but this isn't ideal.

I assume your Lead Score field is synced to SFDC. But your real issue is the Apex trigger, so you should discuss this with your SFDC Admin to optimize the code or adjust the code to better handle the situation. For example, do those triggers "need" to be activated on lead score?

You won't be able to do a controlled batch unless you use Talend.

The apex fail doesn't necessarily mean the lead data didn't sync, so a re-sync isn't likely necessary. Marketo will auto re-attempt a fix later on anyway.