Resolve duplicate people

If you inadvertently create duplicate instances of a person, you can merge them and consolidate information to accurately represent a single “person” in your workspace.

How merging people works

When you merge two people, you pick a primary person and merge a secondary person into it. The primary person remains after the merge and the secondary is deleted. This process is permanent: you cannot recover the secondary person.

The primary person inherits the following information from the secondary person:

  • Attributes that are not set, or are empty, on the primary.
  • Event history: the most recent 29 days of events are merged immediately. It can take up to an hour to merge older events. Events merged from the secondary person cannot trigger campaigns.
  • Campaign journeys that the primary person has not entered.

    A journey is the instance of a campaign that a person experiences. If the secondary person has started a journey that the primary person has not, the primary person continues on that campaign journey after the merge.

    If the secondary person has completed journeys that the primary person has not, the primary person gains these historical journeys after the merge. This may be important for determining entry (or re-entry) criteria for subsequent campaigns, segments, etc.

  • Manual segments that the primary person did not already belong to.
  • Message DeliveryThe instance of a message sent to a person. When you set up a message, you determine an audience for your message. Each individual “send”—the version of a message sent to a single member of your audience—is a delivery. history.

When both the primary and secondary people have conflicting data—both people have the same attribute or have experienced the same campaign—we pick a “winner” to resolve the conflict; the “winner” value remains after the merge, and the “loser” is lost with the secondary person. See the sections below to learn more about how we resolve conflicting attributes and campaign journeys in the merge process. data-driven segmentsA group of people who match a series of conditions. People enter and exit the segment automatically when they match or stop matching conditions.

 The primary person might enter new segments and campaigns

When you merge people, the primary person inherits new attributes, events, campaign history, etc, which can enter a person into segments. The primary person can enter new segment-triggered campaigns, but will not enter new event-triggered campaigns; events inherited from a merge cannot trigger campaigns.

Resolving conflicts between attributes

If the primary and secondary people both have the same attribute, and the primary person’s attribute value is not empty, the primary person’s attribute “wins”: it remains on the merged person and the secondary person’s attribute value is lost in the merge.

For example, if both the primary and secondary people have a first_name attribute, the first_name on the primary person remains and the attribute on the secondary person is lost in the merge.

Resolving conflicts between campaign journeys

A campaign journey is the instance of a campaign that a person experiences. If the primary and secondary people have both started or completed the same campaign, we pick a “winner” journey to remain on the merged person. The “winner” depends on whether the people have completed a journey in the past or are active in a campaign at the time of the merge.

If both people are active in a campaign, the primary person continues its campaign journey. The secondary person exits the campaign early.

If both people have completed a campaign, the merged person keeps the most recently-started campaign journey. The history of completed campaigns doesn’t necessarily affect people, but you may use it as re-entry criteria for follow-up campaign or segment membership.

Merge two people together

 This operation is permanent

You cannot undo a merge, nor can you stop it after it starts. Make sure that you’re ready to merge people before you begin this process.

When you merge two people, you pick a primary person and merge a secondary person into it. The primary person remains after the merge and the secondary is deleted.

Merging people may cause the primary person to enter or exit segments and campaigns based on information you merge from the secondary person. Make sure that you understand how a merge will impact the primary person before you initiate a merge.

  1. Go to the People page.
  2. Click Merge. You can pick people before you click merge.
    Select people and click merge to start the process
    Select people and click merge to start the process
  3. Select your Primary and Secondary people and click Next. If you already selected people, you can click Swap to reverse your primary and secondary people. Remember, when you merge people, the primary gains some information from the secondary person, and any data that is not merged to the primary person is lost.
    Review the attribute changes that occur in the merge
    Review the attribute changes that occur in the merge
  4. Review your changes one last time. When you’re sure you want to merge people, click Confirm and merge.

    You can search for attributes on the primary person, ensuring that the values on the primary person are correct before you finish your merge.

    You’ll also see a count of the attributes, events, and deliveriesThe instance of a message sent to a person. When you set up a message, you determine an audience for your message. Each individual “send”—the version of a message sent to a single member of your audience—is a delivery. on each person. Items remaining on the Secondary person are lost.

When you confirm a merge, you’ll go to the newly-merged person’s page. Attribute changes take effect immediately, but event history may take a moment.

Merge people via the API

You can also merge people using the Track API. The payload contains primary and secondary profile objects. As when you merge people from the People page, the primary profile remains after the merge. The secondary profile’s information is merged into the primary, and then it is deleted.

The primary and secondary objects can each contain one of, and only one of, id, email, or cio_idAn identifier for a person that is automatically generated by Customer.io and cannot be changed. This identifier provides a complete, unbroken record of a person across changes to their other identifiers (id, email, etc)..

  curl --request POST \
  --url https://track.customer.io/api/v1/merge_customers \
  --header "Authorization: Basic $(echo -n site_id:api_key | base64)" \
  --header 'content-type: application/json' \
  --data '{"primary":{"email":"cool.person@company.com"}, "secondary":{"email":"cperson@gmail.com"}}'

Automatically merge people

If your workspace supports email or ID as IdentifiersThe attributes you use to add, modify, and target people. Each unique identifier value represents an individual person in your workspace., there are situations where you can inadvertently create duplicate people.

If you created your workspace using the email or ID option after September 24, 2021, we automatically recognize and merge duplicate profilesAn instance of a person. Generally, a person is synonymous with thier profile; there should be a one-to-one relationship between a real person and their profile in Customer.io. But, if you inadvertantly represent a person twice, you can merge two profiles to correct the duplication. if you send an identify call that results in a Failed Attribute Change and all of the following things are true:

  • The identify request failed because the id and email in the request matched different people.
  • The id and email in the request matched exactly one person each.
  • The profile matched by id does not have an email
  • The profile matched by email does not have an id.

In this case, when we merge people, we treat the older profile as the Primary person and the younger profile as the secondary person.

The rules we use to automatically deduplicate people
The rules we use to automatically deduplicate people

To turn this setting on or off:

  1. Go to Settings > Workspace Settings.
  2. Click Settings next to Merge options.
  3. Enable Multi-identifier profile merge.
enable the multi-identifier profile merge setting
enable the multi-identifier profile merge setting

Merged people in the activity log

When you merge people, the activity log reports a People merged activity on the primary person. The activity Source shows how the merge was performed, through the People page, the API, or automatically (if your workspace has the setting enabled).

a merge results in an attribute change in the activity log.
a merge results in an attribute change in the activity log.

Merged people in data warehouse sync

Like the Activity Log, person merges are represented in your data warehouse as attribute changes and a deleted person.

  • In the People table, the secondary person is deleted.
  • In the Attributes table, the primary person shows new entries for each attribute inherited from the secondary person in the merge.

Segment membership and campaign triggers after a merge

When you merge people, you may cause the primary person to enter or exit segments and campaigns. In many cases, these changes are easy to understand—the primary person directly inherits a manual segment membership or an attribute that adds the person to a data-driven segment.

However, it’s important to remember that the primary person also inherits campaign and delivery history from the secondary person, both of which can affect segment membership and campaign filters. For example, if both the primary and secondary people received the same message, the merged person will become a member of a data-driven segmentA group of people who match a series of conditions. People enter and exit the segment automatically when they match or stop matching conditions. of people who received that message more than once.

Copied to clipboard!