I’ve recently been interested in using the merge-audit property returned in the json from batch get contacts method.
Is there some documentation on what contains this method I couldn’t find ?
Both of those cases look like the merge was caused by the analytics system. The contacts and analytics systems track traffic data for anonymous visitors. Those merges for those two records were cases where that anonymous visitor data was merged with a known contact record, due to some identifying event for the visitor (in these cases it looks like a JavaScript Events API call, but this could also happen by viewing a tracked link from an email).
That property will only be populated if the contact was previously merged with another contact, so you won’t see anything in most cases. There’s an example of what could be there below.
"merge-audits": [
{
"canonical-vid": 407546,
"vid-to-merge": 407596, //this is the old vid from the merged record
"timestamp": 1459183894522,
"entity-id": "",
"user-id": 123456,
"num-properties-moved": 32,
"merged_from_email": { //this is the info for the merged record
"value": "email2@domain.com",
"source-type": "CONTACTS_WEB",
"source-id": "user@hubspot.com",
"source-label": null,
"source-vids": [
407596
],
"timestamp": 1459183770094,
"selected": false
},
"merged_to_email": {
"value": "merge1@domain.com",
"source-type": "CONTACTS_WEB",
"source-id": "user@hubspot.com",
"source-label": null,
"timestamp": 1459183757761,
"selected": false
}
}
]
My goal here is to fetch both email adresses concerned by the merge. Those seem to be accesible with merged_from_email.value and merged_to_email.value, but in some cases :
Both are equal, which seem strange to me since email should be a unique identifier. Those all seem to have their entity-id = MIGRATION, but I don’t really see how that’s relevant.
there is no merged_from_email property, only merged_to_email.
Do you have an example record that you could link to that I could take a look at? Both of those sound like internal processes but if you can send me an example I can verify that.