Skip to Content

Customer

Represents a customer, providing access to their personal, account, and order information.

Type Definition

type Customer { id: Int customerNumber: String name: String address: Address tags: [String] hasAccess: Boolean username: String firstName: String lastName: String language: Locale currency: Currency acceptsMarketing: Boolean orderCount: Int orderTotal: Float refundCount: Int refundTotal: Float firstOrderDate: String lastOrderDate: String audiences: [String] loyaltyDiscountProgress: LoyaltyDiscountProgress }

Fields

FieldTypeDescription
idIntUnique identifier for the customer.
customerNumberStringThe customer number assigned to this customer.
nameStringThe full name of the customer.
addressAddressThe customer’s address information.
tags[String]The tags associated with the customer.
hasAccessBooleanIndicates if the customer has access rights to the store.
usernameStringThe username of the customer.
firstNameStringThe first name of the customer.
lastNameStringThe last name of the customer.
languageLocaleThe customer’s language/locale information.
currencyCurrencyThe customer’s preferred currency.
acceptsMarketingBooleanIndicates if the customer has accepted marketing communications.
orderCountIntThe total number of orders placed by the customer.
orderTotalFloatThe total amount spent by the customer on orders.
refundCountIntThe total number of refunds issued to the customer.
refundTotalFloatThe total amount refunded to the customer.
firstOrderDateStringThe date and time of the customer’s first order, in RFC 2822 format.
lastOrderDateStringThe date and time of the customer’s most recent order, in RFC 2822 format.
audiences[String]The names of the audiences or segments the customer belongs to.
loyaltyDiscountProgressLoyaltyDiscountProgressReturns the progress of the customer towards the next loyalty discount in a GraphQL compatible format.

Relationships

The Customer type represents an individual customer within the system. It contains comprehensive profile information including personal details, contact preferences, and historical transaction data. Customers can be associated with multiple orders through the Cart and Review types, and their information is referenced in customer-related mutations through the CustomerCreatePayload type. Customer data also appears in comments through the Comment type.

Example

query { customer { id customerNumber name firstName lastName username address { street city } tags hasAccess acceptsMarketing orderCount orderTotal refundCount refundTotal firstOrderDate lastOrderDate language currency audiences loyaltyDiscountProgress { currentProgress nextTierThreshold } } }

Implements

This type does not implement any interfaces.