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 a customer entity within the system and contains structured information about their profile, account status, and transaction history. It includes personal identifiers, contact information, language and currency preferences, and aggregated order and refund data. The address field references the Address type for detailed location information, the language field references the Locale type for language preferences, the currency field references the Currency type for preferred transaction currency, and the loyaltyDiscountProgress field references the LoyaltyDiscountProgress type for loyalty program tracking.

Example

query { customer(id: 12345) { id customerNumber name firstName lastName email username hasAccess acceptsMarketing orderCount orderTotal refundCount refundTotal firstOrderDate lastOrderDate address { street city country } language { code } currency { code } tags audiences loyaltyDiscountProgress { currentTier progress } } }

Implements

This type does not implement any interfaces.