xMatix
Sign in Request demo
xMatix
PRODUCTS
SalesField Sales & SFACRMRewardsClaimsInventoryProcurementWarehouse ManagementField ServiceServiceSupportTelephony & MessagingFinance & AccountingPayrollExpense ManagementCommercePortalsAnalytics & ReportingData StudioMobile AppSee all products →
PLATFORM
Platform overviewApp BuilderAutomationIntegrationsSecurity & GovernanceChange ManagementDevelopers
SENSE AI
Sense AI overviewSense AssistSense ControlSense VisionAI StudioTrust & governanceIn Claude & ChatGPTUse cases
SOLUTIONS
Auto DMSConsumer Goods DMSSales Force Automation (SFA) FMCG & DistributionManufacturing & Dealer NetworksAutomotive & DealershipsPharma & HealthcareConsumer DurablesAgri-InputsBuilding MaterialsService NetworksWarehousing & 3PLFinancial AccountingERP SoftwareIndia GST ComplianceUAE VAT & e-InvoicingSaudi ZATCA & VATAll solutions →
RESOURCES
Knowledge CenterDeveloper & CLIBlogGuidesWhat is xMatix?Company facts
COMPANY
AboutCareersPartnersEventsContactAuthorsLegal
Sign in Request demo
Home/Docs/Entity Reference/Order Line — entity reference
REFERENCE · Last reviewed

Order Line — entity reference

One item or one charge on a sales order: what is sold, how much, at what price, discount and tax, and how far that quantity has got through fulfilment, allocation, picking, delivery and invoicing. Lines are added from the order's Lines tab (Quick Add, Product Catalogue, Barcode Scanner or Import), copied from a quote or an opportunity, or created from another organization's purchase order. On creation xMatix checks the order's partner account and branch, swaps a superseded item for its successor, defaults invoice group and subscription details from the item, prices the line from the price list unless a price was typed, resolves the tax group and taxes, applies the discount group, copies the header discount, explodes package components, finds the stock record and evaluates automatic schemes. Each stage keeps a counter maintained from the documents raised against the line, and every pending quantity is the line quantity less that counter and the cancelled quantity. Saving a line does not reserve stock; the shipped soft-commit ledger rule is switched off. Lines have no list of their own in any app.

Fields

