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 — entity reference
REFERENCE · Last reviewed

Order — entity reference

A sales order records what a customer has agreed to buy: the customer account, the selling partner account and branch, the executive, addresses and pricing context, with one order line per item. It appears in the Sales app (and Commerce) and on the mobile app, where field representatives take orders on visits with Take Order. It is created directly, from a quote (once per quote), from an opportunity (repeatable for pending quantity), on a visit, or as a dealer order from another organization's purchase order. It is numbered from document numbering (shipped series SO, separator -, date DDMMYYYY, six digits). Account, Branch and Document Date are locked once saved. Fulfilment, allocation, picking, delivery and invoicing are separate actions, each drawing only on a per-line pending quantity. Status starts at Draft and is moved by shipped business rules on save; Document State records the last action that succeeded. Cancel Order cancels the unreleased remainder. Step-by-step procedures are on the Creating and managing sales orders page of the Sales documentation.

Fields

FieldLabelTypeRequiredWhat it does
AccountIdAccountLookup → AccountYesThe customer. Only active customer accounts can be picked. Locked once saved. Together with the partner account it identifies the credit limit checked when the order is first saved.
AccountNameAccount NameText
AccountPhonePhoneText
AdjustedAdvanceAmountAdjusted Advance AmountCurrencyHow much of the advance has since been used.
AdvanceAmountAdvance AmountCurrencyAdvance or deposit taken against the order. Open Amount is Total Amount less this.
AllocatedQuantityAllocated QuantityCalculated (calculated)Order-level roll-up of OrderLine.FulfilmentAllocatedQuantity: how much of the order has been reserved against specific stock lots by the allocation actions.
AmountPaidAmount PaidCurrencyCash recorded as received against the order. It appears in two calculated fields: OutstandingAmount subtracts it (together with FinanceAmount) from the line subtotal plus tax, and TotalCreditAmount is AmountPaid minus FinanceAmount.
BillingAddressBilling AddressText
BillingCityBilling CityPickListValues: Pune, Chandigarh, Mumbai.
BillingCityPlaceIdBilling CityLookup → Place
BillingContactAddressIdBilling AddressLookup → ContactAddress
BillingCountryBilling CountryPickListValues: India.
BillingPostalCodeBilling Postal CodeText
BillingRegionBilling RegionText
BillingStateBilling StatePickListValues: Haryana, Maharashtra, New Delhi, Punjab.
BillingStreetBilling StreetTextBilling
BookingAmountBooking AmountCurrency
BranchIdBranchLookup → BranchThe location the order is sold from. Must be active and belong to the partner account, and is required when the partner account has branches. Locked once saved.
ContactIdContactLookup → ContactThe customer contact. Limited to the account's contacts and filled from the account's default contact when left empty.
ContactNameContact NameText
ContactNumberContact NumberText
CreatedByIdCreated ByLookup → UserAccountYes
CreatedDateTimeCreated DateDateAndTimeYes
DiscountDiscountNumberA header discount percentage. Changing it copies the value to every line as Order Discount. Not on the shipped forms.
DiscountGroupIdDiscount GroupLookup → DiscountGroupThe discount group line discounts come from. A matching group for the partner account, branch and account groups is set on save.
DocumentDateDocument DateDateThe order's business date, stamped with the current date and time on save. A future date is set back to now. Locked once saved.
ExecutiveIdExecutiveLookup → ResourceLabelled Executive: the sales person responsible for the order. Required on the shipped web form and must be an active resource allowed to sell for the order's partner account and branch.
ExternalIdExternalText, unique
FinanceAmountFinance AmountCurrencyThe financed portion of the order. It is the amount the credit-limit check weighs when the order is created (FinanceAmount, falling back to TotalOrderAmount), and it is subtracted in both OutstandingAmount and TotalCreditAmount, so a non-zero value reduces what the order counts as still owed in cash.
FulfilmentOrderQuantityFulfilment Order QuantityCalculated (calculated)Order-level roll-up of OrderLine.FulfilmentOrderQuantity: quantity already placed on an inventory fulfilment. PendingFulfilmentQuantity is the remainder still to be released.
FulfilmentReleasedFulfilment ReleasedBooleanMetadata-only field with no counterpart in the platform: neither the Order domain type nor the schema created by the platform migration has a column of this name.
GSTINGSTINText
IdIdGuidYes
IsDealerOrderCreatedDealer Sale Order CreatedBooleanSet when the order was created as a dealer order from another organization's purchase order.
IsDeliveryReleasedDelivery ReleasedBooleanLegacy flag; not maintained by the release actions. Read Pending Delivery Quantity or Document State instead.
IsILPostedIL PostedBoolean
IsInJobQueueIn Job QueueBooleanA boolean column on the order that no code in the platform reads or writes; it does not indicate whether an asynchronous action for this order is queued or running.
IsInvoiceReleasedInvoice ReleasedBooleanLegacy flag; not maintained by the release actions. Read Pending Invoice Quantity or Document State instead.
IsKPICalculatedKPI CalculatedBoolean
JobQueueIdJob QueueLookupMetadata-only field with no counterpart in the platform: the Order domain type and the schema created by the platform migration have no JobQueueId column. Asynchronous processing of an order is tracked by the platform's own job ledger, not by a field on the order.
LineSubTotalTotal Line AmountCalculated (calculated)Labelled Total Line Amount: the sum of line amounts after discounts, before tax.
MobileMobileText
ModeOfPaymentMode Of PaymentPickList
ModifiedByIdModified ByLookup → UserAccountYes
NameDocument NumberTextThe order's document number, generated on save from the Order Document Name Setting. The shipped format is SO, a hyphen, the document date as DDMMYYYY, a hyphen and a six-digit counter that restarts each day.
OpenAdvanceAmountOpen Advance AmountCalculated (calculated)Calculated as AdvanceAmount minus AdjustedAdvanceAmount: advance money held on the order that has not yet been applied to anything.
OpenAmountOpen AmountCalculated (calculated)
OpportunityIdOpportunityLookup → OpportunityThe opportunity the order was raised from. Each run of the opportunity's Order action creates a new order for the quantity still pending on its lines.
OTCInvoicedQuantityOTC Invoiced QuantityCalculated (calculated)Order-level roll-up of OrderLine.OTCInvoicedQuantity: quantity invoiced over the counter, meaning through invoice lines with no allocation line behind them, as opposed to allocation-backed invoicing.
OutstandingAmountOutstanding AmountCalculated (calculated)Calculated: Total Line Amount plus tax, less Amount Paid and Finance Amount. The Payment button in the Amount Summary shows while it is above zero.
OwnerIdOwnerLookup → UserAccountYes
PartnerAccountIdPartner AccountLookup → AccountYour selling company. Required on save and must be active; only active partner accounts can be picked. It scopes stock, credit and numbering for the order.
PendingDeliveryQuantityPending Delivery QuantityCalculated (calculated)Quantity still to be delivered over all lines.
PendingFulfilmentAllocationQuantityPending Fulfilment Allocation QuantityCalculated (calculated)Quantity of stock-tracked items still to be allocated. The allocation buttons show while it is above zero.
PendingFulfilmentQuantityPending Fulfilment QuantityCalculated (calculated)Pending Fulfillment Quantity
PendingInvoiceQuantityPending Invoice QuantityCalculated (calculated)Quantity still to be invoiced over all lines. The invoice buttons show while it is above zero.
PerformCreateDealerOrderPerform Create Dealer Sale OrderBoolean
PerformInventoryPostingPerform Inventory PostingBoolean
PerformKPICalculationPerform KPI CalculationBoolean
PerformReleaseDeliveryPerform Release DeliveryBoolean
PerformReleaseFulfilmentPerform Release FulfilmentBooleanA stored boolean, not a trigger. The same is true of the other Perform* booleans on this entity.
PerformReleaseInvoicePerform Release InvoiceBooleanA stored boolean, not a trigger. Invoicing is started by invoking the server action of the same name; no code in the platform reads this field.
PerformReleaseInvoiceAllocatedLinesPerform Release Invoice Allocated LinesBoolean
PerformRepricePerform RepriceBoolean
PickedQuantityPicked QuantityCalculated (calculated)Order-level roll-up of OrderLine.PickedQuantity: quantity confirmed picked in the warehouse, one stage beyond allocation.
PlaceOfSupplyPlace of SupplyPickListValues: Maharashtra, Gujarat, Rajasthan, Haryana.
PriceAsOnDatePrice As On DateDateThe date prices are taken from. Changing it re-prices every line from the price list in force on that date.
PriceListIdPrice ListLookup → PriceListThe price list the lines are priced from. When left empty, a sale price list matching the partner account, branch and the customer's account groups is chosen on save.
PromisedDatePromised DateDate
PurchaseOrderIdPurchase OrderLookup → PurchaseOrderThe purchase order of another organization on the platform that this order was created from as a dealer order.
QuoteIdQuoteLookup → QuoteThe quote the order was created from. The quote's lines are copied in with their prices, discounts, tax group, SKU and lot type. A quote can create only one order.
RecordTypeIdRecord TypeGuid, hidden
RemarkRemarkText
RequiredDateTentative Buying DateDateLabelled Tentative Buying Date: the customer's expected purchase date. Not on the shipped forms.
RnaExternalIdRnaExternalLongMultiLineText
RoundOffRound OffCurrency
SampleTestSampleTestBoolean
ShippingAddressShipping AddressText
ShippingCityShipping CityPickListValues: Pune, Mumbai, Chandigarh.
ShippingCityPlaceIdShipping CityLookup → Place
ShippingContactAddressIdShipping AddressLookup → ContactAddress
ShippingCountryShipping CountryPickListValues: India.
ShippingPostalCodeShipping Postal CodeText
ShippingRegionShipping RegionText
ShippingStateShipping StatePickListValues: Haryana, Maharashtra, New Delhi, Punjab.
ShippingStreetShipping StreetText
SkipSchemeSkip SchemeBooleanTurns off automatic trade-scheme evaluation for the whole order. Changing it re-runs scheme evaluation.
SourceOfSupplySource of SupplyPickListValues: Maharashtra, Gujarat, Rajasthan, Haryana.
StatusStatusPickListThe order's stage, Draft by default. Shipped business rules set Fulfilment, Invoicing, Delivery or Closed on save when nothing is left to allocate, invoice or deliver (Closed when nothing is left to deliver or invoice). A manual change to a stage the quantities do not support is refused. Actions such as Cancel Order do not set Status. Values: Draft, Pending Approval, Approved, Fulfilment, Invoicing, Delivery, Closed, Rejected.
SupplierAccountIdSupplier AccountLookupSupplying party on the order, used to scope dealer and distributor documents. Note that the metadata field carries no lookup relation even though the domain model links it to Account, so it will not behave as a lookup in generic tooling.
Tax1Tax 1CurrencyHeader-level tax slot (with Tax1Name, Tax1Rate and Tax1Type alongside it), stamped by the tax-group service on insert and whenever TaxGroupId, TaxId or TCSEligibleAmount changes. It is excluded from TotalTaxAmount2, which is TotalLineTaxAmount minus this value.
Tax1NameTaxName1Text
Tax1RateTaxRate1Currency
Tax1TypeTaxType1Text
TaxGroupIdTax GroupLookup → TaxGroup
TaxIdTaxLookup → Tax
TaxSupplyTypeTax Supply TypePickListWithin State or Outside State. Used to pick each line's tax group from the tax rules. Values: Within State, Outside State.
TCSEligibleAmountTCS Eligible AmountDecimalBase amount the header-level tax is computed on. Changing it re-runs the header tax stamping, exactly as changing TaxGroupId or TaxId does.
TotalCreditAmountTotal Credit AmountCalculated (calculated)Calculated as AmountPaid minus FinanceAmount, i.e. the part of what was received that was not financed. It is not a credit limit and not a credit-note total.
TotalDiscountAmountTotal Discount AmountCalculated (calculated)The sum of line discounts, excluding scheme discounts.
TotalLineBaseAmountTotal Line Base AmountCalculated (calculated)Quantity times unit price over all lines, before discounts, excluding discounted-item lines.
TotalLineGrossAmountTotal Line Gross AmountCalculated (calculated)Calculated sum of OrderLine.GrossAmount. TotalOrderAmount is defined by the identical expression, so the two fields always carry the same number.
TotalLineTaxAmountTotal Line Tax AmountCalculated (calculated)Calculated sum of OrderLine.TaxAmount across all six per-line tax slots. TotalTaxPostingAmount uses the same expression, and TotalTaxAmount2 is this figure less the header-level Tax1.
TotalOrderAmountTotal AmountCalculated (calculated)Labelled Total Amount: the order total including line tax.
TotalSchemeDiscountAmountTotal Scheme AmountCalculated (calculated)Labelled Total Scheme Amount: the sum of scheme discounts on the lines.
TotalTaxAmount2Total Tax AmountCalculated (calculated)Labelled simply 'Total Tax Amount' but calculated as TotalLineTaxAmount minus Tax1 — line taxes excluding the header-level tax component. This is the tax term used inside OutstandingAmount.
TotalTaxPostingAmountTotal Tax Posting AmountCalculated (calculated)
TransactionTypeTransaction TypePickList
UIPropsUI PropsText
UpdatedDateTimeModified DateDateAndTimeYes
VisitIdVisitLookup → VisitThe field visit the order was taken on. The visit is linked back to its first order.
VisitPlanIdVisit PlanLookup → VisitPlan
VisitRouteIdVisit RouteLookup → VisitRoute

