Skip to content

Business units types

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

Objects

BusinessUnit

Fields added by Invoice, Multiple carts, Order, Order approval, Quote, Return and Shopping lists

FieldTypeDescription
idID!Unique identifier for the business unit
nameString!Name of the business unit
cocNumberStringChamber-of-commerce registration of the company. Null where the project does not record one.
vatNumberStringVAT registration of the company. Null where the project does not record one.
vatNumbers[String!]!Every VAT registration of the company, vatNumber among them: one per member state it is registered in. A delivery to a member state the company is registered in, other than the seller's, is reverse-charged. Empty where the project records none.
eoriNumberStringThe company's EORI number, which customs need to clear its exports. Null where the project does not record one.
creditBusinessUnitCreditWhat the company may buy on account and how much of that it has used. Null where the project records no credit limit for the company.
oneOffShippingAddressesAllowedBoolean!Whether a checkout may ship to an address outside the company's address book, typed in for one order. True unless a company administrator turned one-off addresses off; a cart is then shipped to one of the book's addresses only, and any other is refused.
paymentTermsBusinessUnitPaymentTermsWhen the company pays for what it buys on account, for a checkout to state beside the price. Null where the project records no payment terms for the company.
stores[Store!]Stores assigned to the business unit
addressAddressAddress of the business unitArguments: id
billingAddressAddressBilling address of the business unit
defaultShippingAddressAddressThe address the unit ships to unless told otherwise. Null where nobody has chosen one. Never simply the first entry of a book that holds several: with dozens of addresses in no meaningful order, that is a guess a checkout would present as the company's decision.
addressesAddressResult!Addresses of the business unit. A search term narrows the book by name, company, street, postal code, city or region; every word must appear, in any order.Arguments: page, pageSize, searchTerm
associateBusinessUnitAssociateAn associate of the business unitArguments: id
currentAssociateBusinessUnitAssociateThe associate the signed-in caller is within this business unit. Null when the caller is not an associate of the unit. Answering this by reading the associate list is unreliable as well as slow: that collection is paginated and cannot be filtered to the caller, so beyond the first page the caller finds no capabilities and every gated control disappears without an error.
associatesBusinessUnitAssociateResult!Associates of the business unit. A search term narrows the list by email address, given name or family name; every word must appear, in any order.Arguments: page, pageSize, searchTerm
availableRoles[BusinessUnitRole!]!Available roles that can be assigned to customers in this business unit
pendingInvitationsBusinessUnitInvitationResult!Invitations whose invitee has not yet set up their account, the most recent first. An invitation to someone who already had an account is accepted at once and is never pending. Empty where the engine adds associates without an invitation step.Arguments: page, pageSize
shoppingListShoppingListA shopping list of the business unitArguments: id
shoppingListsShoppingListResultShopping lists of the business unitArguments: page, pageSize
invoiceInvoiceOne invoice of this company, by idArguments: id
invoicesInvoiceResult!Invoices billed to this company, newest first. Visible to whoever may see the company's orders: a standalone invoice belongs to no order, so whether it is the caller's own cannot be asked of it.Arguments: page, pageSize, searchTerm, status, invoiceDateFrom, invoiceDateUntil
cartsCartResult!Every cart in this business unit the caller is allowed to see, which includes colleagues' carts where their role permits it, most recently touched first. Active carts only unless status asks for archived ones too.Arguments: page, pageSize, status
orderB2BOrderOne 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
ordersB2BOrderResultThis business unit'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, placedByMe
orderApprovalsOrderApprovalResult!Approval queue for the business unit, optionally filtered by statusArguments: status, page, pageSize
orderApprovalRuleOrderApprovalRuleOne approval rule of the business unit, or null when it has none by that idArguments: id
orderApprovalRulesOrderApprovalRuleResult!Approval rules configured for the business unit, optionally by statusArguments: status, page, pageSize
quoteRequestQuoteRequestGet a specific quote request by its IDArguments: id
quoteRequestsQuoteRequestResultGet a paginated list of quote requestsArguments: page, pageSize
quoteQuoteGet a specific quote by its IDArguments: id
quotesQuoteResultGet a paginated list of quotesArguments: page, pageSize, sort, status
returnsReturnResult!Returns for the unit's orders the associate can see, newest firstArguments: page, pageSize, status
returnReturnOne of the unit's returns the associate can see; null otherwiseArguments: id

