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

Visit Plan — entity reference

One rep's route execution over a date window (planStartDate..planEndDate): the container the day's Visits are generated into. On create (and on relevant updates) the handler cascades generation - one visit per stop of the linked route (visitRouteId; the stored current RouteSequence orderings are stamped onto the visits), or one per member of accountGroupId, or one per pending delivery order when visitPurpose is Order Delivery - and defaults partner, purpose and task template from the route. assignedToResourceId names the rep meant to walk it (resolved from the route's seat holder when the route is position-owned, else the route's resource) and only that rep may execute (VisitAssignmentGuard); executedByResourceId records who actually did. Setting Status to Completed cancels every child visit that is not already Completed, Cancelled or Rescheduled; settled plan statuses are Completed, Executed, Cancelled and Lapsed. planType distinguishes Order Taking (default), Van Sales and Field Service execution modes.

Fields

FieldLabelTypeRequiredWhat it does
AcceptanceStatusAcceptance StatusPickListValues: Accept, Decline, Not Sure.
AccountGroupIdAccount GroupLookup → AccountGroup
ActualPlanEndDateActual Plan End DateDateAndTime
ActualPlanStartDateActual Plan Start DateDateAndTime
AssignedToResourceIdAssigned To ResourceLookup → ResourceThe rep meant to walk the route - the identity the execution guard compares against. Auto-resolved for plans created by hand or API against a route: the route's seat holder when the route is position-owned, else the route's resource; an explicit assignee is never overridden. Salesperson-specific stored route orderings are also picked by this resource.
BranchIdBranchLookup → Branch
CityCityPickListValues: New Delhi.
CreatedByIdCreated ByLookup → UserAccountYes
CreatedDateTimeCreated DateDateAndTimeYes
EndLocationEnd LocationGeoLocationWhen set, the route optimizer treats it as the fixed endpoint of the plan's optimized visit order. Geography point, wire shape latitude/longitude.
ExecutedByResourceIdExecuted By ResourceLookup → ResourceWho actually executed the plan, as distinct from assignedToResourceId (who it was allocated to). Reported side by side in visit compliance reporting.
IdIdGuidYes
IncludePendingDeliveryCheckoutsInclude Pending Delivery CheckoutsBoolean
IncludePendingDeliveryOrdersInclude Pending Delivery OrdersBooleanYes
ItemGroupIdItem GroupLookup → ItemGroup
ModeofTransportMode of TransportPickListValues: Two Wheeler.
ModifiedByIdModified ByLookup → UserAccountYes
NameNameText
OwnerIdOwnerLookup → UserAccountYes
PartnerAccountIdPartner AccountLookup → Account
PlanEndDatePlan End DateDateAndTime
PlanNamePlanNameLongMultiLineText
PlanStartDatePlan Start DateDateAndTime
PlanTypePlan TypePickListExecution mode: Order Taking (default), Van Sales or Field Service. Van Sales / Field Service plans dispatch stock to a mobile storage location (the van) and gate plan start on the load take-in. Values: Order Taking, Van Sales, Field Service.
PostalCodePostal CodeText
RecordTypeIdRecord TypeGuid, hidden
RemarksRemarksText
RouteMethodRoute MethodPickListValues: By Map Selection, By Pincode, By Account Group.
StartLocationStart LocationGeoLocationGeography point the road-network route optimizer anchors on when the rep's current location is not supplied to OptimizeRoute. Wire shape latitude/longitude.
StateStatePickList
StatusStatusPickListPlan lifecycle. Execution states (In Progress, Started, Paused, Completed, Executed) may only be entered by the assigned resource; settled states are Completed, Executed, Cancelled and Lapsed. The transition to Completed cancels every child visit that is not already Completed, Cancelled or Rescheduled, in the same save. Values: Draft, Assigned, Started, Executed, Lapsed, Cancelled, Completed.
TotalVisitTotal VisitCalculated (calculated)total visit in a visit plan
UIPropsUI PropsText
UpdatedDateTimeModified DateDateAndTimeYes
VisitComplianceVisit ComplianceCalculated (calculated)how many visit has been completed under a visit plan
VisitPurposeVisit PurposePickListDefaulted from the route. The value Order Delivery is load-bearing: it makes plan generation create visits from pending, undelivered delivery orders matching the plan's branch, partner and date window. Values: Order Capture, Courtesy Visit, Order Delivery, Field Service, Product Demo, Service Touch, Payment Collection.
VisitRouteGroupIdVisit Route GroupLookup → VisitRouteGroup
VisitRouteIdVisit RouteLookup → VisitRoute
VisitTaskTemplateIdVisit Task TemplateLookup → VisitTaskTemplate

Actions

ActionLabelTypeWhat it does
ApplySequenceToPlanApply Sequence To PlanServerAction (ApplySequenceToPlan), inactiveStamps this plan's visits with a stored RouteSequence's ordering as the new PLANNED order: rewrites sequenceNumber and plannedSequence, compacted to 1..n over the plan's visits, with visits whose stop is not in the sequence trailing in their current order. Args: routeSequenceId (required guid). Returns the count of visits re-sequenced.
BulkDeleteDeleteDeleteDelete the selected records.
ClearRouteClear RouteUIAction, inactiveClear Route
CloneCloneServerAction (Clone), inactiveCreate a copy of this record
ConfigureRouteConfigure RouteUIAction, inactiveConfigure Route
DeleteDeleteDeleteDelete
DeleteInListDeleteDeleteDelete in a list page
EditEditEditEdit
EditInLineEditEditInlineEdit in page.
EditInListEditEditEdit In List Header
EditListHeaderEditEditInlineEditListHeader
GetAllVisitsView All VisitsServerAction (GetAllVisits)Read-only fetch of every Visit belonging to this plan, each returned with its account and task template embedded - the data source behind the plan's all-visits view. Modifies nothing.
NewNewNewNew
OptimiseRouteOptimise RouteServerAction (OptimizeRoute)Optimise Route

Lookup filters

FilterLookup fieldNotes
Branch For Partner AccountBranchId