---
schema_version: "1"
id: af57bd819bfddda94417655ff341de5ad3039d4ad0135fb0d8dd796987a3de62
title: Location
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_location.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_location.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8e032287d5b86e2b80616f0a3c9dc7be0f0d0f05e7b6790c15ee064739d91181
description: 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.
---
# 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.

## Supported Calls

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

## Special Access Rules

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

## Fields

| Field Name | Details |
| --- | --- |
| 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.



 |
| DefaultPickupTime | 

Type

time

Properties

Create, Filter, Group, Nillable, Sort, Update

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.

This field is available in API version 61.0 and later.



 |
| DefaultProcessingTime | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

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.

This field is available in API version 61.0 and later.



 |
| DefaultProcessingTimeUnit | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Default processing time unit at the location. Possible values are:

- Hours
- Days
- Weeks

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 61.0 and later.



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



 |
| EarliestPickupTimeOffset | 

Type

integer

Properties

Create, Filter, Nillable, Sort, Update

Description

The earliest pickup time for BOPIS. This value is measured in minutes after the start of business hours.



 |
| ExternalReference | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Identifier of a location.



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



 |
| FulfillingBusinessHours | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

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.

This field is available in API version 61.0 and later.



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



 |
| IsEligibleForPickup | 

Type

boolean

Properties

Create, Filter, Nillable, Sort, Update

Description

Indicates whether the location supports BOPIS



 |
| IsInventoryLocation | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

Indicates whether the location stores parts.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

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















 |
| 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 date when the location was last modified. Its label in the user interface is Last Modified Date.



 |
| LastViewedDate | 

Type

datetime

Properties

Filter, Nillable, Sort

Description

The date the location was last viewed.



 |
| LatestPickupTimeOffset | 

Type

integer

Properties

Create, Filter, Nillable, Sort, Update

Description

The latest pickup time for BOPIS. This value is measured in minutes before the end of business hours.



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



 |
| PickupProcessingTime | 

Type

integer

Properties

Create, Filter, Nillable, Sort, Update

Description

The processing time required for BOPIS orders at this 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. The default value is false.

This field is available in API version 51.0 and later.



 |
| ShouldTrackFoCapacity | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

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.

This field is available in API version 55.0 and later.



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

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.

![Important](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note_important.png)

#### Important

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

## Associated Objects

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

[LocationChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_change_event.htm "A ChangeEvent object is available for each object that supports Change Data Capture. You can subscribe to a stream of change events using Change Data Capture to receive data tied to record changes in Salesforce. Changes include record creation, updates to an existing record, deletion of a record, and undeletion of a record. A change event isn’t a Salesforce object—it doesn’t support CRUD operations or queries. It’s included in the object reference so you can discover which Salesforce objects support change events.") (API version 48.0)

Change events are available for the object.

[LocationFeed](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_feed.htm "StandardObjectNameFeed is the model for all feed objects associated with standard objects. These objects represent the posts and feed-tracked changes of a standard object.")

Feed tracking is available for the object.

[LocationHistory](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_history.htm "StandardObjectNameHistory is the model for all history objects associated with standard objects. These objects represent the history of changes to the values in the fields of a standard object.")

History is available for tracked fields of the object.

[LocationOwnerSharingRule](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_ownersharingrule.htm "StandardObjectNameOwnerSharingRule is the model for all owner sharing rule objects associated with standard objects. These objects represent a rule for sharing a standard object with users other than the owner.")

Sharing rules are available for the object.

[LocationShare](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_share.htm "StandardObjectNameShare is the model for all share objects associated with standard objects. These objects represent a sharing entry on the standard object.")

Sharing is available for the object.

#### See Also

- [LocationGroup](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_locationgroup.htm "Represents a group of Omnichannel Inventory locations, providing an aggregate view of inventory availability across those locations. Omnichannel Inventory can create an inventory reservation for an order at the location group level, then assign the reservation to one or more locations in the group as needed. This object is available in API version 51.0 and later.")
- [LocationGroupAssignment](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_locationgroupassignment.htm "Represents the assignment of a location to a location group. This object is available in API version 51.0 and later.")
- [_B2B Commerce and D2C Commerce Developer Guide_: Inventory Data Model](https://developer.salesforce.com/docs/commerce/salesforce-commerce/guide/b2b-b2c-comm-data-model-inventory.html "
    B2B Commerce and D2C Commerce Developer Guide: Inventory Data
    Model - HTML (New Window)")