Menu
customerMergePreview
Returns a preview of a customer merge request. The customerOneId and customerTwoId arguments don't guarantee which customer is kept.
Use it in a workflow
- Add a step and choose the Shopify connector.
- Pick the customerMergePreview action (under Customer).
- Fill in the fields below, then reference the result from later steps as
{{customermergepreview.response.data}}.
Query
This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.
query CustomerMergePreview($customerOneId: ID!, $customerTwoId: ID!, $overrideFields: CustomerMergeOverrideFields) {
customerMergePreview(
customerOneId: $customerOneId
customerTwoId: $customerTwoId
overrideFields: $overrideFields
) {
alternateFields {
defaultAddress {
address1
address2
city
company
coordinatesValidated
country
countryCode
countryCodeV2
firstName
formattedArea
id
lastName
latitude
longitude
name
phone
province
provinceCode
timeZone
validationResultSummary
zip
}
email {
emailAddress
marketingOptInLevel
marketingState
marketingUnsubscribeUrl
marketingUpdatedAt
openTrackingLevel
openTrackingUrl
sourceLocation
validFormat
}
firstName
lastName
phoneNumber {
marketingCollectedFrom
marketingOptInLevel
marketingState
marketingUpdatedAt
phoneNumber
sourceLocation
whatsAppMarketingConsent
}
}
blockingFields {
note
tags
}
customerMergeErrors {
errorFields
message
}
defaultFields {
defaultAddress {
address1
address2
city
company
coordinatesValidated
country
countryCode
countryCodeV2
firstName
formattedArea
id
lastName
latitude
longitude
name
phone
province
provinceCode
timeZone
validationResultSummary
zip
}
discountNodeCount
displayName
draftOrderCount
email {
emailAddress
marketingOptInLevel
marketingState
marketingUnsubscribeUrl
marketingUpdatedAt
openTrackingLevel
openTrackingUrl
sourceLocation
validFormat
}
firstName
giftCardCount
lastName
metafieldCount
note
orderCount
phoneNumber {
marketingCollectedFrom
marketingOptInLevel
marketingState
marketingUpdatedAt
phoneNumber
sourceLocation
whatsAppMarketingConsent
}
tags
}
resultingCustomerId
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"customerOneId": "string",
"customerTwoId": "string",
"overrideFields": {
"customerIdOfFirstNameToKeep": "string",
"customerIdOfLastNameToKeep": "string",
"customerIdOfEmailToKeep": "string",
"customerIdOfPhoneNumberToKeep": "string",
"customerIdOfDefaultAddressToKeep": "string",
"note": "string",
"tags": [
"string"
]
}
}
Response
Read the result with {{customermergepreview.response.data.data.customerMergePreview}}. If the API returns errors, the step fails and they are at {{customermergepreview.response.data.errors}}.
Need more? See the Shopify guide for connection setup and behaviour shared by every action.
Was this page helpful?