# SalesOrderInvoiceInput input


The invoice that another system issued for an order. A field you omit is kept. Null or blank
clears it.

## Input fields

### number

`String`

The invoice's number. At most 100 characters.

### externalId

`String`

The invoice's id in the system that issued it. At most 200 characters.

### expectedExternalId

`String`

A compare-and-set check.

- A value: the write happens only if the order's `invoiceExternalId` equals it.
- If null or blank, the write happens only if the order has no invoice at all (both number and
  external id are empty).
- If omitted, there is no check.

When the check fails, the result is `CONFLICT` with `extensions.reason` `INVOICE_CHANGED`.

## Used by

- [`setSalesOrderInvoice`](/chameleoon-max/mutation/set-sales-order-invoice) (mutation)
