Skip to main content

setOrderFinancialAccountingCustomer

Overrides the accounting customer a single order financial document bills to.

When no override is set, an unsent document inherits its sales channel's accounting customer. Passing a null accountingCustomerId removes the override and restores inheritance.

Business Rules​

  • The accounting customer must belong to the document's company and have a link for the accounting integration the document targets.
  • Once a document has been sent its customer can be changed but not cleared — a sent document never returns to inheriting.
  • A sent document sharing a consolidated sales receipt with other documents cannot have its customer changed, because the receipt carries one customer for every member.

Error Scenarios​

  • **NOT_FOUND**: the document or accounting customer does not exist for this company.
  • **VALIDATION**: the document is sent and the customer was cleared, the document is a consolidated member, or the customer has no counterpart in the integration.

Permissions Required​

  • accounting:update_order_financial permission.
setOrderFinancialAccountingCustomer(
input: SetOrderFinancialAccountingCustomerInput!
): OrderFinancialDocument!

Arguments​

setOrderFinancialAccountingCustomer.input ● SetOrderFinancialAccountingCustomerInput! non-null input common​

Parameters for SetOrderFinancialAccountingCustomer

Type​

OrderFinancialDocument object orders​

An order's accounting document (invoice / sales receipt). If no document has been persisted yet, a draft is derived from the order and id is null.