Skip to main content

Customer

A customer of a given Storefront is a user who places orders on the Storefront

type Customer {
customerAddress(
customerAddressId: ID!
): CustomerAddress
customerAddresses(
after: String
before: String
customerAddressIds: [ID!]
first: Int
last: Int
): CustomerAddressConnection!
customerId: ID!
defaultBillingAddress: CustomerAddress
defaultBillingAddressId: ID
defaultShippingAddress: CustomerAddress
defaultShippingAddressId: ID
demandHqId: ID!
emailAddress: String!
emailMarketingConsent: CustomerMarketingConsent
externalCustomerId: ID
firstName: String
lastName: String
phoneNumber: String
smsMarketingConsent: CustomerMarketingConsent
storefrontId: ID!
tags: CustomerTags
}

Fields

Customer.customerAddress ● CustomerAddress object

Get a CustomerAddress by their customerAddressId.

Requires the publiccustomeraddress/read permission.

Customer.customerAddress.customerAddressId ● ID! non-null scalar

Customer.customerAddresses ● CustomerAddressConnection! non-null object

Get a list of CustomerAddresses.

Requires the publiccustomeraddress/read permission.

Customer.customerAddresses.after ● String scalar

Returns the elements in the list that come after the specified cursor.

Customer.customerAddresses.before ● String scalar

Returns the elements in the list that come before the specified cursor.

Customer.customerAddresses.customerAddressIds ● [ID!] list scalar
Customer.customerAddresses.first ● Int scalar

Returns the first n elements from the list.

Customer.customerAddresses.last ● Int scalar

Returns the last n elements from the list.

Customer.customerId ● ID! non-null scalar

Customer.defaultBillingAddress ● CustomerAddress object

Get the default billing address for a customer.

Requires the publiccustomeraddress/read permission.

Customer.defaultBillingAddressId ● ID scalar

The CustomerAddressId for the default billing address for this Customer

Customer.defaultShippingAddress ● CustomerAddress object

Get the default shipping address for a customer.

Requires the publiccustomeraddress/read permission.

Customer.defaultShippingAddressId ● ID scalar

The CustomerAddressId for the default shipping address for this Customer

Customer.demandHqId ● ID! non-null scalar

Customer.emailAddress ● String! non-null scalar

The email address associated with the Customer, must be unique to the storefront, limit 256 characters

Customer.emailMarketingConsent ● CustomerMarketingConsent object

Customer.externalCustomerId ● ID scalar

Reference to the storefront's customer authentication system. Limit 256 characters. This field is required if this customer is going to access any authenticated data (like their orders).

Customer.firstName ● String scalar

The first name of the Customer, limit 256 characters

Customer.lastName ● String scalar

The last name of the Customer, limit 256 characters

Customer.phoneNumber ● String scalar

Must be unique to the Storefront. Limit 64 characters. Format +11231231234

Customer.smsMarketingConsent ● CustomerMarketingConsent object

Customer.storefrontId ● ID! non-null scalar

Customer.tags ● CustomerTags object

Get the tags of the customer.

Returned by

createCustomer mutation ● customer query ● updateCustomer mutation