An event that triggers when one or more source contacts are merged into a target contact.
The onContactMerged()
event handler runs when a
contact
is merged.
The received ContactMergedEvent
object
contains event metadata.
Merging contacts triggers these events:
onContactMerged()
is triggered.onContactUpdated()
is triggered for the target contact. metadata.originatedFrom
is sent as "merge"
.onContactDeleted()
is triggered for each source contact. metadata.originatedFrom
is sent as "merge"
.If you handle the originating merge event,
you can ignore update and delete events where metadata.originatedFrom
is set to "merge"
.
When onContactUpdated()
and onContactDeleted()
are not triggered from a merge,
originatedFrom
is omitted from their event object.
Note: Backend events don't work when previewing your site.
Information about the source and target contacts, and metadata for the event.