Skip to main content

Customer

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

type Customer {
createdAt: Date!
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
status: CustomerStatus!
storefrontId: ID!
tags: CustomerTags
updatedAt: Date!
updatedBy: ID!
}

Fields​

Customer.createdAt ● Date! non-null scalar​

Customer.customerAddress ● CustomerAddress object​

Get a CustomerAddress by their customerAddressId.

Requires the customeraddress/read permission for the associated DemandHq.

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

Customer.customerAddresses ● CustomerAddressConnection! non-null object​

Get a list of CustomerAddresses.

Requires the customeraddress/read permission for the associated DemandHq.

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 customeraddress/read permission for the associated DemandHq.

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 customeraddress/read permission for the associated DemandHq.

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.status ● CustomerStatus! non-null enum​

Customer.storefrontId ● ID! non-null scalar​

Customer.tags ● CustomerTags object​

Get the tags of the customer.

Customer.updatedAt ● Date! non-null scalar​

Customer.updatedBy ● ID! non-null scalar​

Returned by​

createCustomer mutation ● customer query ● updateCustomer mutation

Member of​

CustomerConnectionWithSearch object ● CustomerEdge object ● Storefront object