Field Service Territory Planning components
Several types of components are installed with the Field Service Territory Planning feature, including tables, roles, script includes, and business rules.
Tables
| Table | Description |
|---|---|
| Territory sn_tp_territory |
Stores information about territories, such as the name of a territory. |
| Territory Condition sn_tp_territory_condition |
Stores conditions added to a territory to filter the best matched territory for a work order or work order task. |
| Territory Geography sn_tp_territory_geography |
Stores the geoJSON script information that is auto-generated when drawing a geography for the territories. |
| Territory Group sn_tp_territory_group |
Stores information about the qualification, dispatch, and assignment groups assigned to a territory. |
| Territory Membership
Override sn_tp_territory_membership_override |
Store information whether the agent or crew is primary or secondary member of the territory. |
| Territory Model sn_tp_territory_model |
Store information about the default territory model and its mapped territories and resources. |
| Territory Model Source sn_tp_territory_model_source |
Store information about the source tables mapped to the territory model, such as wm_task and wm_order. |
| Territory Manager sn_tp_territory_manager |
Stores information regarding the managers of the territory. |
Roles
| Roles | Description |
|---|---|
| Field Service Territory Edit Resource
Allocation [sn_fsm_tp.fsm_territory_edit_resource_allocation] |
Edit allocation of resources who are associated with the selected Field Service territory. |
| FSM Territory Planner [sn_fsm_tp.fsm_territory_planner] |
Create new Field Service territories along with the ability to view the existing Field Service territories, manage resource allocation in territories, and others. |
| FSM Territory Read [sn_fsm_tp.fsm_territory_read] |
View Field Service territory data. |
| FSM Territory Manager [sn_fsm_tp.fsm_territory_manager] |
Manage Field Service territories and their related information. Additionally, inherits the role of territory resource manager. |
| FSM Territory Resource Manager [sn_fsm_tp.fsm_resource_manager] |
Manage Field Service resources of territory where the logged in user has been assigned as resource manager |
Script Includes
| Script include | Description |
|---|---|
| FieldServiceTerritoryPlanning | Contains the utility functions to provide data, such as territory details, assignment groups, or others to data brokers. |
| MatchTerritoryCondition | Contains the utility functions Filter territories for work order task based on the filtering conditions used by the territory planning matching rules. |
| TerritoryFilters | Contains methods for all reference qualifiers to filter territory based on the corresponding groups, agents, crews, and parent territory. |
| TerritoryMatchingDimensionLocation | Contains the utility functions to filter territories based on the task location to be used by the Matching Rule. |
| TerritoryPlanningHelpers | Contains helper methods for overall territory planning implementation. |
| TerritoryPlanningAJAX | Ajax class that provides helper functions to verify if the territory planning plugin is active, get default model, populate territory in the work order task form, and validates the assignment group selected for a work order task. |
Business Rules
| Business Rule | Table | Description |
|---|---|---|
| Delete Agent Override | Territory Group [sn_tp_territory_group] |
Deletes the modified membership record of an agent if the corresponding group is deleted from the territory. |
| Delete Crew Member Override | Territory Group [sn_tp_territory_group] |
Deletes the modified membership record of a crew if the corresponding group is deleted from the territory. |
| Populate assignment groups | Territory Group [sn_tp_territory_group] |
Auto-populates the corresponding assignment groups when adding a dispatch group to the territory. |
| Update Territory if not matched | Work Order Task [wm_task] |
Validates and assigns the best territory for the selected assignment group if allow_assignment_override is selected. |
| Validate Qualification Group | Work Order [wm_order] |
Checks if work order has a valid qualification group. |
| Allow only unique group-territory | Territory Group [sn_tp_territory_group] |
Prevents adding a combination of duplicate groups that includes qualification, dispatcher, and assignment to a territory. |
| Allow only unique users | Territory Membership Override [sn_tp_territory_membership_override] |
Prevents the selection of duplicate user for a territory in the territory membership override table. |
| Calculate geography bounding box | Territory Geography [sn_tp_territory_geography] |
Calculates the maximum or minimum latitude and longitude value from defined territory geography GeoJSON. |
| Check and create crew membership | Work order task [wm_task] |
Creates a new territory membership record for the dynamically assigned crew when saving the work order task, setting the 'From' and 'To' dates to match the 'Effective start' and 'Effective end' dates of the crew. |
| Membership date validations | Territory Membership Override [sn_tp_territory_membership_override] |
Validates the dates entered in the From and To fields in the territory membership override table for a territory member. |
| Validate Color Field | Territory [sn_tp_territory] |
Validates the hexadecimal code for the color of a territory. |
| Validate Parent | Territory [sn_tp_territory] |
Validates the hierarchy of a parent territory. |
| Validate Source Table For Model | Territory Model Source [sn_tp_territory_model_source] |
Prevents duplicate entries for a model and source table on the territory model source. |
| Validate Territory Condition | Territory Condition [sn_tp_territory_condition] |
Prevents the creation of duplicate entries for territory conditions for a specific territory. |
| Validate territory geography name | Territory Geography [sn_tp_territory_geography] |
Prevents the creation of duplicate entries for a new territory geography. |
| Validate Territory Model Name | Territory Model [sn_tp_territory_model] |
Prevents the creation of duplicate entries for a new territory model. |
| Validate Territory Name | Territory [sn_tp_territory] |
Prevents the creation of duplicate entries for a new territory. |
| Validate User and Territory | Territory Membership
Override [sn_tp_territory_membership_override] |
Ensures the user added to the territory membership override table is associated with the territory |
Properties
| Property | Description |
|---|---|
| sn_fsm.use_query_rules | When the setting is "true", rules from the "sn_query_rule" table will control what Field Service Management-related data a user can read. This includes work orders (WO) and work order tasks (WOT). If set to
"false", these records won't be filtered based on rules, and users can access them without rule-based restrictions.
|
| sn_tp.max_coordinates_allowed | Maximum number of coordinates allowed in GeoJSON Geography. This property is read-only and is non-editable.
|
| sn_tp.percentage_overlap | Percentage value (ranging from 0 to 100) indicating the threshold for geographical overlap between territories. The default is set to 5%.
|
Query Rules
| Query rule | Description |
|---|---|
| wm task - My assigned territory | Allows admins to enable data security for agents, dispatchers, and qualifiers for work orders and work order tasks. This helps them to see the work orders and work order tasks created in their territories. Mark the WO - My territory and WOT - MY Territory tables as active. |
Scheduled Jobs
| Scheduled job | Description |
|---|---|
| Territory Planning- Calculate Overlapping Territories | Calculates the overlaps for both agents and geographies. |
| Territory Planning- Calculate Overlapping Territories - Agent | Calculates the overlaps for agents. When executed, the scheduled job triggers events to calculate the overlap between two agents. |
| Territory Planning- Calculate Overlapping Territories - Geography | Calculates the overlaps for geographies. When executed, the scheduled job triggers events to calculate the overlap between two geographies. |
Field Service Territory Planning console properties
Territory Planning console uses the following properties.
| Properties | Definition |
|---|---|
| sn_fsm_tp.territory_membership_override_to_date | Determines agent's default till date field when added to territory using the Suggested agents tab. Agents are available in the territory till the specified date. |
| sn_fsm_tp.territory_max_zoom_level | Sets the maximum auto-zoom level for the map. The valid values are between
1–20.
|
| sn_fsm_tp.overlay_markers_type | Determines to display the data such as agents and crews based on the view
port or territory.
|
| sn_fsm_tp.territory_initial_zoom | Sets the initial zoom level for the map.
|
| sn_fsm_tp.territory_transparency_level | Determines how opaque a newly created geographic area looks on the map.
|
| sn_fsm_tp.territory_map_type | Uses different types of map views to visualize territories, such as roadmap,
satellite, hybrid, and terrain.
|
| sn_fsm_tp.max_territories_for_scheduling | Determines the maximum number of territories that are ready for scheduling
work order tasks.
|
| Opacity level for heatmap on the map | Determines the opactiy of the heatmap. Valid values are between 0.0 and 1.0.
|
| Radius of influence of data points in heatmap | Determines the radius that influence the data point in the heatmap.
|