BusinessUnitAddressCreateResponse

FieldTypeDescription
businessUnitBusinessUnitUpdated business unit information with new address
businessUnitErrors[BusinessUnitAddressCreateError!]Error details if address creation failed

BusinessUnitAddressDeleteResponse

FieldTypeDescription
businessUnitBusinessUnitUpdated business unit information after address deletion
businessUnitErrors[BusinessUnitAddressDeleteError!]Error details if address deletion failed

BusinessUnitAddressUpdateResponse

FieldTypeDescription
businessUnitBusinessUnitUpdated business unit information with modified address
businessUnitErrors[BusinessUnitAddressUpdateError!]Error details if address update failed

BusinessUnitAssociate

Customer associated with a business unit, including their assigned roles

FieldTypeDescription
idID!Unique identifier for the associate
createdAtDateTime!Date and time when the associate was created
emailEmailAddress!Email address of the associate
salutationSalutationTypeOptional salutation for the associate
givenNameStringFirst name of the associate
familyNameStringLast name of the associate
roles[BusinessUnitRole!]!Roles assigned to the customer in the business unit
statusBusinessUnitAssociateStatusType!Whether the associate is active or deactivated within this business unit
isCurrentUserBoolean!Whether this associate is the currently signed-in user

BusinessUnitAssociateInviteResponse

FieldTypeDescription
businessUnitBusinessUnitUpdated business unit information with new associate
businessUnitErrors[BusinessUnitAssociateInviteError!]Error details if associate invitation failed

BusinessUnitAssociateRemoveResponse

FieldTypeDescription
businessUnitBusinessUnitUpdated business unit information after associate removal
businessUnitErrors[BusinessUnitAssociateRemoveError!]Error details if associate removal failed

BusinessUnitAssociateResult

Paginated result containing business unit associates

FieldTypeDescription
items[BusinessUnitAssociate!]!Associates in the current page
paginationPagination!Where this page sits within the full result set

BusinessUnitAssociateRolesUpdateResponse

FieldTypeDescription
businessUnitBusinessUnitUpdated business unit information with modified associate roles
businessUnitErrors[BusinessUnitAssociateRolesUpdateError!]Error details if associate roles update failed

BusinessUnitAssociateStatusUpdateResponse

FieldTypeDescription
businessUnitBusinessUnitUpdated business unit information with the modified associate status
businessUnitErrors[BusinessUnitAssociateStatusUpdateError!]Error details if the associate status update failed

BusinessUnitCredit

A company's credit on account, in the currency of its limit. The back office keeps the figures; they are read as it last recorded them.

FieldTypeDescription
limitMoney!The most the company may owe on account
outstandingMoney!What the company owes on account now
availableMoney!The limit minus what is outstanding, below zero once the limit is exceeded

BusinessUnitDefaultAddressUpdateResponse

FieldTypeDescription
businessUnitBusinessUnitUpdated business unit information with the modified default addresses
businessUnitErrors[BusinessUnitDefaultAddressUpdateError!]Error details if the default address update failed

BusinessUnitError

Implements Error

A change to a business unit the caller may not make.

FieldTypeDescription
messageString!
codeBusinessUnitErrorCodeType!

BusinessUnitInvitation

An invitation to someone who has yet to set up their account. They are an associate already, holding the roles the invitation gave them, so they are also in the unit's associates; they have not yet set a password.

