Anchor to CustomerMergePayloadCustomer
payloadCustomer Merge Payload
Return type for mutation.
Anchor to FieldsFields
- job (Job)
- resultingCustomerId (ID)
- userErrors ([CustomerMergeUserError!]!)
- •Job
The asynchronous job for merging the customers.
- Anchor to resultingCustomerIdresulting•ID
Customer Id The ID of the customer that's kept after the merge. Treat this ID as authoritative.
- Anchor to userErrorsuser•[Customer
Errors Merge User Error!]! non-null The list of errors that occurred from executing the mutation.
Was this section helpful?
Anchor to Mutations with this payloadMutations with this payload
- 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?