Skip to main content
Anchor to CustomerMergeUserError

CustomerMergeUserError

object

Requires read_customer_merge access scope.

An error that occurs while merging two customers.

•CustomerMergeErrorCode

The error code.

•[String!]

The path to the input field that caused the error.

•String!
non-null

The error message.


Was this section helpful?

•mutation

Merges two customers.

The customerOneId and customerTwoId arguments don't guarantee which customer is kept. Shopify selects the resulting customer in this order:

  1. If overrideFields.customerIdOfEmailToKeep is provided and valid, then the selected customer is kept.
  2. If exactly one customer has an email address, then that customer is kept.
  3. If both customers have email addresses, then account state and email marketing consent determine the customer that's kept: an enabled account wins over other account states; otherwise, an invited account can win when consent doesn't already prefer subscribed or pending; otherwise the consent result is used. If those rules don't prefer either customer, then customerTwoId is kept.
  4. If neither customer has an email address, then customerTwoId is kept.

Use customerMergePreview and resultingCustomerId to check which customer will be kept before merging.

Arguments

•ID!
required

The ID of one customer to merge. This customer isn't guaranteed to be kept.

•ID!
required

The ID of another customer to merge. This customer is kept when neither customer has an email address.

•CustomerMergeOverrideFields

The field-specific overrides for default customer merge rules.



Was this section helpful?


Was this section helpful?