---
title: "customerMergePreview"
description: "Return to customer merge preview"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/customers/queries/customer-merge-preview'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/customers/queries/customer-merge-preview.md'
---
# customerMergePreview

Return to customer merge preview

- **Required Scopes:** `read_customers`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Query

## Type Signature

`CustomerMergePreview`

## Required Permissions

* `read_customers`

An access token is required to call this API. Refer to [Authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md) for more information about how to obtain the token.

## Arguments

* `customerOneId`

  [ID](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  The ID of the customer that was overwritten when merging

* `customerTwoId`

  [ID](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  The ID of the customer retained when merged

* `overrideFields`

  [CustomerMergeOverrideFieldsInput](https://developer.shopline.com/docs/admin-graph-ql-api/customers/inputs/customer-merge-override-fields-input.md)

  Fields used to override default account merge rules

## Returns

* `alternateFields`

  [CustomerMergePreviewAlternateFields](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer-merge-preview-alternate-fields.md)

  Default fields that will be overwritten after a customer merge

* `blockingFields`

  [CustomerMergePreviewBlockingFields](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer-merge-preview-blocking-fields.md)

  Possible truncated fields for customer merge preview. Unless edited, these fields will be automatically truncated during customer merge, retaining restricted characters

* `customerMergeErrors`

  [[CustomerMergeError]](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer-merge-error.md)

  Error preventing client merge

* `defaultFields`

  [CustomerMergePreviewDefaultFields](https://developer.shopline.com/docs/admin-graph-ql-api/customers/objects/customer-merge-preview-default-fields.md)

  Fields retained after merging two customers

* `resultingCustomerId`

  [ID](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  The customer ID after merging the two customers

## Code Example

```graphql
 {
	customerMergePreview(customerOneId, customerTwoId, overrideFields ) 
		 {
			# CustomerMergePreview fields
		}
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

