Skip to content

Sales order fields

Sales orders combine a header, one or more item lines, computed money fields, fulfillment state, and provider sync state. Snapshot fields keep old orders readable when related records are renamed.

header fieldsline fieldsstatus values

FieldTypeDefaultMeaning
orderNumbervarchar(32)autoHuman-readable order number, unique per organization.
customerIduuidrequiredCustomer the order is for.
customerNamevarchar(255)snapshotCustomer name copied onto the order.
customerProjectIduuidnullOptional project link.
statusconstrained varcharopenStored status: open or done.
priorityRankintegernullQueue rank for open-order allocation.
orderDatedatetodayDate the order was taken.
shipDatedatenullDelivery deadline used by planning and allocation.
requestedDatedatenullDate the customer asked for — stored/API only (used as the Xero invoice due date); not shown on the order detail grid.
shippedAttimestamptznullSet when the order becomes fully shipped.
ship* fieldsvarcharcustomer defaultShip-to address lines, city, region, postcode, country.
billing* fieldsvarcharcustomer defaultBill-to address lines, city, region, postcode, country.
shippingFeeDescriptionvarchar(255)nullLabel for the shipping charge.
shippingFeeAmountnumeric(12,2)0Shipping charge.
shippingFeeTaxAmountnumeric(12,2)0Tax on the shipping charge.
subtotalAmountnumeric(12,2)computedSubtotal before tax: product line subtotals plus shipping fee.
taxAmountnumeric(12,2)computedOrder tax total.
totalAmountnumeric(12,2)computedOrder total.
notestextnullFree-text notes.
versioninteger1Optimistic concurrency version.
FieldTypeDefaultMeaning
itemIduuidrequiredProduct or material sold.
itemNamevarcharsnapshotItem name copied onto the line.
itemSkuvarcharsnapshotSKU copied onto the line.
unitNamevarcharsnapshotUnit copied onto the line.
quantitynumeric(12,4)requiredOrdered quantity. Must be greater than 0.
shippedQuantitynumeric(12,4)0Quantity delivered so far.
cancelledQuantitynumeric(12,4)0Cancelled quantity. Shipped plus cancelled cannot exceed ordered quantity.
listUnitPricenumeric(10,2)base priceList price used for discount comparison.
unitPricenumeric(10,2)requiredUnit price charged.
discountPercentnumeric(5,2)0Discount from list price to unit price.
suggestedUnitPricenumeric(10,2)resolvedPricing engine suggestion.
pricingSourceTypeconstrained varcharbase_pricebase_price or schedule_break.
pricingScheduleNamevarcharnullWinning schedule snapshot.
pricingBreakLabelvarcharnullWinning quantity break snapshot.
isPriceOverriddenbooleanfalseTrue when the suggested price was changed.
taxRateIduuidnullTax rate id.
taxRateNamevarcharsnapshotTax rate name copied onto the line.
taxRatePercentnumeric0Tax percent copied onto the line.
lineSubtotalnumeric(12,2)computedQuantity times unit price.
lineTaxAmountnumeric(12,2)computedTax on the line subtotal.
lineTotalnumeric(12,2)computedLine subtotal plus tax.
sortOrderinteger0Display order.

Each saved order line is unique by item within the order.

AreaValues
Stored order statusopen, done
Derived delivery stateNot shipped, Partially shipped, Shipped
Sales item fulfillmentavailable, expected, not_available, complete
Ingredient fulfillmentnot_needed, not_applicable, in_stock, expected, not_available, picked
Production fulfillmentnot_applicable, make, not_started, in_progress, done, blocked
Allocation statusready, waiting_production, partial, short
Pricing sourcebase_price, schedule_break

The sales order read model exposes provider invoice sync fields with legacy xero* names, including invoice id, invoice number, push status, push error, pushed time, retry count, email status, and emailed time.

Use the UI wording connected accounting provider when describing the action. The active provider can be Xero or QuickBooks depending on setup.