Re: Field Custom Validation Exception - Lead Status

Dave-Silva
Level 2

Hi,

 

We frequently encounter sync errors from records that have moved to a status further in the status progression in SF, but remain in the previous status in Marketo, triggering a validation error for statuses that should not be allowed to move backwards.

 

For example, a lead was created in Salesforce as Pre-Qualified, updated to MQL in Marketo, then updated to Working (which is a status further in the progression than MQL). When the sync took place, it triggered the validation error: "FIELD_CUSTOM_VALIDATION_EXCEPTION: Lead Status should not be moved backward (other than Unqualified or Nurture). Sales Ops can make the change if necessary."

 

How can I prevent this from happening?

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator
Please show screenshots of the Channel setup in Marketo and the statuses in SFDC. There's no reason for such errors if the the progressions are symmetrical.
Dave-Silva
Level 2

Please see my response to Miray. The progressions are symmetrical, though we don't have them tied to a program status. So it seems to be an issue with timing between when a rep updates the status in SF and a sync is occurring from Marketo with a competing "previous" value in the progression.

Miray
Level 6 - Community Advisor + Adobe Champion

Hi @Dave-Silva 

Sync errors like these can definitely be frustrating. Based on your example, it sounds like the issue stems from a mismatch between the lead status progression in Salesforce and how it's being updated in Marketo.

A few clarifying questions to help pinpoint the root cause:

  • Are you currently using a Revenue Cycle Model or Lead Lifecycle Program in Marketo to manage status progression?
  • Is Lead Status the only field being updated, or are other lifecycle-related fields involved?
  • Does the "Working" status exist in your Salesforce Lead Status picklist, and is it mapped correctly in Marketo?

From the error message, it seems Salesforce has a validation rule that prevents leads from moving backward in status — except to "Unqualified" or "Nurture." If Marketo is trying to sync a status that violates this rule (e.g., reverting from "Working" to "MQL"), Salesforce will reject it.

Recommendations:

  1. Review your lifecycle mapping: If you're using Lead Status to drive lifecycle stages in both systems, ensure the progression logic is aligned and that Marketo isn't allowed to overwrite Salesforce statuses that are further along the funnel.
  2. Update  validation rules: You may need to adjust :
    • Salesforce validation rule to allow certain backward movements if they’re intentional and controlled.
  3. Collaborate with Sales Ops: It may be worth discussing the values of lead status 
Dave-Silva
Level 2
  • We use smart campaigns to set change the status, but don't have it tied to Program Statuses
  • We have other fields involved, but that is the only one involved with a validation rule
  • Yes, "Working" exists in both systems and is not a problem for most records. However, several records each week encounter this error, which I imagine is a race condition / conflict issue. Presumably that the status is updated to "Working" in SF by a rep, while a sync from Marketo is taking place, trying to set the value to "MQL".

I'm just not sure how to prevent that from happening, given that we definitely want the validation rule in place, and it works properly the majority of the time.

SanfordWhiteman
Level 10 - Community Moderator

  • We use smart campaigns to set change the status, but don't have it tied to Program Statuses\

The flow step Change Status in SFDC Campaign runs immediately (e.g. it connects to the SFDC API outside of the scheduled sync).

 

It’s extraordinarily unlikely that someone is updating the Campaign Status in SFDC close enough to the time that flow step executes for there to be a race condition in the fine-grained way we usually use that term in Marketo, e.g. when multiple tasks are operating in parallel with no guaranteed order. But in a broad sense, yes, there is a race condition if the Campaign Status is updated in SFDC and the periodic sync hasn’t run to flush that update to Marketo, so Marketo thinks it can still update the field.

 

The only way to eliminate that case is to send an Apex callout that updates Marketo immediately, similar to how the flow step works. I’d be wary of that path unless you have super sharp SFDC folks working on it.