xMatix
Sign in Request demo
xMatix
PRODUCTS
SalesField SalesCRMRewardsClaimsInventoryProcurementWarehouse 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
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

The customer sales order and the head of the order-to-cash chain: a header (customer account, branch, partner and supplier accounts, addresses, price list, header taxes) with OrderLine children. Nothing downstream is produced by changing Status — every stage is an explicit server action gated on per-line pending-quantity counters: PerformReleaseFulfilment creates an InventoryFulfilment, PerformAllocation reserves stock lots, PerformPicking creates picking lines, PerformReleaseDelivery / AllocationDelivery / PickedDelivery create a DeliveryOrder, and PerformReleaseInvoice / PerformReleaseInvoiceAllocatedLines create an Invoice. Lines are copied in automatically when the order is inserted with a QuoteId or OpportunityId, or pulled from a linked PurchaseOrder in the dealer flow; line prices come from PriceListRule resolution against priceListId, and the promotion (scheme) engine evaluates the document unless SkipScheme is set.

Fields

FieldLabelTypeRequiredWhat it does
AccountIdAccountLookup → AccountYesThe customer the order is raised on. It is locked after creation, is required before GetOpenDocuments will run, and forms the party pair with PartnerAccountId for the credit-limit check.
AccountNameAccount NameText
AccountPhonePhoneText
AdjustedAdvanceAmountAdjusted Advance AmountCurrency
AdvanceAmountAdvance AmountCurrencyAdvance or deposit taken against the order. TotalOrderAmount minus this gives the calculated OpenAmount, and AdjustedAdvanceAmount records how much of it has since been consumed.
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 → BranchOperating branch of the order. It is validated against PartnerAccountId (the branch must belong to that partner) on both insert and update, and it cannot be changed once the order exists.
ContactIdContactLookup → Contact
ContactNameContact NameText
ContactNumberContact NumberText
CreatedByIdCreated ByLookup → UserAccountYes
CreatedDateTimeCreated DateDateAndTimeYes
DiscountDiscountNumberHeader discount percentage. Changing it on a saved order pushes the value down onto every OrderLine.OrderDiscount, and a new line copies a non-zero value into its own Discount — the header field itself does not reduce the totals directly.
DiscountGroupIdDiscount GroupLookup → DiscountGroupDiscount group used to resolve rule-based line discounts; a default is set by the discount-group service when the order is inserted. The rule matched for each line is recorded on OrderLine.DiscountGroupRuleId.
DocumentDateDocument DateDateStamped with the current date and time when the order is created, and then locked — the handler rejects any later change to DocumentDate, AccountId or BranchId.
ExecutiveIdExecutiveLookup → ResourceLabelled 'Executive': the Resource (sales or field person) attached to the order. The resource service validates it on both insert and update, so an unmatched or ineligible resource is rejected at save.
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 to true only by the purchase-order service when it generates this order as a dealer order from a PurchaseOrder. It is not set by the order's own PerformCreateDealerOrder action, which instead pulls purchase order lines into an order that already exists.
IsDeliveryReleasedDelivery ReleasedBooleanDeclared as a system flag that users are blocked from editing, but no code path in the platform ever writes it, so in practice it stays empty. Judge delivery progress from PendingDeliveryQuantity 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 ReleasedBooleanDeclared as a system flag that users are blocked from editing, but no code path in the platform ever writes it, so in practice it stays empty. Judge invoicing progress from PendingInvoiceQuantity 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 calculated sum of OrderLine.Amount, i.e. line values after line-level discounts but before header round-off. It is not the grand total — TotalOrderAmount sums GrossAmount and so includes line tax.
MobileMobileText
ModeOfPaymentMode Of PaymentPickList
ModifiedByIdModified ByLookup → UserAccountYes
NameDocument NumberText
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 → OpportunitySource opportunity. On insert, and only when QuoteId is empty, the opportunity's lines are copied into OrderLines automatically; if both are set the quote wins and the opportunity is ignored.
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, not entered: LineSubTotal + TotalTaxAmount2 - AmountPaid - FinanceAmount. It is a different measure from OpenAmount (TotalOrderAmount - AdvanceAmount) — outstanding nets tax, cash received and finance, while open nets only the advance.
OwnerIdOwnerLookup → UserAccountYes
PartnerAccountIdPartner AccountLookup → AccountThe selling party in multi-party dealer and distributor flows, validated against BranchId. Together with AccountId it identifies the pair whose credit limit is checked when the order is created.
PendingDeliveryQuantityPending Delivery QuantityCalculated (calculated)
PendingFulfilmentAllocationQuantityPending Fulfilment Allocation QuantityCalculated (calculated)
PendingFulfilmentQuantityPending Fulfilment QuantityCalculated (calculated)Pending Fulfillment Quantity
PendingInvoiceQuantityPending Invoice QuantityCalculated (calculated)
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 DateDate
PriceListIdPrice ListLookup → PriceList
PromisedDatePromised DateDate
PurchaseOrderIdPurchase OrderLookup → PurchaseOrder
QuoteIdQuoteLookup → QuoteSource quote. When an order is inserted with this set, the platform copies that quote's lines into OrderLines automatically — item, quantity, unit prices, discounts, tax group, SKU and lot type — so the lines should not be created by hand as well.
RecordTypeIdRecord TypeGuid, hidden
RemarkRemarkText
RequiredDateTentative Buying DateDateStored as RequiredDate but labelled 'Tentative Buying Date' — the customer's expected purchase date rather than a delivery commitment. PromisedDate is the separate commitment field.
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 SchemeBoolean
SourceOfSupplySource of SupplyPickListValues: Maharashtra, Gujarat, Rajasthan, Haryana.
StatusStatusPickListValues: 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 TypePickListValues: 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)Calculated sum of OrderLine.NetDiscount — the resolved value of the regular, cash and contract discount pairs on the lines. Promotion value is excluded and rolls up separately into TotalSchemeDiscountAmount.
TotalLineBaseAmountTotal Line Base AmountCalculated (calculated)
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)
TotalSchemeDiscountAmountTotal Scheme AmountCalculated (calculated)Labelled 'Total Scheme Amount': the calculated sum of OrderLine.NetSchemeDiscount, i.e. the promotion-engine discount on the lines, deliberately kept apart from TotalDiscountAmount.
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. When such an order is inserted the platform also writes this order's id back onto the Visit, so visit and order reference each other.
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