{ "sections": [ "title", "description", "fields", "special_access_rules", "usage", "associated_objects", "wsdl_segment", "field_reference" ], "title": "ServiceTerritory - Data API", "description": "Represents a geographic or functional region in which work can be performed in Field Service, Salesforce Scheduler, or Workforce Engagement. This object is available in API version 38.0 and later.", "fields_columns": [ "type", "properties", "description", "relationship_name", "relationship_type", "refers_to" ], "fields": { "Address": { "type": "address", "properties": "Filter", "description": "An address to associate with the territory. For example, you can list the address of the territory’s headquarters." }, "AvgTravelTime": { "type": "int", "properties": "Create, Filter, Group, Nillable, Sort, Update", "description": "The average travel time for this service territory. The value is added to the Work Capacity Usage for each scheduled service appointment in the service territory. Available in API version 59.0 and later." }, "City": { "type": "string", "properties": "Create, Filter, Group, Nillable, Sort, Update", "description": "The city of the associated address. Maximum length is 40 characters." }, "Country": { "type": "string", "properties": "Create, Filter, Group, Nillable, Sort, Update", "description": "The country to associate with the territory. Maximum length is 80 characters." }, "Description": { "type": "textarea", "properties": "Create, Nillable, Update", "description": "The description of the territory." }, "GeocodeAccuracy": { "type": "picklist", "properties": "Create, Filter, Group, Nillable, Restricted picklist, Sort, Update", "description": "The level of accuracy of a location’s geographical coordinates compared with its physical address. Usually provided by a geocoding service based on the address’s latitude and longitude coordinates. This field is available in the API only." }, "IsActive": { "type": "boolean", "properties": "Create, Defaulted on create, Filter, Group, Sort, Update", "description": "Indicates whether the service territory is meant to be used. If a territory is inactive, you can’t add members to it or link it to work orders, work order line items, or service appointments." }, "LastReferencedDate": { "type": "dateTime", "properties": "Filter, Nillable, Sort", "description": "The date when the territory was last modified. Its label in the user interface is Last Modified Date." }, "LastViewedDate": { "type": "dateTime", "properties": "Filter, Nillable, Sort", "description": "The date when the territory was last viewed." }, "Latitude": { "type": "double", "properties": "Create, Filter, Nillable, Sort, Update", "description": "Used with Longitude to specify the precise geolocation of the address associated with the territory. Acceptable values are numbers between –90 and 90 with up to 15 decimal places. This field is available in the API only." }, "Longitude": { "type": "double", "properties": "Create, Filter, Nillable, Sort, Update", "description": "Used with Latitude to specify the precise geolocation of the address associated with the territory. Acceptable values are numbers between –180 and 180 with up to 15 decimal places. This field is available in the API only." }, "Name": { "type": "string", "properties": "Create, Filter, Group, idLookup, Sort, Update", "description": "The name of the territory." }, "OperatingHoursId": { "type": "reference", "properties": "Create, Filter, Group, Sort, Update", "description": "The territory’s operating hours, which indicate when service appointments within the territory can occur. Service resources who are members of a territory automatically inherit the territory’s operating hours unless different hours are specified on the resource record. This field is a relationship field.", "relationship_name": "OperatingHours", "relationship_type": "Lookup", "refers_to": "OperatingHours" }, "ParentTerritoryId": { "type": "reference", "properties": "Create, Filter, Group, Nillable, Sort, Update", "description": "The territory’s parent service territory, if it has one. For example, a Northern California territory can have a State of California territory as its parent. A service territory hierarchy can contain up to 10,000 territories. This field is a relationship field.", "relationship_name": "ParentTerritory", "relationship_type": "Lookup", "refers_to": "ServiceTerritory" }, "PostalCode": { "type": "string", "properties": "Create, Filter, Group, Nillable, Sort, Update", "description": "The postal code of the address associated with the territory. Maximum length is 20 characters." }, "State": { "type": "string", "properties": "Create, Filter, Group, Nillable, Sort, Update", "description": "The state of the address associated with the territory. Maximum length is 80 characters." }, "Street": { "type": "textarea", "properties": "Create, Filter, Group, Nillable, Sort, Update", "description": "The street number and name of the address associated with the territory." }, "TopLevelTerritoryId": { "type": "reference", "properties": "Filter, Group, Nillable, Sort", "description": "(Read only) The top-level territory in a hierarchy of service territories. Depending on where a territory lies in the hierarchy, its top-level territory can be the same as its parent. This field is a relationship field.", "relationship_name": "TopLevelTerritory", "relationship_type": "Lookup", "refers_to": "ServiceTerritory" }, "TravelModeId": { "type": "reference", "properties": "Create, Filter, Group, Nillable, Sort, Update", "description": "ID of the TravelMode used for travel time calculations. The travel mode includes information about the type of transportation, such as a car or walking, whether a vehicle can take toll roads, and whether a vehicle is transporting hazardous materials. This field is a relationship field.", "relationship_name": "TravelMode", "relationship_type": "Lookup", "refers_to": "TravelMode" }, "TravelTimeBuffer": { "type": "int", "properties": "Create, Filter, Group, Nillable, Sort, Update", "description": "Add additional time to driving time, such as time to find parking or to walk to the site. This value overrides the Travel Time Buffer value defined in Field Service Settings | Scheduling | Routing." }, "TypicalInTerritoryTravelTime": { "type": "double", "properties": "Create, Filter, Nillable, Sort, Update", "description": "Estimated number of minutes needed to travel from one location to another within the service territory. You can use this field in Apex customization." } }, "special_access_rules": "Field Service must be enabled.", "usage": "For example, you can create a hierarchy of territories to represent the areas where your team works in California. Include a top-level territory named California, three child territories named Northern California, Central California, and Southern California, and a series of third-level territories corresponding to California counties. Assign service resources to each county territory to indicate who is available to work in that county.\n\nIf you want to use service territories, determine which territories\n\t\t\tto create. Depending on how your business works, you\n\t\t\tcan\n\t\t\tcreate territories based on cities or counties, or on functional categories such as\n\t\t\tsales versus service. If you plan to build out a hierarchy of service territories,\n\t\t\tcreate the highest-level territories first.\n\nFor example, you can create a hierarchy of\n\t\t\t\tterritories to represent the areas where your team works in California. Include a\n\t\t\t\ttop-level territory named\n\n, three child territories\n\t\t\t\tnamed\n\nNorthern California\n\nCentral\n\t\t\t\t\tCalifornia\n\nSouthern California\n\n, and a\n\t\t\t\tseries of third-level territories corresponding to California counties. Assign\n\t\t\t\tservice resources to each county territory to indicate who is available to work in\n\t\t\t\tthat county.", "associated_objects": "This object has these associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later.\n\n- **ServiceTerritoryChangeEvent (API version 48.0)**: Change events are available for the object.\n- **ServiceTerritoryFeed**: Feed tracking is available for the object.\n- **ServiceTerritoryHistory**: History is available for tracked fields of the object.\n- **ServiceTerritoryOwnerSharingRule**: Sharing rules are available for the object.\n- **ServiceTerritoryShare**: Sharing is available for the object.", "wsdl_segment": "```xml\n\n \n \n \n \n\n\n \n\n\n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n\n```", "field_reference": { "Address": { "field_label": "Address", "type": "address" }, "AvgTravelTime": { "field_label": "Average Travel Time (in minutes)", "type": "int", "digits": "9" }, "City": { "field_label": "City", "type": "string", "length": "40" }, "Country": { "field_label": "Country", "type": "string", "length": "80" }, "CreatedById": { "field_label": "Created By ID", "type": "reference", "length": "18" }, "CreatedDate": { "field_label": "Created Date", "type": "datetime" }, "CurrencyIsoCode": { "field_label": "Currency ISO Code", "type": "picklist", "length": "3" }, "Description": { "field_label": "Description", "type": "textarea", "length": "32000" }, "GeocodeAccuracy": { "field_label": "Geocode Accuracy", "type": "picklist", "length": "40" }, "Id": { "field_label": "Territory ID", "type": "id", "length": "18" }, "IsActive": { "field_label": "Active", "type": "boolean" }, "IsDeleted": { "field_label": "Deleted", "type": "boolean" }, "LastModifiedById": { "field_label": "Last Modified By ID", "type": "reference", "length": "18" }, "LastModifiedDate": { "field_label": "Last Modified Date", "type": "datetime" }, "LastReferencedDate": { "field_label": "Last Referenced Date", "type": "datetime" }, "LastViewedDate": { "field_label": "Last Viewed Date", "type": "datetime" }, "Latitude": { "field_label": "Latitude", "type": "double", "precision": "18", "scale": "15" }, "Longitude": { "field_label": "Longitude", "type": "double", "precision": "18", "scale": "15" }, "Name": { "field_label": "Name", "type": "string", "length": "255" }, "OperatingHoursId": { "field_label": "Operating Hour ID", "type": "reference", "length": "18" }, "OwnerId": { "field_label": "Owner ID", "type": "reference", "length": "18" }, "ParentTerritoryId": { "field_label": "Parent Territory ID", "type": "reference", "length": "18" }, "PostalCode": { "field_label": "Zip/Postal Code", "type": "string", "length": "20" }, "PricebookId": { "field_label": "Price Book ID", "type": "reference", "length": "18" }, "SchedulingConstraintId": { "field_label": "Scheduling Constraint ID", "type": "reference", "length": "18" }, "SelfCheckInUrl": { "field_label": "Self Check In URL", "type": "url", "length": "1000" }, "ServiceAppointmentLimitType": { "field_label": "Service Appointment Limit Type", "type": "picklist", "length": "255" }, "State": { "field_label": "State/Province", "type": "string", "length": "80" }, "Street": { "field_label": "Address", "type": "textarea", "length": "255" }, "SystemModstamp": { "field_label": "System Modstamp", "type": "datetime" }, "TopLevelTerritoryId": { "field_label": "Top-Level Territory ID", "type": "reference", "length": "18" }, "TravelModeId": { "field_label": "Travel Mode ID", "type": "reference", "length": "18" }, "TravelTimeBuffer": { "field_label": "Travel Time Buffer (in minutes)", "type": "int", "digits": "9" }, "TypicalInTerritoryTravelTime": { "field_label": "Typical In-Territory Travel Time (Minutes)", "type": "double", "precision": "18", "scale": "2" } }, "field_reference_columns": [ "field_label", "type", "digits", "length", "precision", "scale" ] }