Location

Represents a warehouse, service vehicle, work site, or other element of the region where your team performs field service work. In API version 49.0 and later, 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. Also in API version 49.0 and later, Work.com users can view Employees as a related list on Location records. In API version 51.0 and later, this object is available for Omnichannel Inventory and represents physical locations where inventory is available for fulfilling orders.

Introduced in API version 39.0.

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

  • At least one of these features must be enabled:

    • Commerce Store
    • Contact Tracing for Employees
    • Employee Experience
    • Field Service
    • Fulfillment Orders
    • Health Cloud
    • Industries Insurance
    • Industries Visit
    • Locations
    • Omnichannel Inventory
    • Public Sector
    • Retail Execution
    • Work.com
  • Type: reference

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

  • Introduced: API version 63.0

  • Relationship name: Account

  • Relationship type: relationship

  • Refers to: Account

  • Type: int

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

  • Introduced: API version 55.0

  • 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.

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

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

  • Introduced: API version 61.0

  • Description:

    Default pickup time at the location.

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

  • Type: int

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

  • Introduced: API version 61.0

  • Description:

    Default processing time at the location.

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

  • Type: picklist

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

  • Introduced: API version 61.0

  • Description:

    Default processing time unit at the location.

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

  • Possible values:

    • Hours — Hours
    • Days — Days
    • Weeks — Weeks
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: A brief description of the location.
  • Type: string
  • Properties: Create, Filter, Nillable, Sort, Update
  • Description: Directions to the location.
  • Type: int
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 65.0
  • Description: The earliest pickup time for BOPIS. This value is measured in minutes after the start of business hours.
  • Type: email
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 66.0
  • Type: string
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 49.0
  • Description: Identifier of a location.
  • Type: phone
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 66.0
  • Type: int

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

  • Introduced: API version 55.0

  • 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.

  • Type: reference

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

  • Introduced: API version 61.0

  • Description:

    Fulfilling business hours at the location.

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

  • Relationship name: FulfillingBusinessHours

  • Relationship type: relationship

  • Refers to: BusinessHours

  • Type: reference

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

  • Introduced: API version 68.0

  • Relationship name: FulfillingOperationalHours

  • Relationship type: relationship

  • Refers to: OperatingHours

  • Type: boolean

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

  • Introduced: API version 66.0

  • Default value: false

  • Type: boolean
  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update
  • Introduced: API version 65.0
  • Description: Indicates whether the location supports BOPIS
  • Default value: false
  • Type: boolean

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

  • Description: Indicates whether the location stores parts.

  • Default value: false

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

  • Type: boolean
  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update
  • Description: Indicates whether the location moves. For example, a truck or tool box.
  • Default value: false
  • Type: int
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 65.0
  • Description: The latest pickup time for BOPIS. This value is measured in minutes before the end of business hours.
  • Type: double
  • Properties: Create, Filter, Sort, Update
  • Description: The latitude of the location.
  • Type: location
  • Properties: Nillable
  • Description: The geographic location.
  • Type: int
  • Properties: Filter, Group, Nillable, Sort
  • Introduced: API version 41.0
  • 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.
  • 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.
  • Type: reference

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

  • Introduced: API version 50.0

  • Description:

    A ContentAsset representing a logo for the location.

    This is a relationship field.

  • Relationship name: Logo

  • Relationship type: relationship

  • Refers to: ContentAsset

  • Type: double
  • Properties: Create, Filter, Sort, Update
  • Description: The longitude of the location.
  • Type: phone
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 66.0
  • Type: string
  • Properties: Create, Filter, Group, idLookup, Sort, Update
  • Description: The name of the location. For example, Service Van #4.
  • Type: date
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: Date the location opened or came into service.
  • 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: relationship

  • Refers to: Location

  • Type: phone
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 66.0
  • Type: int
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Introduced: API version 65.0
  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Introduced: API version 65.0
  • Type: date
  • Properties: Create, Filter, Group, Nillable, Sort, Update
  • Description: The date the location was purchased.
  • Type: picklist

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

  • Introduced: API version 55.0

  • 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.

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

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 41.0

  • Description:

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

    This is a relationship field.

  • Relationship name: RootLocation

  • Relationship type: relationship

  • Refers to: Location

  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Introduced: API version 67.0
  • Type: boolean
  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update
  • Introduced: API version 51.0
  • Description: Indicates whether the location should sync its data with Omnichannel Inventory. The default value is false.
  • Default value: false
  • Type: boolean

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

  • Introduced: API version 55.0

  • Description:

    Indicates whether the location should track its fulfillment order capacity. The default value is false.

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

  • Default value: false

  • Type: picklist
  • Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Description: Picklist of available time zones.
  • 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: relationship

  • Refers to: Address

  • Type: string
  • Properties: Nillable

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

To track your inventory in Salesforce, create product items, which represent the stock of a particular product a particular location. For example, create a product item that represents the 500 bolts you have in stock at your Warehouse A location. Each product item must be associated with a location.

To get a more granular picture of your field service operation, associate locations with service territories. For example, if a warehouse is located in a particular service territory, add it as a service territory location.

“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.

This object has the following 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.