Merging profiles with the API

Note: This article describes the endpoints that force merging profiles. For other situations where profiles are merged, see the User Guide.

Sometimes, multiple profiles refer to the same customer. In that case, they need to be merged.
In such cases, a number of source profiles are merged into a target profile. The source profiles are deleted after merging.

After the merge is complete, a client.merge event is saved to the target profile.

With the endpoints described below, you can force a merge. This can be used to:

  • merge recognized profiles.
    In this case, the identifiers (such as email or customId) of the source profiles are lost, as described in “Properties, tags, and attributes”.
  • merge a recognized profile into an anonymous one.
    In this case, the target profile remains anonymous.
WARNING:
  • This operation is irreversible. Use it carefully.
  • The source profiles are deleted.
  • Don’t merge more than 20 accounts at once.

Identities and event history

UUIDs (including historical UUIDs) of the source profiles are added to the historical UUIDs of the target profile.
Thanks to this, events of source profiles become associated with the target profile.

Moving identities and events when merging
Moving identities and events when merging

The identities (UUIDs) can be found on the profile’s card:

Location of the Identities list on a profile's card
Location of the Identities list on a profile's card.

Properties, tags, and attributes

Properties are the data stored outside of the attributes object of a profile’s data: clientId, email, phone, customId, uuid, firstName, lastName, displayName, company, address, city, province, zipCode, countryCode, birthDate, sex, avatarUrl, anonymous, agreements (object), tags (list)

Attributes are the data stored in the attributes object.
When non-unique emails are enabled, the profile’s email and marketing agreement are attributes!
To see the properties and attributes of a profile, fetch its data with /v4/clients.

When profiles are merged:

  • All properties (including tags) of the source profiles are ignored and lost.
  • If an attribute already exists in the target profile, it’s not modified. In this case, attribute values from the source profiles are lost.
  • If an attribute from a source profile doesn’t exist in the target profile, it’s copied into the target profile.
Moving data when merging
Moving data when merging

Merging with customId

WARNING:
  • This operation is irreversible. Use it carefully.
  • The source profiles are deleted.
  • Don’t merge more than 20 accounts at once.

The following request merges profiles lue42 and mjz84 into a third profile: tla114.

curl --location --request POST \
'https://{SYNERISE_API_BASE_PATH}/v4/clients/merge/from/custom-ids/lue42,mjz84/to/custom-id/tla114' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Api-Version: 4.4' \
--header 'Authorization: Bearer eyJh...ey4'

For more details, see the API reference.

Merging with clientId

WARNING:
  • This operation is irreversible. Use it carefully.
  • The source profiles are deleted.
  • Don’t merge more than 20 accounts at once.

The following request merges profiles 123 and 456 into a third profile: 789.

curl --location --request POST \
'https://{SYNERISE_API_BASE_PATH}/v4/clients/merge/from/ids/123,456/to/id/789' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Api-Version: 4.4' \
--header 'Authorization: Bearer eyJh...ey4'

For more details, see the API reference.

😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker