Customer
Requires access scope.
Represents information about a customer of the shop, such as the customer's contact details, their order history, and whether they've agreed to receive marketing material by email.
Caution: Only use this data if it's required for your app's functionality. Shopify will restrict access to scopes for apps that don't have a legitimate use for the associated data.
Anchor to Fields and connectionsFields and connections
- Anchor to addressesaddresses•[Mailing
Address!]! non-null A list of addresses associated with the customer.
- Anchor to addressesV2addresses•
V2 MailingAddress non-nullConnection! The addresses associated with the customer.
- Anchor to amountSpentamount•
Spent MoneyV2! non-null The total amount that the customer has spent on orders in their lifetime.
- Anchor to canDeletecan•
Delete Boolean!non-null Whether the merchant can delete the customer from their store.
A customer can be deleted from a store only if they haven't yet made an order. After a customer makes an order, they can't be deleted from a store.
- Anchor to companyContactProfilescompany•
Contact Profiles [CompanyContact!]! non-null A list of the customer's company contact profiles.
- Anchor to createdAtcreated•
At DateTime! non-null The date and time when the customer was added to the store.
- Anchor to dataSaleOptOutdata•
Sale Opt Out Boolean!non-null Whether the customer has opted out of having their data sold.
- Anchor to defaultAddressdefault•
Address The default address associated with the customer.
- Anchor to defaultEmailAddressdefault•
Email Address The customer's default email address.
- Anchor to defaultPhoneNumberdefault•
Phone Number The customer's default phone number.
- Anchor to displayNamedisplay•
Name String!non-null The full name of the customer, based on the values for first_name and last_name. If the first_name and last_name are not available, then this falls back to the customer's email address, and if that is not available, the customer's phone number.
- Anchor to eventsevents•Event
Connection! non-null A list of events associated with the customer.
- Anchor to firstNamefirst•
Name The customer's first name.
- •ID!non-null
A globally-unique ID.
- Anchor to imageimage•Image!non-null
The image associated with the customer.
- Anchor to lastNamelast•
Name The customer's last name.
- Anchor to lastOrderlast•
Order The customer's last order.
- Anchor to legacyResourceIdlegacy•
Resource Id UnsignedInt64! non-null The ID of the corresponding resource in the REST Admin API.
- Anchor to lifetimeDurationlifetime•
Duration String!non-null The amount of time since the customer was first added to the store.
Example: 'about 12 years'.
- Anchor to localelocale•String!non-null
The customer's locale.
- Anchor to mergeablemergeable•Customer
Mergeable! non-null Whether the customer can be merged with another customer.
- Anchor to metafieldmetafield•
A custom field, including its
namespace
andkey
, that's associated with a Shopify resource for the purposes of adding and storing additional information.- Anchor to metafieldsmetafields•Metafield
Connection! non-null A list of custom fields that a merchant associates with a Shopify resource.
- Anchor to multipassIdentifiermultipass•
Identifier A unique identifier for the customer that's used with Multipass login.
- Anchor to notenote•
A note about the customer.
- Anchor to numberOfOrdersnumber•
Of Orders UnsignedInt64! non-null The number of orders that the customer has made at the store in their lifetime.
- Anchor to ordersorders•Order
Connection! non-null A list of the customer's orders.
- Anchor to paymentMethodspayment•
Methods CustomerPayment non-nullMethod Connection! A list of the customer's payment methods.
- Anchor to productSubscriberStatusproduct•
Subscriber Status CustomerProduct non-nullSubscriber Status! Possible subscriber states of a customer defined by their subscription contracts.
- Anchor to statestate•Customer
State! non-null The state of the customer's account with the shop.
Please note that this only meaningful when Classic Customer Accounts is active.
- Anchor to statisticsstatistics•Customer
Statistics! non-null The statistics for a given customer.
- Anchor to storeCreditAccountsstore•
Credit Accounts StoreCredit non-nullAccount Connection! Returns a list of store credit accounts that belong to the owner resource. A store credit account owner can hold multiple accounts each with a different currency.
- Anchor to subscriptionContractssubscription•
Contracts SubscriptionContract non-nullConnection! A list of the customer's subscription contracts.
- Anchor to tagstags•[String!]!non-null
A comma separated list of tags that have been added to the customer.
- Anchor to taxExempttax•
Exempt Boolean!non-null Whether the customer is exempt from being charged taxes on their orders.
- Anchor to taxExemptionstax•
Exemptions [TaxExemption!]! non-null The list of tax exemptions applied to the customer.
- Anchor to updatedAtupdated•
At DateTime! non-null The date and time when the customer was last updated.
- Anchor to verifiedEmailverified•
Email Boolean!non-null Whether the customer has verified their email address. Defaults to
true
if the customer is created through the Shopify admin or API.
Map
Fields and connections with this object
- AbandonedCheckout.customer
- Abandonment.customer
- CalculatedDraftOrder.customer
- CompanyContact.customer
- CustomerConnection.nodes
- CustomerEdge.node
- CustomerPaymentMethod.customer
- DiscountCustomers.customers
- DraftOrder.customer
- GiftCard.customer
- GiftCardRecipient.recipient
- Order.customer
- PriceRuleCustomerSelection.customers
- SubscriptionBillingCycleEditedContract.customer
- SubscriptionContract.customer
- SubscriptionContractBase.customer
- SubscriptionDraft.customer
Possible type in
Anchor to QueriesQueries
- •query
Returns a Customer resource by ID.
- •query
Return a customer by an identifier.
- •query
Returns a list of customers.
Customer Queries
Queried by
Anchor to MutationsMutations
- •mutation
Add tax exemptions for the customer.
- •mutation
Create a new customer. As of API version 2022-10, apps using protected customer data must meet the protected customer data requirements.
- •mutation
Update a customer's email marketing information information.
- •mutation
Sends a link to the customer so they can update a specific payment method.
- •mutation
Remove tax exemptions from a customer.
- •mutation
Replace tax exemptions for a customer.
- •mutation
Sends the customer an account invite email.
- •mutation
Creates or updates a customer in a single mutation.
Use this mutation when syncing information from an external data source into Shopify.
This mutation can be used to create a new customer, update an existing customer by id, or upsert a customer by a unique key (email or phone).
To create a new customer omit the
identifier
argument. To update an existing customer, include theidentifier
with the id of the customer to update.To perform an 'upsert' by unique key (email or phone) use the
identifier
argument to upsert a customer by a unique key (email or phone). If a customer with the specified unique key exists, it will be updated. If not, a new customer will be created with that unique key.As of API version 2022-10, apps using protected customer data must meet the protected customer data requirements
Any list field (e.g. addresses, will be updated so that all included entries are either created or updated, and all existing entries not included will be deleted.
All other fields will be updated to the value passed. Omitted fields will not be updated.
- •mutation
Update a customer's SMS marketing consent information.
- •mutation
Update a customer's attributes. As of API version 2022-10, apps using protected customer data must meet the protected customer data requirements.
- •mutation
Updates a customer's default address.
Customer Mutations
Anchor to InterfacesInterfaces
- •interface
- •interface
- •interface
- •interface