FieldTypeDescription
associateBusinessUnitAssociate!The invited associate: their email address and the roles they were given
invitedAtDateTime!When the invitation was sent
invitedByCustomerWho sent it. Null where that customer no longer exists.

BusinessUnitInvitationResult

Paginated result containing a business unit's pending invitations

FieldTypeDescription
items[BusinessUnitInvitation!]!Invitations in the current page, the most recent first
paginationPagination!Where this page sits within the full result set

BusinessUnitPaymentTerms

When a company pays for what it buys on account.

FieldTypeDescription
daysInt!Days between an invoice and the date its payment is due, such as 30.

BusinessUnitRole

Roles that can be assigned to customers in a business unit

FieldTypeDescription
idID!Unique identifier for the role
nameString!Name of the role
capabilities[BusinessUnitCapabilityType!]!Normalized framework capabilities granted by this role

Enums

BusinessUnitAssociateStatusType

Whether an associate is active or has been deactivated within a unit

ACTIVEThe associate can act within the business unit
INACTIVEThe associate has been deactivated and cannot act within the unit

BusinessUnitCapabilityType

Normalized, engine-agnostic capabilities a role grants within a business unit. The storefront's permission gating resolves against these rather than against a specific commerce engine's raw permission model.

VIEW_MY_ORDERSView orders the associate placed themselves
VIEW_OTHERS_ORDERSView orders placed by other associates in the unit
VIEW_OTHERS_CARTSView carts belonging to other associates in the unit. There is no matching value for the associate's own carts: seeing your own work is not a restricted act, and view is granted separately only where seeing is itself a decision.
MANAGE_MY_ORDERSCreate and update the associate's own carts and orders
MANAGE_OTHERS_ORDERSCreate and update carts and orders belonging to other associates. Separate from managing your own: acting for a colleague is a different authority, and a role that has one need not have the other. Building a colleague's basket rides on this rather than earning a value of its own -- a basket you may not place is not a separation anyone asks for.
MANAGE_USERSManage the associates of the business unit
MANAGE_COMPANY_DETAILSChange the business unit's own details: its name, its default and billing addresses, and the addresses already in its book, which colleagues may be shipping to. Adding an address is not among them: it rides on MANAGE_MY_ORDERS, since anyone who may check out may need to ship somewhere new.
VIEW_INVOICESView invoices for orders the associate can see
DECIDE_APPROVALSDecide an approval flow: release an order that is being held, or refuse it.
MANAGE_APPROVAL_RULESAuthor the rules that decide which orders are held. Separate from deciding them: an associate may never approve their own order, and one who can rewrite the threshold reaches the same result by another route.
REQUEST_QUOTESAsk the merchant for a quote on a basket, and withdraw that request
CONVERT_QUOTESTurn a quote the merchant issued into an order. Separate from requesting one: an associate may be trusted to ask for a price without being trusted to commit the company to the answer. Converting is also the acceptance — there is no separate decision step to grant.
REQUEST_RETURNSRequest a return for orders the associate can see. Seeing the unit's returns follows from seeing its orders.

BusinessUnitErrorCodeType

Why a change to a business unit was refused.

PERMISSION_DENIEDThe caller's roles in the business unit do not allow this change.

Unions

BusinessUnitAddressCreateError

One of BusinessUnitError or ValidationError.

BusinessUnitAddressDeleteError

One of BusinessUnitError or ValidationError.

BusinessUnitAddressUpdateError

One of BusinessUnitError or ValidationError.

BusinessUnitAssociateInviteError

One of BusinessUnitError or ValidationError.

BusinessUnitAssociateRemoveError

One of BusinessUnitError or ValidationError.

BusinessUnitAssociateRolesUpdateError

One of BusinessUnitError or ValidationError.

BusinessUnitAssociateStatusUpdateError

One of BusinessUnitError or ValidationError.

BusinessUnitDefaultAddressUpdateError

One of BusinessUnitError or ValidationError.