Actions

ActionLabelTypeWhat it does
AllocationDeliveryAllocation DeliveryServerAction (AllocationDelivery)Create allocation Delivery
ApplyPackageConfigurationApply Package ConfigurationServerAction (ApplyPackageConfiguration)Writes a package configuration onto one order line: it requires LineId plus a non-empty components array of ItemComponentId, Quantity and IsSelected entries, and rejects the call if either is missing. Entries without an item component id are dropped, and the surviving selections are applied to that line's exploded component lines.
ApplySchemeApply SchemeServerAction (ApplyScheme)Apply Scheme
AutoAllocationAuto AllocationServerAction (PerformAllocation)PerformAllocation
BarcodeScannerBarcodeScannerUIActionBarcodeScanner
BulkDeleteDeleteDeleteDelete the selected records.
BulkOrderProcessingBulk OrderServerAction (BulkOrderProcessing)Bulk Order Processing
CancelAllocationCancel AllocationServerAction (CancelAllocation)CancelAllocation
CancelOrderCancelServerAction (CancelOrder)Cancel all pending quantities.
CancelPickingCancel PickingServerAction (CancelPicking), inactiveCancelPicking
CloneCloneServerAction (Clone)Create a copy of this record
DeleteDeleteDeleteDelete
DeleteInListDeleteDeleteDelete in a list page
EditEditEditEdit
EditInLineEditEditInlineDelete in page.
EditInListEditEditInlineEdit In List Header
EditListRowEditEditEditListRow
GetAvailableLotsGet Available LotsServerAction (GetAvailableLots)GetAvailableLots
GetBenefitDetailsGet Benefit DetailsServerAction (GetBenefitDetails)Read-only: looks up one scheme benefit by the required benefitId argument and returns its name, discount amount, discount percent and discounted-item quantity. It changes neither the order nor the benefit.
GetConfigurableItemsGet Configurable ItemsServerAction (GetConfigurableItems)Read-only: returns the configurable package items among this order's lines so the client can present a configuration dialogue. Nothing is created or changed.
GetOpenDocumentsGet Open DocumentsServerAction (GetOpenDocuments)GetOpenDocuments
GetPackageConfigurationGet Package ConfigurationServerAction (GetPackageConfiguration)Read-only: returns the component options and current selections for one order line, whose id must be supplied as LineId — the call is rejected without it. Options are resolved for the order's PartnerAccountId, so the same package can offer different components to different partners.
GetPaymentAmountSummaryGet Payment AmountSummaryServerAction (GetPaymentAmountSummary)GetPaymentAmountSummary
GetQualifiedBenefitsGet Qualified BenefitsServerAction (GetQualifiedBenefits)Read-only: returns the benefits available for a given set of item groups, which must be supplied as a non-empty itemGroupIds array or the call is rejected. It is used to populate a choose-your-benefit picker before ApplyScheme is called.
GetQualifiedSchemeSlabsGet Qualified Scheme SlabsServerAction (GetQualifiedSchemeSlabs)Read-only: returns the scheme lines (slabs) the document currently qualifies for, evaluated against its own lines. It applies nothing — ApplyScheme is what commits a chosen slab.
GetSchemeRecommendationsGet Scheme RecommendationsServerAction (GetSchemeRecommendations)GetSchemeRecommendations
ListPreviewPreviewPreviewPreview the list.
ManualAllocationManual AllocationServerAction (ManualAllocation)ManualAllocation
NewNewNewNew
PaymentPaymentServerActionDespite being typed as a server action it carries no server action name; it opens the Payment layout against the order so the receipt is recorded in that form. Reading the order's payment position is done with GetPaymentAmountSummary instead.
PerformAllocationManual AllocationUIAction (PerformAllocation)Creates Allocation lines
PerformInventoryPostingPost InventoryServerAction (PerformInventoryPosting)Perform Inventory Posting
PerformPickingPickingServerAction (PerformPicking), inactiveCreates Picking Lines
PerformReleaseDeliveryDeliveryServerAction (PerformReleaseDelivery)Release Delivery
PerformReleaseFulfilmentFulfilmentServerAction (PerformReleaseFulfilment)This action will be used to create inventory fulfilment to reserve the item stock
PerformReleaseFulfilmentAndAllocateFulfilment and Auto AllocateServerAction (PerformReleaseFulfilmentAndAllocate)Release Fulfilment and Auto Allocate
PerformReleaseInvoiceInvoice ( OTC )ServerAction (PerformReleaseInvoice)Release Invoice
PerformReleaseInvoiceAllocatedLinesInvoiceServerAction (PerformReleaseInvoiceAllocatedLines)Release Invoice AllocatedLines
PerformRepriceRepriceServerAction (PerformReprice)Perform Reprice
PickedDeliveryPicked DeliveryServerAction (PickedDelivery), inactiveCreate Picking delivery
PreviewPreviewPreviewPreview for the document
ProductCatalogueProduct CatalogueServerActionOpens the Product Catalogue layout for adding items to the order. It carries no server action name, so nothing is executed on the server when the button is pressed.
ProductConfiguratorProduct ConfiguratorUIAction (ProductConfigurator)A client-side action that opens the Product Configurator layout.
ResetSchemeReset SchemeServerAction (ResetScheme)Reset Scheme
RowPrintPrintPrint, inactivePrint in row.
SelectiveAllocationSelective AllocationServerAction (SelectiveAllocation), inactiveSelectiveAllocation
SelectiveAllocationDeliverySelective Allocation DeliveryServerAction (SelectiveAllocationDelivery)Creates a DeliveryOrder from specific allocation lines, supplied as an InventoryFulfilmentAllocationLines argument. It is refused when the chosen lines have no pending delivery quantity, and also when picking lines already exist for them — in that case Picked Delivery is the correct action.
SelectiveCancelAllocationSelective Cancel AllocationServerAction (SelectiveCancelAllocation)Cancels specific allocation lines, supplied as an InventoryFulfilmentAllocationLines argument, releasing the stock those lines had reserved. Only lines with an allocated quantity above zero are eligible, and each requested quantity is validated against the line's eligible return quantity.
SelectiveCancelPickingSelective Cancel PickingServerAction (SelectiveCancelPicking), inactiveCancels specific picking lines, supplied as an InventoryFulfilmentPickingLines argument. It reverses the pick only — the underlying allocation stays in place — and only lines with a picked quantity above zero are eligible.
SelectiveDeliverySelective DeliveryServerAction (SelectiveDelivery)Selective Delivery
SelectiveFulfilmentSelective FulfilmentServerAction (SelectiveFulfilment)Selective Fulfilment
SelectiveFulfilmentandAutoAllocateSelective Fulfilment and Auto AllocateServerAction (SelectiveFulfilmentAndAllocate)Runs fulfilment release and immediate allocation for caller-picked lines only: an OrderLines argument of Id and RequestedQuantity pairs, where a requested quantity of 0 falls back to the line's PendingFulfilmentOrderQuantity. Note that the action's stored name differs from the server action it invokes, which is SelectiveFulfilmentAndAllocate.
SelectiveInvoiceOTCSelective Invoice OTCServerAction (SelectiveInvoiceOTC)Selective Invoice OTC
SelectivePickedDeliverySelective Picked DeliveryServerAction (SelectivePickedDelivery), inactiveCreates a DeliveryOrder from specific picking lines, supplied as an InventoryFulfilmentPickingLines argument, each capped by its RequestedQuantity. An empty list, or ids that match no picking line, is rejected rather than treated as all.
SelectivePickingSelective PickingServerAction (SelectivePicking), inactiveSelectivePicking
SelectiveReleaseInvoiceAllocatedLineSelective InvoiceServerAction (PerformReleaseInvoiceAllocatedLines)Selective Release For Invoice

Validations

ValidationApplies toError messageNotes
Booking Amount ValidationErrorThe 'Total Amount' received against this order is not enough to cover the 'Booking Amount'This rule verifies that the Booking Amount defined for the order has been received before the order can be confirmed.
DMS Credit Check ValidationErrorThe 'Outstanding Amount' against this order is above the defined 'Credit Limit' of the Account.This rule validates that the total outstanding amount for the order is less than the allowed credit limit.

Lookup filters

FilterLookup fieldNotes
Branch For Partner AccountBranchId
Contact for AccountContactIdContactforAccount
Customer Account FilterAccountId
Discount Group ActiveDiscountGroupId
Executive FilterExecutiveId
Partner Account FilterPartnerAccountId