Anchor to CustomerMergeUserErrorCustomer
objectCustomer Merge User Error
Requires access scope.
An error that occurs while merging two customers.
Anchor to FieldsFields
- code (CustomerMergeErrorCode)
- field ([String!])
- message (String!)
- Anchor to codecode•Customer
Merge Error Code The error code.
- Anchor to fieldfield•[String!]
The path to the input field that caused the error.
- Anchor to messagemessage•String!non-null
The error message.
Was this section helpful?
Anchor to MutationsMutations
- customerMerge (CustomerMergePayload)
- •mutation
Merges two customers.
The
andarguments don't guarantee which customer is kept. Shopify selects the resulting customer in this order:- If
is provided and valid, then the selected customer is kept. - If exactly one customer has an email address, then that customer is kept.
- If both customers have email addresses, then account state and email marketing consent determine
the customer that's kept: an
enabledaccount wins over other account states; otherwise, aninvitedaccount can win when consent doesn't already prefersubscribedorpending; otherwise the consent result is used. If those rules don't prefer either customer, thenis kept. - If neither customer has an email address, then
is kept.
Use
andto check which customer will be kept before merging.- Anchor to customerOneIdcustomer•ID!
One Id required The ID of one customer to merge. This customer isn't guaranteed to be kept.
- Anchor to customerTwoIdcustomer•ID!
Two Id required The ID of another customer to merge. This customer is kept when neither customer has an email address.
- Anchor to overrideFieldsoverride•Customer
Fields Merge Override Fields The field-specific overrides for default customer merge rules.
Arguments
- If
Was this section helpful?