Today's post was written by Matt Dearing, Development Principal at Sonoma Partners.
For those that may be unfamiliar, Marketo’s solution offers marketing automation, email, and many other services.
We recently ran into an error while working on a Marketo integration with one of our clients, where the solution wasn’t obvious at first. We saw the following error logged when certain updates were pushed to MSCRM contacts:
“A record was not created or updated because a duplicate of the current record already exists.”
It seemed odd that updates from Marketo were triggering MSCRM duplicate detection, as we only allowed Marketo to update a couple of fields that were not a part of any criteria for duplicate detection rules in the CRM organization.
In general, making create/update calls against the MSCRM API will not trigger duplicate detection unless explicitly specified through the use of the SuppressDuplicateDetection parameter.
What's interesting about SuppressDuplicateDetection is that if you explicitly specify it as false while updating a record, even when the fields that are being set in the update are not a part of the duplicate criteria, MSCRM will still throw a duplicate error if the existing record already matches another in the system.
For example, if you have 2 contacts (ContactA and ContactB) in MSCRM with the same email address, and a duplicate detection rule that matches on email address, updating any field on the contact (job title, for instance) will still trigger the duplicate detection exception.
The following code demonstrates this:
In this example, the duplicate detection error will be thrown because ContactB is already a duplicate of ContactA, due to them both having the same email address, even though email address is not altered in this update request.
We discovered that Marketo has a few internal flags, not exposed to end users, for suppressing MSCRM duplicate detection errors when creating/updating lead records or when updating contact records from Marketo to MSCRM.
My assumption is that Marketo explicitly sets SuppressDuplicateDetection to false when making MSCRM API calls. The internal Marketo flags are then used to dictate the value of SuppressDuplicateDetection passed to MSCRM. We worked with Marketo support to get this flag updated for our customer's Marketo instances and now all our changes in Marketo are flowing back to CRM as expected.
Contemplating your own Marketo Integration? Let’s work together!