FieldLabelTypeRequiredWhat it does
AllocatedInvoicedQuantityAllocated Invoiced QuantityNumberThe part of Invoice Quantity invoiced from allocated stock, that is, from invoice lines raised against an allocation line.
AmountAmountCalculated (calculated)Calculated: Base Amount less the scheme discount, the net discount and the line's share of any discount lines on the order. With Apply Post Tax Discount ticked, Amount is the base and the discounts come off Gross Amount instead.
ApplyPostTaxDiscountApply Post Tax DiscountBooleanWhen ticked, discounts are worked out on the base plus tax and come off after tax, instead of before.
BaseAmountBase AmountCalculated (calculated)Calculated: (Quantity minus Cancelled Quantity) times the unit price, using Unit Price 2 when it is above zero. Cancelling part of a line therefore lowers its value.
BenefitIndexBenefit IndexNumberPositional selector for the applied benefit when a scheme line offers several; it is passed to ApplyScheme as benefitIndex and cleared again by ResetScheme.
BillingFrequencyBilling FrequencyTextSubscription billing frequency. Defaulted from the item when the line leaves it blank.
BillingTypeBilling TypePickListSubscription billing in Advance or Arrears. Defaulted from the item when the line leaves it blank. Values: Advance, Arrears.
BranchIdBranchTextNot maintained on order lines; the branch is the order's Branch.
CancelledQuantityCancelled QuantityNumberQuantity that will not be supplied. Cancel Order adds each line's quantity not yet released to fulfilment. It can also be edited on the line's record page, but cannot exceed Quantity. It comes off every pending quantity and off Base Amount.
ChargeTypeCharge TypePickListSubscription charge type: One Time, Recurring or Usage. Defaulted from the item when the line leaves it blank. Values: One Time, Recurring, Usage.
ContractDiscountContract DiscountPercentContract discount percentage written from the matching discount-group rule for the line's item, SKU or item group.
ContractDiscountAmountContract Discount AmountCurrencyContract discount as a value, from a fixed-amount discount-group rule or copied from a quote or opportunity line. When above zero it is used instead of the Contract Discount percentage.
ConversionRatioConversion RatioNumberConversion factor of the first unit, copied from the item's unit definition.
ConversionRatio1Conversion Ratio 1NumberConversion factor of the second unit, copied from the item's unit definition.
CreatedByIdCreated ByLookup → UserAccountYes
CreatedDateTimeCreated DateDateAndTimeYes
DeliveryQuantityDelivery QuantityNumberQuantity delivered, maintained from delivery order lines.
DiscountDiscountPercentRegular discount percentage. A non-zero header Discount on the order is copied here when the line is created. Discount Amount, when above zero, wins over it.
Discount2Discount2DecimalYesCash discount percentage, the second discount pair. Cash Discount Amount, when above zero, wins over it.
DiscountAmountDiscount AmountCurrencyRegular discount as a value. When above zero it is used instead of the Discount percentage.
DiscountAmount2Cash Discount AmountCurrencyCash discount as a value, labelled Cash Discount Amount. When above zero it is used instead of the Discount2 percentage.
DiscountGroupRuleIdDiscount Group RuleLookup → DiscountGroupRuleThe discount-group rule that supplied the contract discount. Set by the platform.
ExcludeInAutoOrderExclude In Auto OrderBooleanWhen ticked, the line's pending invoice quantity is not counted as open demand by auto order.
ExternalIdExternalText, unique
FulfilmentAllocatedQuantityFulfilment Allocated QuantityNumberQuantity reserved by allocation lines, maintained from them.
FulfilmentOrderQuantityFulfilment Order QuantityNumberQuantity released to fulfilment documents, maintained from their lines. Any value above zero stops the line from being deleted.
GrossAmountGross AmountCalculated (calculated)Calculated: Amount plus Tax Amount, less the discounts when Apply Post Tax Discount is ticked. Shown as the total of the line's Amounts panel.
IdIdGuidYes
InventoryLedgerIdInventory LedgerLookup → InventoryLedgerThe inventory-ledger entry for the line. Empty out of the box, because the soft-commit ledger rule for order lines is shipped switched off.
InventoryStockIdStockLookup → InventoryStockThe stock record for the line's item, SKU, lot type and storage location. Found when the line is created and again when any of those change.
InvoiceGroupInvoice GroupPickListSplits invoicing: lines with different values go onto separate invoices, and lines with no value share one. Defaulted from the item's Invoice Group when the line leaves it blank. Values: Product, Part, Insurance.
InvoiceQuantityInvoice QuantityDecimalQuantity invoiced, maintained from invoice lines and split into Allocated Invoiced Quantity and OTC Invoiced Quantity.
IsILPostedIL PostedBooleanNot used on order lines.
IsILPostingApprovedIL Posting ApprovedBooleanNot used on order lines.
IsPriceBundledPrice BundledBooleanThe line is priced inside its package. Such a line cannot be saved with a unit price.
IsSchemeGeneratedScheme GeneratedBooleanTicked on lines a scheme created, such as free items, rather than lines a user entered.
ItemAliasIdItem AliasLookup → ItemAliasA customer- or partner-specific product code. It must belong to the order's partner account, or the save is refused with Item Alias is not valid.
ItemAlternateIdItem AlternateLookup → ItemAlternate
ItemComponentIdItem ComponentLookup → ItemComponentThe package component this line was created from. Set on component lines; their quantity is checked against the component's minimum, maximum and whether it may be changed.
ItemIdItemLookup → ItemYesThe item sold on the line. Optional when the line carries a Description instead, for a charge such as freight. Must be active when the line is created and needs a valid SKU when the item requires one. If the item has a Superseded alternate in force today, the line is switched to the successor and the original is kept in Original Item. On a package line or a package component line it cannot be changed after save.
ItemLotIdItem LotLookup → ItemLotA specific lot named on the line. The picker lists lots of the line's item and SKU at the order's partner account and branch. Copied to the fulfilment document line when the order is released to fulfilment, and to delivery order lines created from the order.
ItemLotTypeIdItem Lot TypeLookup → ItemLotTypeThe lot category to sell from. The picker lists only the item's lot types. Used to match price-list and tax rules, to choose lots, and to find the stock record.
ItemNameItem NameText
ItemServiceContractIdItem Service ContractLookup → ItemServiceContractNot filled on order lines by the platform.
LimitExpiryDaysLimit Expiry DaysLargeNumberShelf-life limit: when set, allocation uses only lots that expire at least this many days from today. Schemes that add free items set it from the benefit.
ModifiedByIdModified ByLookup → UserAccountYes
NameDocument NumberTextThe line's own document number, generated on save from the Order Line Document Name Setting (series SOL, a date part and a six-digit counter).
NetDiscountNet DiscountCalculated (calculated)Calculated total of the regular, cash and contract discounts. In each pair an amount above zero wins over the percentage.
NetSchemeDiscountNet Scheme DiscountCalculated (calculated)Calculated scheme discount: Scheme Discount Amount when set, otherwise Scheme Discount as a percentage of the base.
OpportunityLineIdOpportunity LineLookup → OpportunityLineThe opportunity line this line was released from. Adding, changing or deleting the line updates the opportunity line's ordered quantity.
OrderDiscountOrder DiscountCalculated (calculated)Calculated copy of the order's header Discount percentage.
OrderIdOrderLookup → OrderThe sales order the line belongs to. A new line, or a line moved to another order, is checked against that order's partner account and branch.
OriginalItemIdOriginal ItemLookupThe item the line carried before it was replaced by its superseding item. Set by the platform.
OTCInvoicedQuantityOTC Invoiced QuantityNumberThe part of Invoice Quantity invoiced over the counter, from invoice lines with no allocation line behind them.
OwnerIdOwnerLookup → UserAccountYes
PackageOrderLineIdOrder LineLookup → OrderLineOn a component line, the package line it belongs to. Changing the package line's quantity rescales its components, changing its item replaces them, and deleting it removes them.
PartnerAccountIdPartner AccountCalculatedNot maintained on order lines; the selling company is the order's Partner Account.
PendingAllocatedInvoicedQuantityPending Allocated Invoiced QuantityCalculated (calculated)Calculated: for a stock-tracked item, allocated quantity not yet invoiced; for other items, the pending invoice quantity.
PendingDeliveryQuantityPending Delivery QuantityCalculated (calculated)Calculated: Quantity minus Delivery Quantity minus Cancelled Quantity. What can still be delivered.
PendingFulfilmentAllocationQuantityPending Fulfilment Allocation QuantityCalculated (calculated)Calculated: Quantity minus Fulfilment Allocated Quantity minus Cancelled Quantity. What can still be allocated.
PendingFulfilmentOrderQuantityPending Fulfilment Order QuantityCalculated (calculated)Calculated: Quantity minus Fulfilment Order Quantity minus Cancelled Quantity. What can still be released to fulfilment or cancelled with Cancel Order.
PendingInvoiceQuantityPending Invoice QuantityCalculated (calculated)Calculated: Quantity minus Cancelled Quantity minus Invoice Quantity. What can still be invoiced; also counted as open demand by auto order unless Exclude In Auto Order is ticked.
PendingPickingQuantityPending Picking QuantityCalculated (calculated)Calculated: allocated quantity less quantity requested for picking, plus picking cancellations and returns, less quantity delivered.
PickedQuantityPicked QuantityNumberQuantity picked, maintained from the picking lines.
PickingCancelQuantityPicking Cancel QuantityNumberQuantity cancelled on picking lines, maintained from them.
PickingRequestedQuantityPicking Requested QuantityNumberQuantity requested on picking lines, maintained from them.
PickingReturnQuantityPicking Return QuantityNumberQuantity returned from picking, maintained from the picking lines.
PriceAsOnDatePrice As On DateDateThe line's pricing date. It wins over the order's Price As On Date, and changing it re-prices the line.
PriceListIdPrice ListLookup → PriceListThe price list the line is priced from, ahead of the order's price list. Changing it re-prices the line.
PriceListRuleIdPrice List RuleLookup → PriceListRuleOptional pointer to a price-list rule. Changing it re-prices the line; normal pricing writes the price without filling it.
PurchaseOrderLineIdPurchase Order LineLookup → PurchaseOrderLineThe purchase order line of another organization this line was created from by Dealer Order. Adding, changing or deleting the line updates that line's ordered quantity.
QuantityQuantityNumberYesThe ordered quantity and the base of every pending quantity. Must be above zero. Once part of the line is released to fulfilment, cancelled or returned, it cannot be reduced below that total. On a package line, changing it rescales the component lines.
QuoteLineIdQuote LineLookup → QuoteLineThe quote line this line was copied from when the order was raised from a quote.
RecordTypeIdRecord TypeGuid, hidden
RequestedQuantityRequested QuantityDecimalNot stored. The per-line quantity you enter in the dialog of a Selective action on the order.
ReturnedQuantityReturned QuantityNumberQuantity returned on credit notes against the line. It does not reopen any pending quantity.
RNAExternalIdRNA ExternalText
RNAOrderExternalIdRNA Order ExternalText
SchemeBenefitIdScheme BenefitLookup → SchemeBenefitThe scheme benefit that produced the line's scheme effect. Written by the scheme engine.
SchemeDiscountScheme DiscountPercentScheme discount percentage written by the scheme engine for a percentage benefit.
SchemeDiscountAmountScheme Discount AmountCurrencyThe line's share of an amount-type scheme benefit, written by the scheme engine.
SchemeLineIdScheme LineLookup → SchemeLineThe scheme line applied to this order line. Written by the scheme engine.
SchemeRewardPointsScheme Reward PointsLargeNumberReward points earned on this line from an applied scheme benefit. They are stamped onto the document's non-generated lines and are what the scheme ledger reads as its RewardPoints when the benefit is recorded.
SkipSchemeSkip SchemeBooleanLeaves this one line out of scheme evaluation; the rest of the order is still evaluated. Changing it evaluates the schemes again.
SKUIdSKULookup → SKUThe variant of the item. Required when the item requires a SKU, and must belong to the item; the picker lists only the item's SKUs. Used to match price, discount and tax rules and to find the stock record. Cannot be changed on a package or component line.
StockAvailableStock AvailableCalculated (calculated)Free stock of the item, SKU, lot type and storage location at the order's branch, read from the line's stock record. Read-only.
StockInHandStock In HandCalculated (calculated)Physical stock held for the line's stock record, including stock reserved for other demand. Read-only.
StorageLocationIdStorage LocationLookup → StorageLocationThe location the line draws from. Used to find the stock record, and copied to the fulfilment document line and to delivery order lines created from the order.
Tax1Tax 1Currency
Tax1NameTax Name 1Text
Tax1RateTax Rate 1Currency
Tax1TypeTax Type 1Text
Tax2Tax 2Currency
Tax2NameTax Name 2Text
Tax2RateTax Rate 2Currency
Tax2TypeTax Type 2Text
Tax3Tax 3Currency
Tax3NameTax Name 3Text
Tax3RateTax Rate 3Currency
Tax3TypeTax Type 3Text
Tax4Tax 4Currency
Tax4NameTax Name 4Text
Tax4RateTax Rate 4Currency
Tax4TypeTax Type 4Text
Tax5Tax 5Currency
Tax5NameTax Name 5Text
Tax5RateTax Rate 5Currency
Tax5TypeTax Type 5Text
Tax6Tax 6Currency
Tax6NameTax Name 6Text
Tax6RateTax Rate 6Currency
Tax6TypeTax Type 6Text
TaxAmountTax AmountCurrencyTotal of the line's tax components, worked out from the tax group. Maintained by the platform.
TaxGroupIdTax GroupLookup → TaxGroupThe tax group whose taxes are worked out on the line, resolved from the tax rules when the line is created. Changing it, or the item, SKU or quantity, works out the taxes again.
UIPropsUI PropsText
UnitPriceUnit PriceCurrencyYesPrice per unit. Filled from the matching price-list rule when the line is created; a non-zero price typed on a new line is kept. A bundled package component cannot carry a price.
UnitPrice2Unit Price 2CurrencyAn alternate unit price filled from the price-list rule. When it is above zero it replaces Unit Price in Base Amount.
UOMUOMPickListThe first unit the quantity is entered in. Must be one of the item's units. Quantity is worked out from UOM Quantity times its conversion ratio, plus the second unit. Values: Pack, Each, Box, Barrel, Litres, MB, Minutes, Messages, kWh.
UOM1UOM 1PickListThe second unit, so a quantity can be entered as, for example, cases plus pieces. Must be one of the item's units. Values: Pack, Each, Box, Barrel, Litres, MB, Minutes, Messages, kWh.
UOMQuantityUOM QuantityDecimalQuantity in the first unit.
UOMQuantity1UOM Quantity 1DecimalQuantity in the second unit.
UpdatedDateTimeModified DateDateAndTimeYes

