Detect merges - possibly via Webhook event?

lock
push_pin
done
Besvarat
4

Hi Everyone,

I am trying to figure out whether I can get information out of SuperOffice API when for instance users merge a Person into another Person.

Ideally, I would listen for merge events in the webhook, but that doesn't seem to be an option.

Does anyone have any knowledge of this or alternative ideas as to how I might achieve this information?

 

Best Regards,

Henrik

13. aug. 2025 | 12:31 em

Allt Svar (4)

Hi Henrik,

There is no event for it, but you can query the mergemovelog table using the dynamic query provider based on a person.update or person.deleted webhook.

13. aug. 2025 | 12:34 em
Hi David,
Thank you for a quick reply!

Am I correct in understanding that the only way to access this table is via the Mirror database - no API call available for this?
In case of the former, I think I am out of luck as we apparently don't replicate this specific table in our Mirror db.

Best Regards,
Henrik
13. aug. 2025 | 12:44 em

Hi Henrik,

No, you can query any table (with the exception of a few internal tables that have been blocked) using the dynamic archive provider, example:

GET ./api/v1/Archive/dynamic?$select=MergeMoveLog.sourceRecord,MergeMoveLog.destinationRecord&$filter=MergeMoveLog.tableNumber eq 6
13. aug. 2025 | 12:49 em
Hi David,
This definitely looks very interesting!
I am having a bit of trouble making sense of what I am seeing in the output though.

The id below is one that I created this morning. It has not been merged or anything:

"value": [
{
"PrimaryKey": "28054",
"EntityName": "MergeMoveLog",
"MergeMoveLog.sourceRecord": 43351,
"MergeMoveLog.destinationRecord": 0,
"MergeMoveLog.registered": "2025-08-13T10:02:49"
},
etc etc.

In other sample cases I have looked up both sourceRecord and destinationRecord in our corresponding SuperOffice environment, and have been able to find both records still, when I was expecting the source record to be deleted?

Best Regards,

Henrik
18. aug. 2025 | 07:31 fm

Hi David,
This definitely looks very interesting!
I am having a bit of trouble making sense of what I am seeing in the output though.

The id below is one that I created this morning. It has not been merged or anything:

 

In other sample cases I have looked up both sourceRecord and destinationRecord in our corresponding SuperOffice environment, and have been able to find both records still, when I was expecting the source record to be deleted?

Best Regards,

Henrik

13. aug. 2025 | 02:14 em

Hi Henrik,

 

Try adding the table number, operation and options fields to the output, maybe that gives some hints to what behavior you are seeing.

18. aug. 2025 | 09:04 em

Lägg till svar