# CreateSalesOrderItemInput input


One goods line of an order from an external source.

## Input fields

### externalId

`String`

The line's id in the external source. Unique within the order.

### kind

[`SalesOrderItemKind`](/chameleoon-max/type/sales-order-item-kind) · default `PRODUCT`

What the line is. A `SET` is one priced line; never send its components.

### product

[`ProductRefInput`](/chameleoon-max/type/product-ref-input)

The product, identified by exactly one key.

- If no product is found, the line is kept unlinked under its `sku`, with the warning
  `PRODUCT_NOT_FOUND`.
- Ambiguous (several products carry the EAN): the line is kept unlinked under its `sku`, or
  under the EAN when you sent no `sku`, with the warning `PRODUCT_AMBIGUOUS`.
- A set sold as its components (`setMode` `EXPLODED`) that MAX cannot split: the line is kept
  unlinked under its `sku`, with the warning `SET_CONTENTS_MISSING`.
- A service becomes an `OTHER` charge.

### sku

`String`

The external source's SKU. Required when the product is not found, except for an EAN that
several products carry: then the line is kept under the EAN when you sent no `sku`.

### name

`String!` · required

The product's name as the customer saw it.

### variantName

`String`

The variant's name as the customer saw it, for example `"black, M"`.

### quantity

[`Decimal!`](/chameleoon-max/type/decimal) · required

The quantity, in `unit`. More than zero, with at most three decimals.

### unit

`String`

A unit code of the product. If omitted, the product's base unit, or the unit of the EAN you
sent. If the product does not have the unit, MAX uses its base unit and blocks the order for
review with the exception `UNIT_UNKNOWN`.

### unitPrice

[`Decimal!`](/chameleoon-max/type/decimal) · required

The final price of one unit, after this line's own discount. At most four decimals.

### originalUnitPrice

[`Decimal`](/chameleoon-max/type/decimal)

The price of one unit before the discount. MAX keeps the difference as the discount.

### discountPercent

[`Decimal`](/chameleoon-max/type/decimal)

The discount as the external source showed it. For information only.

### vatPercent

[`Decimal!`](/chameleoon-max/type/decimal) · required

The VAT rate in percent, for example `23`. At most two decimals.

### lineTotal

[`Decimal`](/chameleoon-max/type/decimal)

The external source's total of the line, on the order's basis: gross when `pricesIncludeVat`
is `true`, net otherwise. When it differs from the MAX line total by a cent or more, MAX creates
the order with its own total and blocks it for review, with the exception
`LINE_TOTAL_MISMATCH` on the line.

### attributes

[`[ItemAttributeInput!]`](/chameleoon-max/type/item-attribute-input)

What the customer chose about the line, such as an engraving or a colour.

### note

`String`

A note on the line.

### externallyIssuedQuantity

[`Decimal`](/chameleoon-max/type/decimal)

How much of the item the external issue's document took off stock, in `unit`, from 0 to
`quantity`, with at most three decimals. If omitted, all of it. Only for
[`createSalesOrder`](/chameleoon-max/mutation/create-sales-order), and only together with `externalIssue`.

- A set sold as its components records each component's share.
- An item kept unlinked records nothing (warning `EXTERNAL_ISSUE_ITEM_UNLINKED`).
- [`updateSalesOrderItems`](/chameleoon-max/mutation/update-sales-order-items) refuses it with `VALIDATION`. Report a later document
  with [`reportExternalIssue`](/chameleoon-max/mutation/report-external-issue).

## Used by

- [`CreateSalesOrderInput`](/chameleoon-max/type/create-sales-order-input)
- [`SalesOrderItemsInput`](/chameleoon-max/type/sales-order-items-input)
