Skip to content
MergeGuard
Install free

Explainer

Which profile does Shopify keep when you merge customers?

In Shopify’s admin, the email you keep decides which profile remains: if only one profile has an email, it stays; if both do, the profile tied to the kept email stays; if neither does, the profile you selected stays. The API gives no guarantee about the first customer ID, and MergeGuard’s recommendation is a separate rule.

By MergeGuard team

Last updated

3 min read

On this page

People often assume Shopify keeps the profile with the most orders, or the oldest one. Neither is in the rules Shopify publishes. The rule follows the email address.

Key insight

The kept email, not the order count, decides which profile survives in Shopify.

The admin rule

Shopify’s help page for merging customers gives three cases:

Only one has an email

That profile remains.

Both have an email

The profile tied to the email address kept on the merged record remains.

Neither has an email

The profile you selected under “Find a customer to merge with” remains.

Example: Profile A has a phone number and no email address. Profile B has an email address. Only one profile has an email, so profile B stays. Worked example (made up) The order counts do not enter into it.

Input: Profile A, Has a phone number, no email address. Input: Profile B, Has an email address. Only one profile has an email, Shopify keeps that profile.. Profile B stays.Profile AHas a phone number, noemail addressProfile BHas an email addressOnly one profile has an emailShopify keeps that profile.Profile B stays
The email decides which profile remains. The order counts do not enter into it.

What happens to the other profile’s data

Shopify combines the listed information into one profile: orders, draft orders, addresses, email address, phone number, name, notes, tags, tax settings, timeline events, credit cards, customer accounts, gift cards and discounts. The “Merged customer” section shows what will be merged and what will be discarded, and you can adjust the contact information before you confirm.

Orders do not move one by one. Shopify says “Orders are permanently associated with the customer account that placed them”, so the merge is the only way the orders of two profiles come together. After the merge, “you can’t reverse the process”.

The API rule ladder

Developers who merge through Shopify’s Admin GraphQL API meet a different description. The customerMerge mutation needs the write_customer_merge access scope. Its customerOneId argument is described as “isn’t guaranteed to be kept”. Its customerTwoId is kept when neither customer has an email address.

The page lists the rules in order:

  1. If an override email to keep is given and valid, that customer is kept.
  2. If exactly one customer has an email address, that customer is kept.
  3. If both have an email address, account state and email marketing consent decide, with an enabled account winning over other account states. If none of these prefers either customer, customerTwoId is kept.
  4. If neither customer has an email address, customerTwoId is kept.

The admin rule and the API ladder agree on the first and second cases. In the third case the API adds account state and consent. The page also recommends a merge preview before you merge, and describes the resulting customer ID as authoritative.

Choosing the email on purpose

Because the kept email decides the survivor, make the choice a step in every merge:

  • Pick the address the person uses. Usually that is the one with recent orders or opens.
  • Fix a typo first. If the typo address stays, it can be the one you keep. See email typos in Shopify.
  • Check consent. If either profile is subscribed to email or SMS marketing, the merged profile is subscribed.

The safe merge checklist puts these in order. For the whole procedure, read how to merge customers in Shopify.

Sources