Marketo uses exact string comparison (case-sensitive and accent-sensitive) to determine if fields have changed. Overall, this is great: otherwise, we couldn’t use enrichment/normalization APIs!
 

One side effect is not-quite-real changes to fields like Email Address (which teeeeechnically is case-sensitive but must be treated as case-insensitive) are treated the same as major modifications:

SanfordWhiteman_0-1742520221226.png

 

Likewise for case changes to First Name or Last Name, or accent adjustments like “Rege-Jean” to “Regé-Jean.” To be clear, it’s not that these changes aren’t significant[1] and obviously they must be saved to the database. And logging individual changes is harmless anyway, resource-wise. 

 

It’s unnecessary bulk changes of this sort that are a problem because they increase sync latency. One of our clients had an enrichment service upper-casing thousands of values every day, only for SFDC to switch back to the original values due to permissions. What a waste!

 

Surveying your “real” vs. “less real” changes using the Marketo REST API

The Get Lead Activities and Get Lead Changes endpoints can both provide the newValue and oldValue for any change. Extracting changes and using a Unicode base character collator will tell you how many “less real” changes are happening in your instance.

 

Decided to flex my cross-language skills, such as they are, and show how to create & use that collator in JavaScript, Java, PHP, and Python. Each example sets Boolean isEquiv to true if the values only differ by case or accent.

 

You can see the code is very similar. Interestingly, JS (my favorite language) uses sensitivity, while the others call it strength; base sensitivity and primary strength mean the same thing.

 

JavaScript

let baseLetterComparator = Intl.Collator(undefined, { sensitivity: "base" });
let isEquiv = baseLetterComparator.compare(newValue, oldValue) == 0;

 

Java

import java.text.*;

public class Main {
  public static void main(String[] args) {
    Collator baseLetterComparator = Collator.getInstance();
    baseLetterComparator.setStrength(Collator.PRIMARY);
    boolean $isEquiv = baseLetterComparator.compare(newValue, oldValue) == 0;
  }
}

 

PHP

$baseLetterComparator = new Collator("");
$baseLetterComparator->setStrength(Collator::PRIMARY);
$isEquiv = $baseLetterComparator->compare(newValue, oldValue) == 0;

 

Python

(My least favorite language, but I know some of you like it. Note Python is the only one that requires a 3rd-party library, PyICU, to do such a simple thing. Not exactly beating the allegations.😜)

from PyICU import Collator

baseLetterComparator = Collator.createInstance()
baseLetterComparator.setStrength(Collator.PRIMARY)
isEquiv = baseLetterComparator.compare(newValue, oldValue) == 0

 

Notes

[1] I’m strongly against apps that claim to “fix” proper nouns, since “de la Vega” and “De La Vega” are not the same name.