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

Field Sales — entity reference

The van-sales (field sales) run document: one record per van journey, tying the executing rep, the van (StorageLocationId, a mobile StorageLocation) and the depot it draws from (SourceStorageLocationId) to a visit plan and a set of stock lines. It has no server actions - the whole lifecycle is driven by five boolean 'Perform' flags that the save pipeline reacts to: releasing the load creates an outward depot-to-van Transfer and sets status Released; the rep's take-in creates an inward Transfer for the received quantities, sets status TakenIn and stamps TakenInDateTime, and queues an invoice-processor job; releasing the unload creates the inward van-to-depot Transfer for the checked-in quantities and sets status Reconciled with ReconciledDateTime; releasing the visit plan creates a linked Van Sales VisitPlan. Cash settlement is tracked on the header - CashExpected is rolled up from the run's invoice collections, CashReceived and CashDiscrepancyReason are entered at reconciliation. Inventory itself is posted by the generated Transfer documents, not by this record.

Fields

FieldLabelTypeRequiredWhat it does
AccountGroupIdAccount GroupLookupScoping a van run to a set of outlets is done through the linked visit plan and route, not here.
BranchIdBranchLookup
CashDiscrepancyReasonCash Discrepancy ReasonText
CashExpectedCash ExpectedCurrencyWhat the rep should hand in at day end. It is not typed: the day-end rollup overwrites it with the sum of the adjusted amounts of the invoices raised on the run, so it is a computed figure that any manual edit will be discarded on the next rollup.
CashReceivedCash ReceivedCurrencyWhat the dispatcher actually took at reconciliation, entered by hand. The platform records it beside CashExpected but does not compare them or raise anything on a shortfall - explaining a gap is the purpose of CashDiscrepancyReason.
CreatedByIdCreated ByLookup → UserAccountYes
CreatedDateTimeCreated DateDateAndTimeYes
DocumentDateDocument DateDate
ExecutiveResourceIdExecutive ResourceExternalIdThe rep executing the van run; it is what the generated visit plan is assigned to and executed by. Distinct from the record's owner.
IdIdGuidYes
IsLoadReleasedIs Load ReleasedBooleanYes
IsPlanReleasedIs Plan ReleasedBooleanYes
IsUnloadReleasedIs Unload ReleasedBooleanYes
ModifiedByIdModified ByLookup → UserAccountYes
NameDocument NumberTextYesThe run's document number, auto-numbered from the tenant's document-name settings. It is also the stem of every artefact the run generates - the load, take-in and unload transfers and their lines are all named from it, which is how they can be traced back to the run.
OwnerIdOwnerLookup → UserAccountYes
PartnerAccountIdPartner AccountLookup → Account
PerformLoadPerform LoadBooleanYesThe rep's confirmation that stock is physically on the van: on save it creates an inward Transfer for each line's received quantity carrying the take-in damage, shortage and excess figures, sets status to TakenIn, stamps TakenInDateTime, queues the invoice-processor job, and clears itself. Despite the name it is the take-in step, not the dispatcher's release.
PerformReleaseLoadPerform Release LoadBooleanYesSetting this true is what dispatches the run: on save the platform creates an outward depot-to-van Transfer for the planned line quantities, sets the run's status to Released, marks IsLoadReleased and clears this flag again. If van capacity checking is set to block and the load exceeds the van, the whole save fails and nothing is released; in warn mode it releases anyway and stamps the overload onto the transfer's label.
PerformReleaseUnloadPerform Release UnloadBooleanYesThe dispatcher's day-end return: on save it creates an inward van-to-depot Transfer for each line's check-in received quantity with the check-in damage, shortage and excess figures, sets status to Reconciled, stamps ReconciledDateTime, marks IsUnloadReleased and clears itself.
PerformReleaseVisitPlanPerform Release Visit PlanBooleanYesCreates the linked visit plan for the run - a fully formed plan named after the run and dated to its document date, typed as a van-sales plan and assigned to the executive resource - then links it, marks IsPlanReleased and clears itself.
PerformUnloadPerform UnloadBooleanYesTriggers the cash and sales rollup at day end: the run's invoice collections are written onto its FieldSalesInvoice rows and totalled into CashExpected, and sold quantities are accumulated from the invoice lines onto the matching FieldSalesLines. Unlike the other four trigger flags this one is never reset to false by the handler, so it stays set after firing and re-fires on any later save of the record.
ReconciledDateTimeReconciled AtDateAndTime
RecordTypeIdRecord TypeGuid, hidden
ResourceIdResourceLookupThe rep on the run is ExecutiveResourceId, which is the field that actually persists and flows into the generated visit plan.
SourceStorageLocationIdSource Storage LocationExternalIdThe depot the load is drawn from: the source of the outward load transfer and the destination of the unload transfer, the mirror of StorageLocationId which is the van.
StatusStatusPickListWhere the run has got to. The service writes exactly four values in sequence - Draft, Released, TakenIn and Reconciled - as the trigger flags fire. The seeded picklist offers a different vocabulary (loaded, unloaded, draft) that does not match what the code writes, so filter on the values above rather than on the option list. Values: Loaded, Unloaded, Draft.
StorageLocationIdStorage LocationLookupThe van itself, modelled as a mobile StorageLocation - it is the destination of the load transfer and the source of the unload transfer, and its declared weight and volume capacity are what the capacity check measures the planned load against. The depot the stock comes from is SourceStorageLocationId, not this.
TakenInDateTimeTaken In AtDateAndTime
TypeTypePickListValues: Van Delivery, Ready Stock Sales, Pre-Bill.
UIPropsUI PropsText
UpdatedDateTimeModified DateDateAndTimeYes
VisitPlanIdVisit PlanLookup
VisitRouteGroupIdVisit Route GroupLookup
VisitTaskTemplateIdVisit Task TemplateLookup

Actions

ActionLabelTypeWhat it does
BulkDeleteDeleteDeleteDelete the selected records.
CloneCloneServerAction (Clone)Create a copy of this record
DeleteDeleteDeleteDelete
DeleteInListDeleteDeleteDelete in a list page
EditEditEditEdit
EditInLineEditEditEdit in page.
NewNewNewNew