Skip to main content

displayName no longer exposes unapproved email or phone

On every API version, the displayName field no longer falls back to a customer's email address or phone number unless your app has access to that data. If a customer has no name and your app can't read their email or phone, displayName now returns •••. This change can affect apps that rely on displayName for customer contact details.

Merge error messages in customerMergePreview and Customer.mergeable follow the same rule. Apps that read displayName without access to customer email or phone data, you need to request that access when you depend on the full value.

What changed

When a customer has no first or last name, displayName uses their email address, then their phone number. Before this change, an app only needed access to customer names to read this field, even when the value it returned was an email or phone number.

Now, displayName checks access to the value it returns:

  • If the customer has a name, apps with access to customer names get the name, as before.
  • If the value is an email address, the app needs access to customer email. Otherwise it gets •••.
  • If the value is a phone number, the app needs access to customer phone. Otherwise it gets •••.
  • If the customer has no name, email or phone, displayName returns an empty string, "".

The fallback order doesn't change, and displayName never skips to another value. The field is still non-null, and the schema doesn't change.

This applies to these fields:

  • GraphQL Admin API: Customer.displayName, CustomerSegmentMember.displayName, CustomerMergePreviewDefaultFields.displayName, CustomerMergeError.message and CustomerMergeable.reason. When the message would include an email or phone the app can't read, it shows a generic message instead.
  • Customer Account API: Customer.displayName

Who's affected

You're affected if your app:

  • Reads any of the fields listed above.
  • Has access to customer names.
  • Doesn't have access to customer email or phone data. In that case, you see ••• for customers who have no name.

You're not affected if your app has access to customer email and phone data. The REST Admin API doesn't change.

What to do

  1. Check whether your app reads displayName or the customer merge error fields listed above, and expects an email or phone value.
  2. If it does, request access to protected customer data for customer email and phone fields in the Partner Dashboard.
  3. If your app doesn't need that data, handle ••• as "this customer has contact details your app can't read" and show your own placeholder if you like.
  4. Test with a public app installed on a development store, using a customer who has no name and only an email address. Before your app has access to customer email, displayName returns •••. After you get access in the Partner Dashboard, it returns the email address.

If you don't update your app and it depends on seeing the email or phone in displayName or merge error messages, customer-facing views or workflows that expect those values can show ••• or generic messages instead of contact details.

Related docs

Was this page helpful?