Location

Represents a warehouse, service vehicle, work site, or other element of the region where your team performs field service work. You can associate activities with specific locations. Activities, such as the tasks and events related to a location, appear in the activities timeline when you view the location detail page.

Supported Calls 

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update(), upsert()

Fields 

AssignedFoCount 

  • Type: int

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: The number of fulfillment orders assigned to the location. Confirming held fulfillment order capacity increments this value. To reset the location’s capacity, set this value to 0.

    This field is available when Order Management is installed and configured. By default, it’s hidden by field-level security.

    This field is available in API version 55.0 and later.

CloseDate 

  • Type: date
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Date the location closed or went out of service.

ConstructionEndDate 

  • Type: date
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Date construction ended at the location.

ConstructionStartDate 

  • Type: date
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Date construction began at the location.

Description 

  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: A brief description of the location.

DrivingDirections 

  • Type: string
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: Directions to the location.

ExternalReference 

  • Type: string

FoCapacity 

  • Type: int

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: The maximum number of fulfillment orders that can be assigned to the location per time period. If this value is null, then this location’s capacity isn’t limited.

    This field is available when Order Management is installed and configured. By default, it’s hidden by field-level security.

    This field is available in API version 55.0 and later.

IsInventoryLocation 

  • Type: boolean

  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update

  • Description: Indicates whether the location stores parts.

    This field must be selected if you want to associate the location with product items.

    Note

IsMobile 

  • Type: boolean
  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update
  • Description: Indicates whether the location moves. For example, a truck or tool box.

LastReferencedDate 

  • Type: dateTime
  • Properties: Filter, Nillable, Sort
  • Description: The timestamp for when the current user last viewed a record related to this record.

LastViewedDate 

  • Type: dateTime
  • Properties: Filter, Nillable, Sort
  • Description: The timestamp for when the current user last viewed this record. If this value is null, it’s possible that this record was referenced (LastReferencedDate) and not viewed.

Latitude 

  • Type: double
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The latitude of the location.

Location 

  • Type: location
  • Properties: Nillable
  • Description: The geographic location.

LocationLevel 

  • Type: int
  • Properties: Filter, Group, Nillable, Sort
  • Description: The location’s position in a location hierarchy. If the location has no parent or child locations, its level is 1. Locations that belong to a hierarchy have a level of 1 for the root location, 2 for the child locations of the root location, 3 for their children, and so forth.

LocationType 

  • Type: picklist
  • Properties: Create, Filter, Group, Sort, Update
  • Description: Picklist of location types. It has no default values, so you must populate it before creating any location records.

LogoId 

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: A ContentAsset representing a logo for the location.

    This field is available in API version 50.0 and later.

    This is a relationship field.

  • Relationship Name: Logo

  • Relationship Type: Lookup

  • Refers To: ContentAsset

Longitude 

  • Type: double
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: The longitude of the location.

Name 

  • Type: string
  • Properties: Create, Filter, Group, idLookup, Sort, Update
  • Description: The name of the location. For example, Service Van #4.

OpenDate 

  • Type: date
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Date the location opened or came into service.

OwnerId 

  • Type: reference

  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update

  • Description: The location’s owner or driver.

    This is a polymorphic relationship field.

  • Relationship Name: Owner

  • Relationship Type: Lookup

  • Refers To: Group, User

ParentLocationId 

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: The location’s parent location. For example, if vans are stored at a warehouse when not in service, the warehouse is the parent location.

    This is a relationship field.

  • Relationship Name: ParentLocation

  • Relationship Type: Lookup

  • Refers To: Location

PossessionDate 

  • Type: date
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The date the location was purchased.

Priority 

  • Type: picklist

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: The priority of the location when routing orders. No default values are included. Add values to the picklist and reference them in your custom routing logic.

    This field is available when Order Management is installed and configured. By default, it’s hidden by field-level security.

    This field is available in API version 55.0 and later.

RemodelEndDate 

  • Type: date
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Date when remodel construction ended at the location.

RemodelStartDate 

  • Type: date
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Date when remodel construction started at the location.

RootLocationId 

  • Type: reference

  • Properties: Filter, Group, Nillable, Sort

  • Description: (Read Only) The top-level location in the location’s hierarchy.

    This is a relationship field.

  • Relationship Name: RootLocation

  • Relationship Type: Lookup

  • Refers To: Location

ShouldSyncWithOci 

  • Type: boolean

  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update

  • Description: Indicates whether the location should sync its data with Omnichannel Inventory.

    This field is available in API version 51.0 and later.

  • Default value: false

ShouldTrackFoCapacity 

  • Type: boolean

  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update

  • Description: Indicates whether the location should track its fulfillment order capacity.

    This field is available when Order Management is installed and configured. By default, it’s hidden by field-level security.

    This field is available in API version 55.0 and later.

  • Default value: false

TimeZone 

  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Description: Picklist of available time zones.

VisitorAddressId 

  • Type: reference

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Description: Lookup to an account’s or client’s address.

    This is a relationship field.

  • Relationship Name: VisitorAddress

  • Relationship Type: Lookup

  • Refers To: Address

Usage 

Before creating any location records, add at least one value to the Location Type picklist. LocationType is a required field.

“Location” in Salesforce can also refer to the geolocation compound field found on many standard objects. When referencing the Location object in your Apex code, always use Schema.Location instead of Location to prevent confusion with the standard Location compound field. If referencing both the Location object and the Location field in the same snippet, you can differentiate between the two by using System.Location for the field and Schema.Location for the object.

Important

Associated Objects 

This object has the following associated objects. Unless noted, they are available in the same API version as this object.

LocationChangeEvent (API version 48.0)

Change events are available for the object.

LocationFeed

Feed tracking is available for the object.

LocationHistory

History is available for tracked fields of the object.

LocationShare

Sharing is available for the object.