customer Merge Preview
Requires access scope.
Returns a preview of a customer merge request.
The and arguments 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.
Arguments
- customerOneId (ID!)
- customerTwoId (ID!)
- overrideFields (CustomerMergeOverrideFields)
- 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.
Anchor to Possible returnsPossible returns
- CustomerMergePreview (CustomerMergePreview!)
- Anchor to CustomerMergePreviewCustomer•Customer
Merge Preview Merge Preview! A preview of the results of a customer merge request. Use
to check which customer would be kept before running.- Anchor to alternateFieldsalternate•Customer
Fields Merge Preview Alternate Fields The fields that can be used to override the default fields.
- Anchor to blockingFieldsblocking•Customer
Fields Merge Preview Blocking Fields The fields that will block the merge if the two customers are merged.
- Anchor to customerMergeErrorscustomer•[Customer
Merge Errors Merge Error!] The errors blocking the customer merge.
- Anchor to defaultFieldsdefault•Customer
Fields Merge Preview Default Fields The fields that will be kept if the two customers are merged.
- Anchor to resultingCustomerIdresulting•ID
Customer Id The ID of the customer that would be kept if the two customers were merged.