Actions

ActionLabelTypeWhat it does
BarcodeQuickAddBarcode ScannerUIActionScan barcodes to add order lines
CloneCloneServerAction (Clone)Create a copy of this record
DeleteDeleteDeleteDelete
DeleteInListDeleteDeleteDelete in a list page
EditEditEditEdit
EditHeaderEditEditInlineEdit
EditListRowEditEditEditListRow
ImportImportUIActionList-header action that opens the ImportSO layout to bring order lines in from a file rather than entering them one by one. It is a client-side layout action with no server action behind it; the imported rows go through the normal order-line save path.
NewInLineQuick AddNewInlineLabelled 'Quick Add': adds an order line inline in the grid rather than through the full line form. The line handler still applies all its defaults on save — item alias, unit conversion, prices, taxes, discounts, stock resolution, package explosion and scheme processing — exactly as for a full-form insert.
ProductCatalogueProduct CatalogueUIActionList-header button that opens the product catalogue layout for adding lines to the order. It names no server action, so pressing it runs nothing on the server.

Validations

ValidationApplies toError messageNotes
Quantity Cancelled Rule ValidationCancelledQuantity, ErrorQuantity cancelled cannot be greater than Quantity.Quantity cancelled cannot be greater than Quantity.
Quantity Rule ValidationQuantity, ErrorQuantity should not be less than 0Quantity should not be less than 0
Track Asset Quantity ValidationQuantity, Error, inactiveQuantity cannot be greater than 1 for asset-tracked items.When Track Asset is enabled on the Item, quantity cannot exceed 1.
Unit Price Rule ValidationUnitPrice, ErrorUnit Price can not be less than 0Unit Price can not be less than 0
Validate On Incorrect Item AliasItemAliasId, ErrorItem Alias is not valid.Item Alias is not valid.

Lookup filters

FilterLookup fieldNotes
Lot for Partner and BranchItemLotId
Lot Type for ItemItemLotTypeId
Sku For ItemSKUId