Skip to content

Customer types

The types the customer domain defines, with the fields other domains add to them.

Objects

BusinessUnitSwitchResponse

B2B only

FieldTypeDescription
successB2BBoolean!Indicates if setting active business context was successful
businessUnitErrorsB2B[BusinessUnitSwitchError!]Error details if setting active business context failed

Customer

Fields added by Invoice, Order, Return and Shopping lists

Customer account information with personal details and business context

FieldTypeDescription
idID!Unique identifier for the customer
createdAtDateTime!Date and time when the customer account was created
companyStringCompany name for business customers
vatNumberStringVAT identification number for business customers
customerNumberStringCustomer number assigned by the back office
salutationSalutationTypeOptional salutation for the customer
givenNameStringFirst name of the customer
familyNameStringLast name of the customer
phoneStringThe customer's phone number as they typed it: free text, not checked against any numbering plan. Null where none is recorded.
addressesAddressResult!The customer's address book. A search term narrows it by name, company, street, postal code, city or region; every word must appear, in any order. Paged and searchable like a company's book, because a private shopper can keep as many addresses as a small company -- a facilities manager buying for forty sites is one person -- and the same picker reads both.Arguments: page, pageSize, searchTerm
billingAddressAddressPrimary billing address for the customer
defaultShippingAddressAddressPrimary shipping address for the customer
notificationPreferencesNotificationPreferencesMarketing and notification opt-in preferences
businessUnitB2BBusinessUnitGet a specific business unit by ID that the customer has access toArguments: id
businessUnitsB2B[BusinessUnit!]List of all business units the customer has access to
invoiceInvoiceOne invoice billed to this person, by id. The signed-in caller's own, whichever customer this field was reached through: a Customer is addressable by email, and answering with somebody else's invoice because their address was asked for is not a question this should be able to answer.Arguments: id
invoicesInvoiceResult!Invoices billed to this person rather than to a company, newest firstArguments: page, pageSize, searchTerm, status, invoiceDateFrom, invoiceDateUntil
orderOrderOne order, by the number a buyer quotes or by its id. Give exactly one -- giving both, or neither, is an error rather than a silent preference. The id is what a payment provider hands back on its return URL, so it is the key a buyer arrives with after paying. The order number is the one they read off a confirmation.Arguments: orderNumber, id
ordersOrderResultThis customer's orders, newest first. Cancelled ones are left out unless asked for by name: a cancelled order is not something that was bought, and reopening an unpaid order for editing cancels it, so the list would otherwise fill with twins. A search term matches the order number, the purchase-order reference, or the SKU of a line item. All three are matched in full rather than as a prefix: they are codes read off a confirmation, a purchase order or a packing slip and pasted in, not phrases to type part of. Product names are deliberately not searched. Free text over what an order contains needs a separate search index, and an order history that quietly stops finding anything the day that index is rebuilt is worse than one that never claimed to.Arguments: page, pageSize, searchTerm, status, createdFrom, createdUntil
returnsReturnResult!The signed-in customer's returns, newest firstArguments: page, pageSize, status
returnReturnOne of the signed-in customer's returns; null when it is not theirsArguments: id
emailString!
shoppingListShoppingListGet a specific shopping list by ID for the customerArguments: id
shoppingListsShoppingListResultGet paginated shopping lists for the customerArguments: page, pageSize

CustomerAddressCreateResponse

FieldTypeDescription
customerCustomerUpdated customer account information with new address
customerErrors[CustomerAddressCreateError!]Error details if address creation failed

CustomerAddressDeleteResponse

FieldTypeDescription
customerCustomerUpdated customer account information after address deletion
customerErrors[CustomerAddressDeleteError!]Error details if address deletion failed

CustomerAddressUpdateResponse

FieldTypeDescription
customerCustomerUpdated customer account information with modified address
customerErrors[CustomerAddressUpdateError!]Error details if address update failed

CustomerCreateResponse

FieldTypeDescription
customerCustomerCreated customer account information
customerErrors[CustomerCreateError!]Error details if account creation failed

CustomerDefaultAddressUpdateResponse

FieldTypeDescription
customerCustomerUpdated customer account information
customerErrors[CustomerDefaultAddressUpdateError!]Error details if update failed

CustomerDeleteResponse

FieldTypeDescription
successBoolean!Indicates if the deletion was successful
customerErrors[CustomerDeleteError!]Error details if deletion failed

CustomerEmailUpdateResponse

FieldTypeDescription
customerCustomerUpdated customer account information
customerErrors[CustomerEmailUpdateError!]Error details if email update failed

CustomerExistsResult

Result type for checking if a customer exists

FieldTypeDescription
resultBoolean!Whether a customer with the given email exists

CustomerInformationUpdateResponse

FieldTypeDescription
customerCustomerUpdated customer account information
customerErrors[CustomerInformationUpdateError!]Error details if update failed

CustomerNotificationPreferencesUpdateResponse

FieldTypeDescription
customerCustomerUpdated customer account information
customerErrors[CustomerNotificationPreferencesUpdateError!]Error details if update failed

CustomerPersonalDetailsUpdateResponse

FieldTypeDescription
customerCustomerUpdated customer account information
customerErrors[CustomerPersonalDetailsUpdateError!]Error details if update failed

NotificationPreferences

Marketing and notification opt-in preferences for a customer

FieldTypeDescription
newsletterBoolean!Whether the customer opted in to the marketing newsletter

Input objects

CustomerCreateInput

Input data required to create a new customer account

FieldTypeDescription
emailEmailAddress!Email address for the customer account
passwordString!Password for the customer account
salutationSalutationTypeOptional salutation for the customer
givenNameStringGiven name of the customer
familyNameStringFamily name of the customer

CustomerPersonalDetailsInput

Personal details that can be updated independently of any address

FieldTypeDescription
salutationSalutationTypeOptional salutation for the customer
givenNameString!First name of the customer
familyNameString!Last name of the customer
phoneStringThe customer's phone number, as free text. Left out, the number stays as it is; an empty string removes it.

NotificationPreferencesInput

Notification preference values to update; omitted fields are left unchanged

FieldTypeDescription
newsletterBooleanOpt in or out of the marketing newsletter

Unions

BusinessUnitSwitchError

B2B only

One of ValidationError.

CustomerAddressCreateError

One of ValidationError.

CustomerAddressDeleteError

One of ValidationError.

CustomerAddressUpdateError

One of ValidationError.

CustomerCreateError

One of ValidationError.

CustomerDefaultAddressUpdateError

One of ValidationError.

CustomerDeleteError

One of ValidationError.

CustomerEmailUpdateError

One of ValidationError.

CustomerInformationUpdateError

One of ValidationError.

CustomerNotificationPreferencesUpdateError

One of ValidationError.

CustomerPersonalDetailsUpdateError

One of ValidationError.