Losing Custom Objects in Record Merge

Angus_McCann1
Level 3

Losing Custom Objects in Record Merge

Hey all,

 

We use Custom Objects to log a) both the information existing on a person's online account as well as b) recording purchase history in our Marketo DB. However, due to some integrations we on occasion get duplicate email addresses in our system and have to merge the two records - sometimes via the UI, sometimes our Dev team does it programmatically through an API.

 

One thing that we noticed is that when we Merge Record A (existing record w/ Custom Objects) into Record B (new record w/o Custom Objects), the new "Merged Record B" does not have the Custom Objects in the UI. Additionally, when the Dev team looks into our Marketo DB to find the Custom Objects, they can see the Custom Objects.


Things of note:

  • We are integrated into our Salesforce instance, so the "Salesforce Record" that has to be the winning record in a merge is not necessary the "original" record with Custom Objects
  • Our Custom Objects link field & dedupe field is the "Customer ID" (which is tied to the email address & exists as an attribute on the record AND custom object) for the Profile Custom Object, but for purchase custom objects, we also have "Purchase ID" as a de-dupe field (which is an attribute on the Custom Object and only the Custom Object)

 

So when I'm looking at a Merged record, on the record I do not see the Custom Object. Also, nothing gets returned when searching for that record in a Smart List "Email Address is  ____ & Has Custom Object = True". However, the API can still find all the Custom Object exist in Marketo for a specific Customer ID. Anyone have any experience with this / handling Custom Objects when doing a merge operation and making sure they aren't lost?

9 REPLIES 9
SanfordWhiteman
Level 10 - Community Moderator

Re: Losing Custom Objects in Record Merge

Easy(ish) to do when merging using the API: can get the linked Custom Objects and reassign them.

 

Using the UI, I'm not aware of a way to do this.

Angus_McCann1
Level 3

Re: Losing Custom Objects in Record Merge

But when the Custom Object is linked to / deduped against the Customer ID, shouldn't we in theory not need to relink it?

SanfordWhiteman
Level 10 - Community Moderator

Re: Losing Custom Objects in Record Merge

That field isn't a guaranteed unique identifier. You can think of it as being like Email Address in that way. A CO with a Link field to <sandy@example.com> doesn't automatically migrate over to another <sandy@example.com> if the first lead is removed.

Angus_McCann1
Level 3

Re: Losing Custom Objects in Record Merge

So basically I have to have Dev use the API to to remap the custom objects to the correct contact?

SanfordWhiteman
Level 10 - Community Moderator

Re: Losing Custom Objects in Record Merge

Correct.

jscottbruns
Level 1

Re: Losing Custom Objects in Record Merge

Follow up question regarding the custom object needing to be "remapped" after lead merging, but first a little more context...

 

In our internal system we assign each user a unique enterprise UUID which gets map into a corresponding field defined on the custom object, which we'll call userUUID. Likewise, a custom userUUID field also has been added to the Lead object and this field is used as the linkage between COs and Leads, and is configured to block updates once set. 

 

Given the fact that we're using this UUID as the linkage between a lead and its custom objects we can conclude (and have verified) that its value does not change during a lead merge operation. In addition, as stated earlier in the thread we can query the CO API using the filterType=userUUID&filterValues=<UserUUID> which returns the expected COs associated with that user, which would suggest that the linkage is still intact. 

 

The big question here is why the UI does not display the related COs for the Lead while the API does.

 

Get Lead by Filter API Request:

GET /rest/v1/leads.json?filterType=userUUID&filterValues=578b5099-5766-45d2-a5ac-6c6c62b7279b

{
    "requestId": "10814#1752d68151f",
    "result": [
        {
            "id": 44026899,
            "firstName": "gcchereg0923a",
            "lastName": "changcchereg0923",
            "email": "qateam-29bdca+gcchereg0923x@inbox.mailtrap.io",
            "updatedAt": "2020-09-25T01:30:16Z",
            "createdAt": "2020-09-24T02:09:02Z",
            "userUUID": "578b5099-5766-45d2-a5ac-6c6c62b7279b"
        }
    ],
    "success": true
}

 

Custom Object API Request:

GET /rest/v1/customobjects/cMyCustomObject.json?filterType=userUUID&filterValues=578b5099-5766-45d2-a5ac-6c6c62b7279b

{
    "requestId": "5e33#1752d5eba1f",
    "result": [
        {
            "seq": 0,
            "marketoGUID": "c32f64a5-cf96-466e-a967-5047738c0ee4",
            "areaOfFocus": "Teaching",
            "createdAt": "2020-09-24T01:59:25Z",
            "updatedAt": "2020-09-24T02:03:01Z",
            "accountCreatedAt": "2020-09-24T01:56:09Z",
            "userUUID": "578b5099-5766-45d2-a5ac-6c6c62b7279b"
        }
    ],
    "success": true
}
 
We've confirmed that the UI shows the correct user UUID:
Screen Shot 2020-10-15 at 1.59.04 PM.png

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Losing Custom Objects in Record Merge


Given the fact that we're using this UUID as the linkage between a lead and its custom objects we can conclude (and have verified) that its value does not change during a lead merge operation. In addition, as stated earlier in the thread we can query the CO API using the filterType=userUUID&filterValues=<UserUUID> which returns the expected COs associated with that user, which would suggest that the linkage is still intact. 

The string field is still intact, but not the link between the objects.

 

Consider it like OO value equality vs. reference equality.

jallen
Level 1

Re: Losing Custom Objects in Record Merge

Hey Sanford,

 

What exactly is the link between the objects? If the userUUID (link field) is intact, like Jeff mentioned above, then why is the link not intact? What is the link? I imagine we need to update the CO with some new field from the merged contacts, but not sure from reading in this thread exactly what it is.

SanfordWhiteman
Level 10 - Community Moderator

Re: Losing Custom Objects in Record Merge

Use idField (i.e. marketoGUID) as the locator.

 

Set the same custom UUID value as it already has. Marketo will update the link.

 

{
   "action":"updateOnly",
   "dedupeBy":"idField",
   "input":[  
      {  
         "marketoGUID": "994832f3-4fcd-48be-bc82-999769a7aa6",
         "your_custom_UUID_field" : "the_same_value_custom_UUID_already_has"
      }
   ]
}